Contributing Guide

GitHub Issues GitHub Pull Requests Code Style: Black License Contributor Covenant

Happy baking!

Set up development environment

git clone https://github.com/font-bakers/glaze.git
cd glaze/
make develop
source venv/bin/activate
# Do your work...
deactivate

Before committing

make check

This will both lint the glaze/ directory (with black and pylint), and run test scripts. You may lint and test separately with make lint and make test, respectively.

Make sure that all checks pass before committing: you should get several blue success messages as each check passes.

Note that glaze uses a pre-commit git hook to format staged Python files in-place using black.

Packaging and releasing glaze

First, ensure that the version number has been bumped appropriately:glaze adopts the Semantic Versioning 2.0.0 specification. This can be done either by running

bumpversion --current-version CURRENT_VERSION PART glaze/__init__.py

or by directly editing the __version__ variable in glaze/__init__.py (the latter method is simpler and recommended for such a simple project as glaze). For more information, see the bumpversion documentation.

Then, run make package. It will package glaze and validate the resulting source archive and built distribution.

Finally, upload the source archive and build distribution to PyPI. You will be asked for a username and password for PyPI.

twine upload dist/*

For more information, refer to the Python packaging documentation.

Miscellaneous development details

  • glaze adopts the Semantic Versioning 2.0.0 specification.

  • glaze targets Python 3.5+ (specifically, 3.5.2+) compatibility.

  • glaze uses black and pylint to format and lint code, respectively.

  • However, black requires Python 3.6+ to run. Thus, we test in Python 3.5 but lint in Python 3.6. See our Travis configuration for more details.

  • glaze is unit tested through pytest, and integration tested through the test_cli.sh script.

  • The glaze documentation is generated using mkdocs. See the mkdocs.yml configuration for more details.