Contribution getting started

Contributions are highly welcomed and appreciated. Every little bit of help counts, so do not hesitate!

Preparing Pull Requests

  1. Fork the repository.

  2. Enable and install pre-commit to ensure style-guides and code checks are followed:

    $ pip install --user pre-commit
    $ pre-commit install
    

    Afterwards pre-commit will run whenever you commit.

    Note that this is automatically done when running tox -e linting.

    https://pre-commit.com/ is a framework for managing and maintaining multi-language pre-commit hooks to ensure code-style and code formatting is consistent.

  3. Install tox:

    tox is used to run all the tests and will automatically setup virtualenvs to run the tests in. Implicitly https://virtualenv.pypa.io/ is used:

    $ pip install tox
    $ tox -e linting,py312
    
  4. Follow PEP 8 for naming and black for formatting.

  5. Add a line item to the current unreleased version in CHANGES.rst, unless the change is trivial.

Resources

Development

  • Test execution count can be retrieved from the execution_count attribute in test item’s object. Example:

    @hookimpl(tryfirst=True)
    def pytest_runtest_makereport(item, call):
        print(item.execution_count)