Contributing to pytd¶
Code Formatting and Testing¶
We use black and isort as a formatter, and flake8 as a linter. Our CI checks format with them.
Note that black requires Python 3.6+ while pytd supports 3.5+, so you must need to have Python 3.6+ for development.
We highly recommend you to introduce pre-commit to ensure your commit follows required format.
You can install pre-commit as follows:
pip install pre-commit
pre-commit install
Now, black, isort, and flake8 will check each time you commit changes.
You can skip these check with git commit --no-verify
.
If you want to check code format manually, you can install them as follows:
pip install black isort flake8
Then, you can run those tool manually;
black pytd
flake8 pytd
isort
You can run formatter, linter, and test by using nox as the following:
pip install nox # You should install at the first time
nox
Documenting¶
pip install -r doc/requirements.txt
Edit contents in doc/
:
cd doc
Build HTML files to render Sphinx documentation:
make html
The doc/
folder is monitored and automatically published by Read the Docs.