Construct a numpy
-based Python project from scratch for scientific computing and research.
- Numpy a basic installation for the holy trifecta 🕊️ of
numpy, matplotlib, scipy
. - PDM for dependency, virtualenv, and package management.
- Mkdocs material for simple, clean, automated, online code documentation.
- pre-commit with ruff integration for code linting and formatting.
- pytest with coverage for regression testing and code coverage.
- Commitizen with conventional commits for automatic versioning and changelogs.
- Copier for continuously updating project from this original template.
- Github actions for automated, build, test, and deployment.
Have python and git installed, then:
pip install --user pdm
pdm self add copier copier-templates-extensions
cd path/to/project
pdm init --copier gh:eckelsjd/copier-numpy --trust
That's it! Follow the questionnaire and then your numpy
-based scientific computing project is ready to go.
All extra arguments are passed to copier copy
(you're also welcome to just use copier
directly).
Note: The --trust
flag enables extensions used in this template. Please see extensions.py and setup_github.py to make sure you trust this template (spoiler: these just add some global template variables and some basic git
scripting).
Follow this tutorial to enable trusted publishing with Github actions. Then, do:
pdm bump
That's it! Your package will automatically deploy to PyPI and GitHub with a correctly-versioned vX.X.X
tag.
copier update --trust
This will update template files in your project with the most recent releases to the copier-numpy
template. See the copier docs for more info.
- Scientific Python library development
- Copier-pdm and the similar pdm-project version
- Serious scaffolding for Python projects
- LINCC framework for Python projects by the University of Washington
- copier-pylib for pure Python projects