cookiecutter-nist-python

Repo Docs PyPI license Code style: ruff uv

cookiecutter-nist-python#

Cookiecutter template for python packages at NIST.

Overview#

This template includes all NIST specific branding for creating a python package.

Features#

  • Testing with pytest

  • Isolated testing, documentation building, etc, with nox

  • Linting with pre-commit

  • Documentation with Sphinx, MyST, using either the furo or sphinx-book-theme theme.

  • Simple commands to upload package to [pypi], or a personal conda channel.

  • Simple commands to release documentation to nist-pages

  • Works with both conda and virtualenv based environments.

  • Handle creation of requirements.txt and environment.yaml files with pyproject2conda

Status#

This package is actively used by the author. Please feel free to create a pull request for wanted features and suggestions!

Quick start#

Generate with cookiecutter:

cookiecutter [--checkout BRANCH-NAME] https://github.com/usnistgov/cookiecutter-nist-python.git

Generate with cruft:

cruft create [--checkout BRANCH-NAME] https://github.com/usnistgov/cookiecutter-nist-python.git

Generate with copier:

copier copy --trust [-r BRANCH-NAME] https://github.com/usnistgov/cookiecutter-nist-python.git destination/path

As the template uses jinja2, you’ll need the --trust flag using copier.