A minimal Python project template demonstrating best practices for packaging, testing, and linting.
- Source code lives in the
src/directory. - Tests are located in the
tests/directory. - Build configuration is defined in
pyproject.toml. - Development utilities (linting, formatting) are available via the
Makefile.
- Install uv (https://github.com/astral-sh/uv) for dependency management
uv venvcreates a virtual environment- IMPORTANT:
source .venv/bin/activateactivates the virtual environment uv syncto install dependencies
There is no dedicated entry‑point script, but you can experiment with the example module:
# Run an interactive session
uv run python -c "from src.arithm import sum; print(sum(2, 3))"Another example script is located at scripts/example_script.py
uv run example-script
Run all tests:
make testOr invoke pytest directly for a concrete test file:
uv run pytest tests/test_arithm.py# Run pre‑commit hooks (lint, type checking, etc.)
make lint
# Auto‑format code with ruff
make formatsrc/– source modulestests/– test suiteMakefile– convenient shortcuts for common taskspyproject.toml– project metadata and dependencies.pre-commit-config.yaml– pre‑commit hook configuration
This project is licensed under the terms found in the LICENSE file.