Copier template for projects managed with PDM. Inspired by Frost Ming's and pawamoy's templates.
- Package manager:
This template uses PDM, pre-configured in
pyproject.toml
. - Tests: Tests run with pytest (xdocstest plugin activated). Multi-environment testing is implemented with Nox.
- Documentation:
An optional documentation template can be generated.
It uses Sphinx (Furo theme, MyST parser plugin activated).
Default API documentation is generated using a recursive
autosummary
setup. Writing docstrings with the Numpydoc format is encouraged. - CI and automation GitHub Actions are configured and will automatically execute tests upon commit (except for draft PRs). By default, automatic upload to PyPI is active upon tagging.
- Python 3
- Git
- Copier
- Good practice guide: Scikit-HEP dev guide
- Use PEP 621 (metadata in
pyproject.toml
) and a compatible build backend (options: PDM with pdm-publish, Flit, setuptools through ppsetuptools) - About version capping: https://iscinumpy.dev/post/bound-version-constraints/#tldr
- Switch to Ruff, remove isort
- Add publication to Anaconda Cloud
- Add pre-commit hooks
- Replace makefile-based tasks with PDM tasks
- Replace coverage fail threshold with task summary
- Add publication to PyPI
- Add Read the Docs configuration file template