From 9e4225b4d7dac59e86b8cc768ed930a4a2d2f6d9 Mon Sep 17 00:00:00 2001 From: chaseastewart <153762074+chaseastewart@users.noreply.github.com> Date: Fri, 16 Aug 2024 14:05:02 -0500 Subject: [PATCH] Update build to use make file. --- .github/workflows/mkdocs-gh-pages.yml | 9 ++------- .github/workflows/python-package.yml | 21 +++++++++------------ Makefile | 1 - 3 files changed, 11 insertions(+), 20 deletions(-) diff --git a/.github/workflows/mkdocs-gh-pages.yml b/.github/workflows/mkdocs-gh-pages.yml index abe1e96..d912922 100644 --- a/.github/workflows/mkdocs-gh-pages.yml +++ b/.github/workflows/mkdocs-gh-pages.yml @@ -33,13 +33,8 @@ jobs: installer-parallel: true - name: Install project run: poetry install --no-interaction - - name: Build Docstrings - run: | - poetry run lazydocs --output-path="./docs/docstrings" --overview-file="README.md" \ - --src-base-url="https://github.com/chaseastewart/fhir-converter/blob/master/" \ - fhir_converter - - name: Build Mkdocs - run: poetry run mkdocs build --site-dir ./_site + - name: Build Docs + run: make docs - name: Upload artifact uses: actions/upload-pages-artifact@v3 diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 20d5b8b..eaa9aff 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -34,13 +34,10 @@ jobs: virtualenvs-in-project: true installer-parallel: true - name: Install project - run: poetry install --no-interaction + run: make install - name: flake8 run: | - # stop the build if there are Python syntax errors or undefined names - poetry run flake8 fhir_converter --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings - poetry run flake8 fhir_converter --count --ignore=E203,E721 --exit-zero --max-complexity=10 --max-line-length=120 --statistics + make linting-check type-check: needs: linting-check @@ -63,9 +60,9 @@ jobs: virtualenvs-in-project: true installer-parallel: true - name: Install project - run: poetry install --no-interaction + run: make install - name: mypy - run: poetry run mypy fhir_converter + run: make type-check test: needs: type-check @@ -96,7 +93,7 @@ jobs: - name: Verify Poetry Install run: poetry --version - name: Setup Poetry Environment - run: poetry env use '${{ steps.python.outputs.python-path }}' + run: make env PY_VERSION='${{ steps.python.outputs.python-path }}' - name: Verify Poetry Environment run: | actual=$(poetry run python --version) @@ -106,9 +103,9 @@ jobs: exit 1 fi - name: Install project - run: poetry install --no-interaction + run: make install - name: Run tests - run: poetry run pytest + run: make test cov: needs: test @@ -131,9 +128,9 @@ jobs: virtualenvs-in-project: true installer-parallel: true - name: Install project - run: poetry install --no-interaction + run: make install - name: Build Coverage Report - run: poetry run pytest --cov=fhir_converter --cov-report=html + run: make cov - run: poetry run smokeshow upload htmlcov env: SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Coverage {coverage-percentage} diff --git a/Makefile b/Makefile index e3b82a5..a29f11a 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,6 @@ PY_VERSION = 3.12 env : poetry env use $(PY_VERSION) - poetry run python --version update-lock : poetry lock --no-update