Skip to content

Contributing

Pull Requests

  • Limit each pull request to one idea only.
  • Pull requests branches will be squashed and rebased on top of master.
  • Always add tests and docs for your code.
  • No contribution is too small! Please submit as many fixes for typos and grammar bloopers as you can!
  • Make sure your changes pass the CI checks.
  • Once you've addressed review feedback, make sure to bump the pull request with a short note.

Developer Setup

A few nuggets of information about the project:

  • This is a Python project.
  • Depenedencies are managed with poetry. Install the project with poetry install.
  • Tests can be run with python -m pytest.
  • Docs can be built with mkdocs build (or, rebuilt continuously with a development server with mkdocs serve).
  • Formatting should be done with black and isort. There's a Makefile target to do both with make format.
  • Code should yield no mypy or flake8 errors. Run make check to check for that.
  • You can run pre-commit checks by install the hook with pre-commit install.

Releasing

  1. Bump the version in the pyproject.toml. It can be done manually or with Poetry's version command:

    # for example, to bump the patch part...
    poetry version patch
    
  2. Create a git tag for that version, prefixing the version with a v character:

    git tag -a "v1.2.3" -m "Release v1.2.3"
    
  3. Push the tag to GitHub and let the CI workflow do the rest:

    git push
    

    Note

    The v version prefix signals to the CI script that this push should also be published to PyPI.