-
Notifications
You must be signed in to change notification settings - Fork 6
Creating a new release
This page describes creation of a new release for NetColoc
NOTE: THESE INSTRUCTIONS ARE FOR DOING A RELEASE ONLY AND NOT FOR REGULAR COMMITS
Before deploy verify code is working by invoking:
make coverage
The above command runs the unit tests and calculates code coverage of the unit tests.
make test
All tests should pass
make lint
Lint should not complain
Before doing a release, the code must be assigned a new version, committed to github, and tagged in the github repo.
First run git tag to find the latest version. Pick the next highest version number. The tags in github start with v because versions cannot start with numeric value.
git tag example:
$ git tag
v0.2.0
v0.3.0
v0.4.0
NOTE: Versions should adhere to this scheme
Be sure to update the version
in netcoloc/__init__.py. Omit the v when setting the version in the file.
Commit the above changes and push to master:
git commit -m 'message...' netcoloc/__init__.py
git push origin master
Now tag source with version:
git tag -a v0.4.0 -m 'Information describing release'
Don't worry if you screw up you can add commit more changes, push those changes and then perform git tag adding -f flag for change the tag (Warning: don't do this if you have pushed the tag which is the next step)
Push the tag to github:
git push origin v0.4.0
Verify unit tests pass on travis
Click on this link travis and verify unit tests are passing for the new version committed in the previous step. If not fix issues and start over at the top.
The tag should be visible from github now. If not something is wrong.
From NetColoc source tree generate the wheel and tar.gz files
make dist
Under dist/ will be files such as these:
$ tree
dist
|-- netcoloc-0.1.0-py2.py3-none-any.whl
`-- netcoloc-0.1.0.tar.gz
Be sure to add release notes to HISTORY.rst file in source tree and be sure the text is in restructured text format otherwise it will fail to install on PyPI. To check text paste it into this site
- From https://github.com/ucsd-ccbb/NetColoc click on releases link.
- Click on the Draft a new release button.
- In the Tag version field select the version set above.
- Enter a release title and describe changes in release copying notes put into HISTORY.rst.
- Attach distributable binaries created above to release via the Attach binaries link on the page.
- Click publish release.
First deploy to pypi test server by running this:
make testrelease
NOTE: The above requires one to have accounts on Test PyPI server. Click here for more information
Once the above is done verify deploy was successful by browsing to https://testpypi.python.org/pypi/netcoloc and verifying new release was deployed.
Also test the package by installing it locally by running this:
sudo pip install -i https://testpypi.python.org/pypi netcoloc
NOTE: If there is a problem a new version will need to be tagged in source tree cause pypi does not allow updating of deployed versions.
If the above works perform the formal release by running:
make release
NOTE: The above requires one to have accounts on PyPI server. Click here for more information
sudo pip install netcoloc