Skip to content

Template for a numpy-based scientific computing Python package.

License

Notifications You must be signed in to change notification settings

eckelsjd/copier-numpy

Repository files navigation

Numpy project template

Python 3.11 pdm-managed documentation pre-commit Ruff Code Coverage Conventional Commits Copier

Construct a numpy-based Python project from scratch for scientific computing and research.

🔧 Features

  • 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.

📍 Quickstart

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).

🐍 Publishing on PyPI

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.

🔄 Updating your project

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.

🔗 See similar

About

Template for a numpy-based scientific computing Python package.

Topics

Resources

License

Stars

Watchers

Forks

Languages