Skip to content

Latest commit

 

History

History
107 lines (76 loc) · 4.15 KB

CONTRIBUTING.md

File metadata and controls

107 lines (76 loc) · 4.15 KB

Contributing

This project is based on Geronimo-iaa's Python Template. This is a cookiecutter template for a typical Python library following modern packaging conventions. It utilizes popular libraries to fully automate all development and deployment tasks.

Setup

Requirements

You will need:

Make Installation

A powerfull tool:

Pyenv Installation

Pyenv will manage all our python version. Follow https://github.com/pyenv/pyenv#installation

Python Installation

Do:

$ pyenv install 3.8

Poetry will manage our dependencies and create our virtual environment for us.

Make Target list

Name Comment
make install Install project dependencies
make configure Configure poetry
make tag Create and push a tag based on current project version. This will launch github release action.
make next-patch-version Increment patch version of the project.

Poe Target list

Name Comment
poetry poe types Run the type checker
poetry poe lint Run linting tools on the code base
poetry poe style Validate black code style
poetry poe test Run unit tests
poetry poe check Run all checks on the code base
poetry poe build Builds module
poetry poe publish Publishes the package
poetry poe docs Builds site documentation.
poetry poe docs-publish Build and publish site documentation.
poetry poe clean Delete all generated and temporary files
poetry poe requirements Generate requirements.txt

You could retrieve those commands with poetry poe. It will output something like this :

Usage:
  poetry poe [global options] task [task arguments]

Global options:
  -h, --help            Show this help page and exit
  --version             Print the version and exit
  -v, --verbose         Increase command output (repeatable)
  -q, --quiet           Decrease command output (repeatable)
  -d, --dry-run         Print the task contents but don't actually run it
  -C PATH, --directory PATH
                        Specify where to find the pyproject.toml
  -e EXECUTOR, --executor EXECUTOR
                        Override the default task executor
  --ansi                Force enable ANSI output
  --no-ansi             Force disable ANSI output

Configured tasks:
  types                 Run the type checker
  lint                  Run linting tools on the code base
  style                 Validate black code style
  test                  Run unit tests
  check                 Run all checks on the code base
  build                 Build module
  publish               Publish module
  docs                  Build site documentation
  docs-publish          Publish site documentation
  clean                 Remove all generated and temporary files
  requirements          Generate requirements.txt