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-test.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-test.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
You will need to install dev dependancies in
requirements-dev.txtto build documentation.
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://test.pypi.org/legacy/ username: <test username> password: <test password> [pypi] username: <production username> password: <production password>
Upload the distributions for the new version to the test server and test the installation again:
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 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