Skip to content

devminds-ch/project-python

Repository files navigation

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

Toolchain

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

Directory structure

├── 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

Build, test and deploy instructions

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 documentation

Build the Sphinx documentation:

./tools/build-docs.sh

Build Python package

Build the Python package:

./tools/build-package.sh

Run Python linters

Run static code analysis:

./tools/lint-package.sh

Run Python tests

Run Python tests:

./tools/test-package.sh

Deploy Python package

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

About

Python Training Project by devminds GmbH

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors 3

  •  
  •  
  •