Creating a new release

This is an advanced developer section that describes creation of a new release for cellmaps_ppi_embedding and deploying that release onto PyPi




Releases should be done from main_ branch


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.

To just run tests:

make test

All tests should pass

make lint

Lint should not complain


To run tests that exercise the enter package see Integration testing

Committing code

Before doing a release, the code must be assigned a new Versioning Scheme

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


Versions should adhere to this Versioning Scheme

Be sure to update the version in cellmaps_ppi_embedding/ Omit the v when setting the version in the file.

Commit the above changes and push to main:

git commit -m 'message...' cellmaps_ppi_embedding/
git push origin main

Tagging code

Now tag source with version:

git tag -a v0.4.0 -m 'Information describing release'

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.

Create distributable binaries

From cellmaps_ppi_embedding source tree generate the wheel and tar.gz files

make dist

Under dist/ will be files such as these:

$ tree
|-- cellmaps_ppi_embedding-0.1.0-py2.py3-none-any.whl
`-- cellmaps_ppi_embedding-0.1.0.tar.gz

Documenting release on Github

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

  1. From click on releases link.

  2. Click on the Draft a new release button.

  3. In the Tag version field select the version set above.

  4. Enter a release title and describe changes in release copying notes put into HISTORY.rst.

  5. Attach distributable binaries created above to release via the Attach binaries link on the page.

  6. Click publish release.

  7. Deploy to test pypi

  8. First deploy to pypi test server by running this:

    make testrelease


    The above requires one to have accounts on Test PyPI serverand a credential file setup in your home directory. See Expected configuration for .pypirc file for more information.

Once the above is done verify deploy was successful by browsing to and verifying new release was deployed.

Also test the package by installing it locally by running this:

pip install -i cellmaps_ppi_embedding


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.

Deploy to PyPi

If the above works perform the formal release by running:

make release


The above requires one to have accounts on PyPi server and a credential file setup in your home directory. See Expected configuration for .pypirc file for more information.

pip install cellmaps_ppi_embedding