Skip to content

Latest commit

 

History

History
104 lines (62 loc) · 3.92 KB

File metadata and controls

104 lines (62 loc) · 3.92 KB

Contributing to docTR

Everything you need to know to contribute efficiently to the project.

Codebase structure

  • doctr - The package codebase
  • test - Python unit tests
  • docs - Library documentation building
  • scripts - Example scripts
  • references - Reference training scripts
  • demo - Small demo app to showcase docTR capabilities
  • api - A minimal template to deploy an API with docTR

Continuous Integration

This project uses the following integrations to ensure proper codebase maintenance:

As a contributor, you will only have to ensure coverage of your code by adding appropriate unit testing of your code.

Feedback

Feature requests & bug report

Whether you encountered a problem, or you have a feature suggestion, your input has value and can be used by contributors to reference it in their developments. For this purpose, we advise you to use Github issues.

First, check whether the topic wasn't already covered in an open / closed issue. If not, feel free to open a new one! When doing so, use issue templates whenever possible and provide enough information for other contributors to jump in.

Questions

If you are wondering how to do something with docTR, or a more general question, you should consider checking out Github discussions. See it as a Q&A forum, or the docTR-specific StackOverflow!

Developing docTR

Commits

  • Code: ensure to provide docstrings to your Python code. In doing so, please follow Google-style so it can ease the process of documentation later.
  • Commit message: please follow Udacity guide

Running CI verifications locally

Unit tests

In order to run the same unit tests as the CI workflows, you can run unittests locally:

USE_TF='1' pytest test/ --ignore test/pytorch

for TensorFlow,

USE_TORCH='1' pytest test/ --ignore test/tensorflow

for PyTorch.

Lint verification

To ensure that your incoming PR complies with the lint settings, you need to install flake8 and run the following command from the repository's root folder:

flake8 ./

This will read the .flake8 setting file and let you know whether your commits need some adjustments.

Annotation typing

Additionally, to catch type-related issues and have a cleaner codebase, annotation typing are expected. After installing mypy, you can run the verifications as follows:

mypy --config-file mypy.ini doctr/

The mypy.ini file will be read to check your typing.

Modifying the documentation

In order to check locally your modifications to the documentation:

  • install docTR
  • install dependencies specific to documentation with:
pip install -r docs/requirements.txt
  • build the documentation
sphinx-build docs/source docs/_build -a
  • you can now open your local version of the documentation located at docs/_build/index.html in your browser

Let's connect

Should you wish to connect somewhere else than on GitHub, feel free to join us on Slack, where you will find a #doctr channel!