Skip to content

Latest commit

 

History

History
91 lines (52 loc) · 1.64 KB

CONTRIBUTING.rst

File metadata and controls

91 lines (52 loc) · 1.64 KB

Contributing

Pull Requests

When creating a pull request, try to:

  • Write tests if applicable
  • Note important changes in the CHANGES file
  • Update the README file if needed
  • Update the documentation if needed
  • Add yourself to the AUTHORS file

Linting & Pre-commit

This project uses ruff for both linting and auto-formatting code.

This project also uses pre-commit to ensure linters and code formatters are run for all commits. Please install the pre-commit:

$ pip install pre-commit

And then install the pre-commit hooks:

$ pre-commit install

Adding migrations

When you add new models or make changes to models, you'll need to make migrations before the tests will run.

To make migrations you can run:

python runtests.py makemigrations

Testing

To install the package and its dependencies:

$ pip install -e .

Please add tests for your code and ensure existing tests don't break. To run the tests against your code:

$ python runtests.py

Please use tox to test the code against supported Python and Django versions. First install tox:

$ pip install coverage tox

To run tox:

$ tox -p

To run tox and generate a coverage report (in htmlcov directory):

$ make test

Releases

To release to PyPI:

  1. Update the version in pyproject.toml
  2. Run pdm publish