-
(Optional) Clear virtual machine of old requirements:
uv pip uninstall -y -r <(uv pip freeze) -
(Optional) Check the
dependenciesanddev-dependenciessections ofpyproject.tomlfor latest dependency versions. -
(Optional) Update virtual machine with the latest dependencies:
make update
-
Lint code with
ruff:make lint
-
Check code security with
bandit:make secure
-
Run all
pytesttests (see following commands for running subsets of tests):make test_code
-
Run all
pytesttests verbosely:python -m pytest -v -s
-
Run
pytestintegration tests:python -m pytest -v -s -m integration
-
(Optional) Run all tests from
pytestfile:python -m pytest -v -s -m integration tests/integration/test_api_game_data.py
-
(Optional) Run specific test from
pytestfile:python -m pytest -v -s -m integration tests/integration/test_api_game_data.py -k test_get_game_key_by_season
-
(Optional) Test Python support using act for GitHub Actions:
make test_actions
Note: If
actis unable to locate Docker, make sure that the required/var/run/docker.socksymlink exists. If it does not, you can fix it by running:sudo ln -s "$HOME/.docker/run/docker.sock" /var/run/docker.sock`
-
(Optional) Build the PyPI package independent of deployment:
make build
-
(Optional) Test packages for PyPI deployment:
make verify_build
-
(Optional) Check MkDocs documentation by serving it at http://localhost:8000/ locally:
make test_docs
-
(Optional) Build the PyPI package and MkDocs documentation independent of deployment:
make docs
Note: Running
make test_docsfrom the previous step recreates the documentation without building the PyPI package withuv. -
Create a git commit:
git add . git commit -m 'commit message'
-
Update the git tag with the new version:
git tag -a [tag_name/version] -m [message]git tag -a v1.0.0 -m 'release message' git push origin --tags -
Install
twine(if not already installed):uv add twine
-
(Optional) Test deployment by building the PyPI packages, recreating the documentation, and deploying to Test PyPI:
make test_deploy
-
Deploy YFPY by building the PyPI packages, recreating the documentation, and deploying to PyPI:
make deploy
-
Build Docker container:
docker compose -f compose.yaml -f compose.build.yaml build
-
(If needed) Authenticate with GitHub Personal Access Token (PAT):
jq -r .github_personal_access_token.value private-github.json | docker login ghcr.io -u uberfastman --password-stdin -
Deploy the newly-built Docker image with respective major, minor, and patch version numbers to the GitHub Container Registry:
docker push ghcr.io/uberfastman/yfpy:X.X.X
-
Create a second git commit with updated version number and documentation:
git add . git commit -m 'update version number and docs'
-
Update YFPY GitHub repository:
git push