Skip to content

Latest commit

 

History

History
54 lines (35 loc) · 1.32 KB

CONTRIBUTE.md

File metadata and controls

54 lines (35 loc) · 1.32 KB

Contributions guidlines

Contributions are warmly welcomed! Please, follow the steps below to create a pull request to add new features.

1. Install dependecies

You will need to install additional dependencies to compile the documentation, to run the tests and the pre-commits:

pip install -e .[dev]

1.1 Set up pre-commit hooks

We use pre-commit hooks to ensure code quality and consistency. Install the pre-commit hooks with:

pre-commit install

2. Add new code

  • Fork the repository and create a new branch.
  • On the new branch, add the code for a new feature or bugfix.

3. Documentation

  • If you are adding a new method or changing/extending and existing one with new features, make sure to document it docstring of the class/method.
  • Build the documentation via:
cd docs
make clean html
  • To check the documentation you built, open docs/build/index.html.

4. Tests

  • Create new tests to cover the new code that you added.
  • Run the tests
pytest --cov=tgp --cov-report=term-missing --cov-report=html
  • Check the code coverage report to see if all the code is covered and correctly executed.
  • If you are using VSCode, go on Testing, select pytests and /testsas the target folder.

5. Pull request

  • Create a PR on Github.
  • Describe your changes in detail.