Skip to content

Latest commit

 

History

History
56 lines (38 loc) · 2.47 KB

README-developers.md

File metadata and controls

56 lines (38 loc) · 2.47 KB
  • Note: pandoc must be installed before this works. You can install with brew or apt-get or yum.

This section is only relevant for project maintainers. In order to release you must have a pypi account and be a "maintainer" on the ontobio project

To create a new release, do the following:

Release Instructions -- Makefile

  1. Ensure you're on master and up to date. Ensure also that twine is installed (pip install twine)

I always do this in my virtual environment activated

  1. Obeying Semantic Versioning (https://semver.org/) bump the version number in ontobio/ontobio/__init__.py at the __version__ variable.

At this point you should have one modified file, saved: ontobio/ontobio/__init__.py. You can check with git diff and/or git status.

  1. Run the make relase target
    $ make USER=sauron release
    

where the USER should be set to your pypi.org username.

This will perform all the steps outlined in the below manual release section.

  1. pypi will ask for your password. (You may also setup credentials with pypi, but that's now how the author who is writing this documentation has it setup.)

Failure

If at any point this fails (wrong password, master is not updated, etc) you will have to just perform the steps manually as outlined in the below section.

Likely you will not be able to just rerun the release as the git portion of the release is not idempotent. Just note where you had an error and continue the steps corrected manually. I usually use the the Makefile as a direct reference if a command fails.

Release instructions -- Manual

  1. First check whether the __version__ in ontobio/__init__.py matches with the latest tag or PyPI release. If the version is the same then you need to bump the version to make a new release. Follow semantic versioning guidelines to decide whether the bump in version is major or minor.

  2. If you did bump the version then run the following commands:

TAG=v`python setup.py --version`
git add ontobio/__init__.py
git commit --message="Upgrade to $TAG"
git push
git tag --annotate $TAG --message="Upgrade to $TAG"
git push --tags
  1. Releasing on PyPI

To ensure this is successful, make sure you have relevant permissions to Ontobio package on PyPI

Run the following commands:

make cleandist
python setup.py sdist bdist_wheel bdist_egg
twine upload --repository-url https://upload.pypi.org/legacy/ --username PYPI_USERNAME dist/*