Contributing to ocrpy#
All you need to know to contribute to ocrpy, effectively.
Codebase structure#
Ocrpy codebase on github: Ocrpy Codebase
Python unit tests: Tests
Ocrpy documentation: Docs
Ocrpy tutorials: Notebooks
Continuous Integration#
This project uses the following integrations to ensure proper codebase maintenance:
Run jobs for package build and coverage: Github Worklow
Reports back coverage results: Codecov
As a contributor, please ensure that you write unit tests for your code and run coverage tests for your code before submitting a pull request.
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.Please submit them at 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 ocrpy, or a more general question, you should consider checking out Github discussions at Github Discussions
Developing ocrpy#
Developer mode installation#
Install all additional dependencies with the following command:
pip install -e .[dev]
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
Unit tests#
In order to run the same unit tests as the CI workflows, you can run unittests locally:
make test
Code Quality#
To run all quality checks together
make quality
Linting#
To ensure that your incoming PR complies with the lint settings, you need to install black and run the following command from the repository’s root folder:
black ./
Import format#
In order to ensure there is a common import order convention, run isort as follows:
isort **/*.py
This will reorder the imports of your local files.
Type Annotations#
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 ocrpy/
The mypy.ini file will be read to check your typing.
Docstring format#
Please follow Google style for docstrings which can be found over here: Google-style
Modifying the documentation#
In order to check locally your modifications to the documentation:
cd docs
make clean html
``` 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 reach out to us at info@maxentlabs.com