Contribution#

Contributor guide#

If you find peppr helpful, but still see room for improvement or features to be added, we welcome you to contribute to the project! The Github repository is the central point where all development and discussion takes place. This document aims to introduce you to the general development guidelines.

Environment#

For the complete development workflow, additional tools are required as described in the next sections. To install peppr in editable mode together with all of these extra dependencies, run

$ pip install -e ".[lint,tests,docs]"

Code style#

peppr is compliant with PEP 8 and uses Ruff for code formatting and linting. The maximum line length is 88 characters. An exception is made for docstring lines, if it is not possible to use a maximum of 88 characters (e.g. tables and parameter type descriptions). To make code changes ready for a pull request, simply run

$ ruff format
$ ruff check --fix

and fix the remaining linter complaints.

Testing#

peppr uses Pytest to test its code base. Tests are located in the tests/ directory and are run with

$ pytest

Documentation#

The documentation is written in reStructuredText and built with Sphinx.

The documentation is built with

$ sphinx-build docs build/docs

In addition to the .rst documents in the docs/ directory, the most important information are the docstrings of each public function and class. peppr uses the numpydoc format for all of its docstrings. To validate correct formatting, run

$ numpydoc lint src/peppr/**/*.py

If you add a new function or class, do not forget to add it to the corresponding autosummary section in docs/api.rst.