Contributing

Many thanks for taking the time to contribute to trident if you are reading this!

Writing Documentation

Each Pull Request is required to document the contribution adequately in markup or docstrings.

  • trident's documentation is written in reStructuredText (rst) and can be found in the docs/source folder of the repo.

  • The Python docstrings follow the Google Python Style Guide like projects such as Huggingface transformers.

  • The docgen action will then auto-generate the documentation pages with Sphinx (also a great reference on how to write idiomatic docs)

Once you have written the relevant documentation you can preview your changes locally as follows.

# in project folder
conda env create -f .docgen-env.yaml
conda activate sphinx
cd docs
sphinx-apidoc -o ./source ../ -f
sphinx-build ./source/ ./build/

At last, you can open either docs/build/ the entire documentation at once or docs/build/readme.html or the landing page with your preferred browser, e.g.

# in docs
chromium ./build
chromium ./build/readme.html

Opening a PR

  1. Fork the Project

  2. Create your Feature Branch (git checkout -b my_contribution)

  3. Make your changes

  4. Stage and commit your Changes (git add -u && git commit -m 'Add my contribution')

  5. Push to the Branch (git push origin my_contribution)

  6. Open a Pull Request by going to the project webpage; it’ll then suggest to you to open a PR on trident