Skip to content

Commit

Permalink
fix: merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
lpm0073 committed Nov 6, 2023
2 parents d70f2bc + d6d7e47 commit 94d5833
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 48 deletions.
90 changes: 45 additions & 45 deletions .github/workflows/pythonTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,48 +14,48 @@
# - optionally add `if: github.actor != 'dependabot[bot]'` to the python-tests job to
# prevent dependabot from running tests
# -----------------------------------------------------------------------------
name: Python Tests

on: [workflow_dispatch, pull_request_target]

jobs:
python-tests:
env:
OPENAI_API_ORGANIZATION: ${{ secrets.OPENAI_API_ORGANIZATION }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
PINECONE_ENVIRONMENT: ${{ secrets.PINECONE_ENVIRONMENT }}

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r ./requirements.txt
cp -R ./api/terraform/python/layer_genai/openai_utils /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/
- name: Create .env
run: |
touch ./.env
echo "OPENAI_API_ORGANIZATION=${OPENAI_API_ORGANIZATION}" >> ./.env
echo "OPENAI_API_KEY=${OPENAI_API_KEY}" >> ./.env
echo "PINECONE_API_KEY=${PINECONE_API_KEY}" >> ./.env
echo "PINECONE_ENVIRONMENT=${PINECONE_ENVIRONMENT}" >> ./.env
- name: Test lambda_openai_v2
run: |
cd ./api/terraform/python/lambda_openai_v2
pytest -v -s tests/
- name: Test lambda_langchain
run: |
cd ./api/terraform/python/lambda_langchain
pytest -v -s tests/
name: Python Tests

on: [workflow_dispatch, pull_request_target]

jobs:
python-tests:
env:
OPENAI_API_ORGANIZATION: ${{ secrets.OPENAI_API_ORGANIZATION }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
PINECONE_ENVIRONMENT: ${{ secrets.PINECONE_ENVIRONMENT }}

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r ./requirements.txt
cp -R ./api/terraform/python/layer_genai/openai_utils /opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/
- name: Create .env
run: |
touch ./.env
echo "OPENAI_API_ORGANIZATION=${OPENAI_API_ORGANIZATION}" >> ./.env
echo "OPENAI_API_KEY=${OPENAI_API_KEY}" >> ./.env
echo "PINECONE_API_KEY=${PINECONE_API_KEY}" >> ./.env
echo "PINECONE_ENVIRONMENT=${PINECONE_ENVIRONMENT}" >> ./.env
- name: Test lambda_openai_v2
run: |
cd ./api/terraform/python/lambda_openai_v2
pytest -v -s tests/
- name: Test lambda_langchain
run: |
cd ./api/terraform/python/lambda_langchain
pytest -v -s tests/
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# [0.4.0](https://github.com/FullStackWithLawrence/aws-openai/compare/v0.3.1...v0.4.0) (2023-11-03)


### Bug Fixes

* add a .env file to root so that test environment matches prod ([293b20e](https://github.com/FullStackWithLawrence/aws-openai/commit/293b20ec1537ef493539a59aa7a8d0216809b9f4))
* add openai_utils source location to the sys path for Python ([30eed8e](https://github.com/FullStackWithLawrence/aws-openai/commit/30eed8e2c6e1c27391d94597e43afee6db5eeb44))
* need to setup venv from ./requirements.txt so that the dev imports are included ([a907e98](https://github.com/FullStackWithLawrence/aws-openai/commit/a907e983051ad2cad721cb6a9347b0adb8f60c9a))
* paths should begin with ./ ([c8060bc](https://github.com/FullStackWithLawrence/aws-openai/commit/c8060bc2302190f074d3d7e78496781f5d6e627a))
* physically copy openai_utils to pip packages folder ([772b1d6](https://github.com/FullStackWithLawrence/aws-openai/commit/772b1d659b3bde6c5f80620e4539f23df68c3ffc))
* switch to Pytest ([be7746b](https://github.com/FullStackWithLawrence/aws-openai/commit/be7746bb090ac60d29ad42359d50c3c554ab80cf))


### Features

* add automated Python unit testing workflow to Github Actions ([dea18fc](https://github.com/FullStackWithLawrence/aws-openai/commit/dea18fc8cf2183d03613893f950ad30d7acd77fe))

## [0.3.1](https://github.com/FullStackWithLawrence/aws-openai/compare/v0.3.0...v0.3.1) (2023-11-03)


Expand Down
6 changes: 3 additions & 3 deletions api/terraform/python/layer_genai/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# requirements in the zip package for this layer.
# -----------------------------------------------------------------------------
python-dotenv
openai==0.28.0
langchain==0.0.323
langchain-experimental==0.0.34
openai==0.28.1
langchain==0.0.331
langchain-experimental==0.0.37
pinecone-client==2.2.4

0 comments on commit 94d5833

Please # to comment.