This is a template for Python projects created by Ole Bause. This repository includes:
- Source code and test code is seperated in different directories.
- External libraries installed and managed by Pip.
- Setup for tests using Pytest.
- Bechmark tests using Pytest-Benchmark
- Continuous testing with Github-Actions.
- Code coverage reports, including automatic upload to Codecov.
- Code documentation with Mkdocs.
- Example of own Python package with the use of Cython
- Optional: Use of VSCode with the Python and UnitTest extension.
├── setup.py
├── setup.cfg
├── pyproject.toml
├── ... other config files ...
├── tests
│ ├── __init__.py
│ ├── test_vector.py
│ ├── test_computations.py
│ └── conftest.py
├── docs
│ ├── api.md
│ └── index.md
├── fastvector
│ ├── __init__.py
│ ├── vector.py
│ ├── dtypes.py
│ ├── version.py
│ └── cython_computations.pyx
│ └── computations.py
└── benchmarks
│ ├── __init__.py
│ └── test_computations.py
└── tests
├── __init__.py
├── test_computations.py
└── test_vector.py
# Build and Install (local)
pip install -e .
# Test
pytest tests
# Code Coverage
pytest --cov=fastvector tests --cov-report=html
# Benchmarks
pytest --benchmark-columns=min,max,mean,stddev --benchmark-sort=mean benchmarks