Suggesting changes to the code

Suggestions for improvements are very welcome. Use the GitHub issue tracker or submit a pull request.

Pull request

To set up an environment for developing and submitting a pull request:

  • Install Python 3.11, 3.12, 3.13 and 3.14, for example with pyenv. The tox tests run on all of them, and the documentation needs Python 3.12 or newer.

  • On Linux and macOS:
    • Install Poetry : Run : curl -sSL https://install.python-poetry.org | python3 -

    • On macOS: update PATH environment variable in your ~/.zshrc init file: export PATH="/Users/username/.local/bin:$PATH" such that Zsh can find the poetry command

  • On Windows (PowerShell):
    • Install Poetry : (Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py -

    • Update PATH to include the installation folder, e.g. C:\Users\username\AppData\Roaming\Python\Scripts

  • Then, from the root directory of this repository:
    • run poetry install to install development dependencies into a virtual environment

    • run eval $(poetry env activate) to activate the virtual environment (Poetry 2 removed the poetry shell command)

    • run make test to run the test suite

    • run pre-commit install to install the pre-commit hooks

    • run make coverage to run unit tests and generate coverage report

    • run make tox to run the test suite with multiple Python versions

    • run make ruff-check to check the code with ruff

    • run make mypy to check the code with mypy