Python Training Project by devminds GmbH
This Python project is used for DevOps CI/CD trainings.
The project contains a Python package providing a CLI to calculate the sum of two numbers:
Usage: python_training_project [OPTIONS] COMMAND [ARGS]...
Options:
--version Show the version and exit.
--help Show this message and exit.
Commands:
sum
The Python package is based on the following toolchain:
- uv for dependencies, virtual environment, package build and deployment
- Sphinx for documentation
- Flake8 for style guide enforcement
- mypy for static type checking
- Pylint for static code analysis
- Ruff for linting and code formatting
- pytest for test creation and execution
├── build Reserved folder for build artifacts
├── dist Reserved folder for build artifacts
├── docs Sphinx documentation
├── src Python package source code
├── tests Python tests
└── tools Scripts
All steps required to build, test or deploy the Python package are wrapped in separate shell scripts.
Check the content of the corresponding scripts for details.
Build the Sphinx documentation:
./tools/build-docs.sh
Build the Python package:
./tools/build-package.sh
Run static code analysis:
./tools/lint-package.sh
Run Python tests:
./tools/test-package.sh
Make sure the set the following environment variables before calling the deployment script:
UV_PUBLISH_URL
UV_PUBLISH_USERNAME
UV_PUBLISH_PASSWORD
Deploy the Python package:
./tools/deploy-package.sh