Contributing to pytd¶
Code Formatting and Testing¶
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
pip install .[doc]
Edit contents in
Build HTML files to render Sphinx documentation:
doc/ folder is monitored and automatically published by Read the Docs.
Update version in
pytd/version.py. Set it to
1.0.0, for example:
__version__ = "1.0.0"
Commit and push the latest code, and tag the version:
git tag 1.0.0 git push --tags
Build a package and upload to PyPI:
python setup.py sdist bdist_wheel twine upload --skip-existing dist/*