-
Notifications
You must be signed in to change notification settings - Fork 0
Deploying CIL Data Util
This page describes the deployment process for D3R onto nif1.
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
Now update the cildata_util/init.py and setup.py with a new version. Omit the v when setting the version. To make this easier a make target has been setup named updateversion This target will prompt for a new version as seen below:
make updateversion
Current (1.2.0) enter new version: 1.3.0
Updating setup.py & cildata_util/__init__.py with new version: 1.3.0
Updated setup.py: version='1.3.0',
Updated cildata_util/__init__.py: __version__ = '1.3.0'
Commit the above changes and push to master:
git commit -m 'message...' cildata_util/__init__.py setup.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 cildata_util source tree generate the wheel and tar.gz files
make dist
Under dist/ will be files such as these:
$ tree
dist
|-- cildata_util-1.3.2-py2.py3-none-any.whl
`-- cildata_util-1.3.2.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/CRBS/cildata_util 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/cildata_util 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 cildata_util
cildatathumbnailcreator.py --version
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
Now test it by running this on a local machine:
sudo pip install cildata_util
cildatathumbnailcreator.py --version
Send an email about the release to the CIL team (should be able to paste the release notes set earlier)
Template email:
Subject:
Version <VERSION ie 1.6.0> of cildata_util released
Body:
Hi all,
CIL Data Util <VERSION ie 1.6.0> has been released onto <HOST> with the following changes made by <DEVELOPERS>:
<Put github url for release ie https://github.com/CRBS/cildata_util/releases/tag/v0.1.0>
<COPY CHANGES NOTED IN RELEASE FROM HISTORY.rst FILE>