Skip to content

Latest commit

 

History

History
39 lines (33 loc) · 2.93 KB

README.md

File metadata and controls

39 lines (33 loc) · 2.93 KB

Template repository for Python packages

Repository using Cookiecutter for project templates.

Installation

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.

Usage

To use this repository with cookiecutter you can call:

cookiecutter gh:scientificcomputing/generate-python-package

and fill out the list of options.

Options for cookiecutter

The following options are available when using the cookiecutter:

  1. 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.
  2. Email: Will be used in pyproject.toml for package information.
  3. github_username: Will be used to fetch the correct links for the documentation and license badge.
  4. project_name: Used in various headers of the documentation
  5. repository_name: Name of the repository
  6. package_name: Name of the python package.
  7. project_short_description: Using in pyproject.toml
  8. version: The initial version of the software.
  9. linting: Enable linting, i.e. mypy and flake8. This also enables the "Check Formatting" Github action.
  10. testing: Choose testing framework. If not none it creates a test folder with an initial test. Also adds optional installation dependencies to pyproject.toml. Creates a "Test Package" Github action. If pytest-cov is chosen, it adds settings to generate a coverage report and publsuh them as a Github artifact.
  11. use_argparse: Makes it possible to run the package as module_name or python -m module_name with inputs from the command line.
  12. build_docs: Build a webpage with documentation (including a package API).
  13. use_pre_commit: Set up pre-commit hooks that will run some tests every time you make a commit.
  14. docker: Adds a Dockerfile that includes the module (not including optional dependencies). Adds a publishing workflow.
  15. open_source_license: Choose a open source license for your code