Koordinates welcomes bug reports and contributions by the community to this module. This process is intended to be as easy as possible for both contributors and the Koordinates development team.
The client includes a suite of unit and functional tests. These should be used to verify that your changes don’t break existing functionality, and that compatibility is maintained across supported Python versions. Tests run automatically on CircleCI for branch commits and pull requests.
To run the tests you need to:
$ pip install -r requirements.txt $ tox
All patches should be sent as a pull request on GitHub, including tests and documentation where needed. If you’re fixing a bug or making a large change the patch must include test coverage before it will be merged.
If you’re uncertain about how to write tests, take a look at some existing tests that are similar to the code you’re changing.
This guide describes the process to release a new version of the library. In this example,
v0.0.0. The library follows the Semantic Versioning guidelines, so select major, minor, and patch version numbers appropriately.
Close or update all tickets for the next milestone on Github..
Update the minimum required versions of dependencies in
setup.py. Update the exact version of all entries in
Run tox from the project root. All tests for all supported Python versions must pass:
$ tox [...] ________ summary ________ py27: commands succeeded py34: commands succeeded congratulations :)
Tox will use the
requirements.txtto setup the virtualenvs, so make sure you’ve updated it.
Build the Sphinx docs. Make sure there are no errors and undefined references.
$ make clean docs
Check the CircleCI build is passing.
Update the version number in
$ git commit -m 'Version 0.0.0 release' koordinates/__init__.py
Don’t tag and push the changes yet so that you can safely rollback if you need change something!
Create a draft release in Github with a list of changes, acknowledgements, etc.
Build and release¶
Test the release process. Build a source distribution and test it:
$ python setup.py sdist $ ls dist/ koordinates-0.0.0.tar.gz
Try installing them:
$ rm -rf /tmp/koordinates-sdist # ensure clean state $ virtualenv /tmp/koordinates-sdist $ /tmp/koordinates-sdist/bin/pip install dist/koordinates-0.0.0.tar.gz $ /tmp/koordinates-sdist/bin/python >>> import koordinates >>> koordinates.__version__ '0.0.0'
Create or check your accounts for the test server <https://testpypi.python.org/pypi> and PyPI. Update your
~/.pypircwith your credentials:
[distutils] index-servers = pypi test [test] repository = https://testpypi.python.org/pypi username = <test username> password = <test password> [pypi] repository = http://pypi.python.org/pypi username = <production username> password = <production password>
Upload the distributions for the new version to the test server and test the installation again:
$ python setup.py register -r test $ python setup.py sdist upload -r test $ rm -rf /tmp/koordinates-sdist # ensure clean state $ virtualenv /tmp/koordinates-sdist $ /tmp/koordinates-sdist/bin/pip install -i https://testpypi.python.org/pypi --extra-index-url https://pypi.python.org/pypi koordinates
Check if the package is displayed correctly: https://testpypi.python.org/pypi/koordinates
Upload the package to PyPI and test its installation one last time:
$ python setup.py register -r pypi $ python setup.py sdist upload -r pypi $ rm -rf /tmp/koordinates-sdist # ensure clean state $ virtualenv /tmp/koordinates-sdist $ pip install -U koordinates
Check the package is displayed correctly: https://pypi.python.org/pypi/koordinates
Push your changes:
$ git tag -a v0.0.0 -m "Version 0.0.0" $ git push origin v0.0.0
Activate the documentation build for the new version.
Make the Github release public.
Update related Zendesk pages if necessary.