Repository using Cookiecutter for project templates.
To use this repository, you need to install cookiecutter. This can be done with pip
python3 -m pip install cookiecutter
For other installation options, see: Cookiecutter installation
You also need to have git
installed on your system, see:
Download git for more information.
To use this repository with cookiecutter you can call:
cookiecutter gh:scientificcomputing/generate-python-package
and fill out the list of options.
The following options are available when using the cookiecutter:
- Full Name: Will appear in the
pyproject.toml
file as the author. Will also be used as author of the documentation generated by jupyter-book. - Email: Will be used in
pyproject.toml
for package information. - github_username: Will be used to fetch the correct links for the documentation and license badge.
- project_name: Used in various headers of the documentation
- repository_name: Name of the repository
- package_name: Name of the python package.
- project_short_description: Using in
pyproject.toml
- version: The initial version of the software.
- linting: Enable linting, i.e. mypy and flake8. This also enables the "Check Formatting" Github action.
- testing: Choose testing framework. If not
none
it creates a test folder with an initial test. Also adds optional installation dependencies topyproject.toml
. Creates a "Test Package" Github action. Ifpytest-cov
is chosen, it adds settings to generate a coverage report and publsuh them as a Github artifact. - use_argparse: Makes it possible to run the package as
module_name
orpython -m module_name
with inputs from the command line. - build_docs: Build a webpage with documentation (including a package API).
- use_pre_commit: Set up pre-commit hooks that will run some tests every time you make a commit.
- docker: Adds a Dockerfile that includes the module (not including optional dependencies). Adds a publishing workflow.
- open_source_license: Choose a open source license for your code