Ensure Python and Python Poetry are installed.
Dependency installation is managed via poetry. Once cloned, you can install dependencies from the project root:
poetry installOnce dependencies are installed, you can run the package-name:
poetry run package-nameAnd boom! You're ready to customize a Python project! 🎉
pytest is used as a test runner and its configuration can be found in the tool.pytest.ini_options section of pyproject.toml. pytest-cov is used as a coverage reporter.
Running pytest with no arguments will:
- Automatically add
srctoPYTHONPATH(pythonpath:src) - Only run unit tests (testpaths:
tests/unit/package_name) - Increase verbosity (
-vv) - Calculate coverage (using
pytest-cov) and display any modules missing coverage
You can specify different paths to run different groupings of tests:
pytest tests/unit # Run unit tests
pytest tests/integration # Run integration tests
pytest tests/e2e # Run end-to-end tests
pytest tests # Run all testsEnsure Docker and act are installed and a github-act-cache-server is up and running.
Local workflow runs are executed via act. Once all dependencies are setup, you can test workflows with:
# TBD script to run all testsSee example act commands to better understand how to run GitHub actions locally.
Use git to install commit message, pre-commit, and pre-push commit hooks:
git config --local core.hooksPath .github/hooks/
git config --local commit.template .github/.gitmessageThese will ensure commit messages are consistent, code is correctly formatted and linted, and tests before committing or pushing.
Style decisions are based on the Google Python Style Guide.
This tool is MIT licensed.
