Skip to content

Commit

Permalink
[FMWK-73] Python - use Poetry to lock dependency versions (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
juliannguyen4 committed Oct 21, 2022
1 parent cd03812 commit 6261ace
Show file tree
Hide file tree
Showing 4 changed files with 1,133 additions and 41 deletions.
28 changes: 10 additions & 18 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,38 +24,30 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Setup Poetry
run: |
python -m pip install --upgrade pip
# Install linter
pip install -r requirements.txt
# Build code and install package locally
pip install --editable .
# Install poetry
curl -sSL https://install.python-poetry.org | python3 -
- name: Install developer dependencies and documentapi
run: poetry install
- name: Lint with flake8
run: |
cd documentapi/
# Allow for aliases
shopt -s expand_aliases
# The GitHub editor is 127 chars wide
alias flake8="flake8 --count --max-complexity=10 --show-source --max-line-length=127"
flake8 .
# Lint the doc example
cd ../docs
flake8 cookbook-ex.py
poetry run flake8 --count --max-complexity=10 --show-source --max-line-length=127 documentapi/ docs/cookbook-ex.py
- name: Build documentation
run: |
cd docs/
sphinx-build -b spelling . build -W
sphinx-build -b html . htmldir -W
poetry run sphinx-build -b spelling . build -W
poetry run sphinx-build -b html . htmldir -W
- name: Set up Aerospike Database
uses: reugn/github-action-aerospike@v1
- name: Test cookbook example
run: |
# Wait for server to finish startup
sleep 3
cd docs/
python3 cookbook-ex.py
poetry run python3 cookbook-ex.py
- name: Run unit tests
run: |
cd tests/
python3 test.py
poetry run python3 test.py

0 comments on commit 6261ace

Please sign in to comment.