JoseAngelMartinB / cookiecutter-pypackage

Cookiecutter template

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cookiecutter Python Package Template

Cookiecutter template.

This template is a fork of the template used by the Arup's City Modelling Lab Python projects and based on @audreyfeldroy's original cookiecutter template. It has been updated to use latest Python Package best practices.

Features

  • Testing setup with pytest.
  • Markdown based documentation, using mkdocs, ready for generation with GitHub pages.
  • Project metadata and plugin configuration specified in a pyproject.toml file, according to the latest standards.
  • Auto-release to your private conda channel when you create a new release on GitHub (optional).
  • Command line interface using click (optional).

Quickstart

To be able to keep your project up-tp-date as changes are made to the template, we recommend you use Cruft, which is fully compatible with Cookiecutter. First, install the latest version of Cruft if you haven't installed it yet.

    conda create -n cookiecutter cruft
    conda activate cookiecutter

Generate a local Python package project in a directory of your choice (change my-repositories to the relevant location on your device):

    cd my-repositories
    cruft create https://github.com/JoseAngelMartinB/cookiecutter-pypackage

Then:

  • Add the packages you will need for your project and their versions to requirements/base.txt.
  • initialise your project as a git repository and link it to an online repository.

For more details, see the tutorial.

Keeping your project up-to-date

We may make changes to this template that you want to pull into your project after you have created it. Cruft allows you to do this, and one of your project's CI workflows will verify whether there are new template updates that you might like to merge in.

To check if there are updates:

    cruft check

To apply updates:

    cruft update

Fork This / Create Your Own

If you have differences in your preferred setup, you can fork this to create your own version. Or you create your own; it doesn't strictly have to be a fork.

About

Cookiecutter template

License:MIT License


Languages

Language:Python 90.8%Language:HTML 4.1%Language:Jupyter Notebook 2.7%Language:Dockerfile 2.3%