cookiecutter-nist-python

Repo Docs PyPI license Code style: black

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#

To generate a package using cookiecutter, run:

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

where the optional argument in brackets can be used to specify a specific branch.

Alternatively (and highly recommended) is to use cruft. This allows for the template files to be updated as the template is updated. For this, you can run:

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