Skip to content

Latest commit

 

History

History
91 lines (72 loc) · 4.47 KB

how_to_release_a_version.md

File metadata and controls

91 lines (72 loc) · 4.47 KB

Releasing a New Version

PyPI Package Creation and Updating

Note these instructions are for maintainers only.

First, read this Packaging and Distributing Projects guide.

It's also worth noting that while this should be done on the pypi test site, I've run into a great deal of trouble with conflicting guides authenticating to the test site. So be smart about this.

  1. Build a source distribution: from python3 (ran in windows anaconda python 3) run python setup.py sdist
  2. Register the package by using theform on pypi. Upload your PKG-INFO that was generated inside the .egg file.
  3. Upload the package using twine
    • twine upload dist/healthcareai-<version>.tar.gz
    • NOTE You can only ever upload a file name once. To get around this I was adding a rc number to the version in setup.py. However, this will break the appveyor build, so you'll need to remove the .rc before you push to github.
  4. Verify install on all three platforms (linux, macOS, windows) by:
    1. pip uninstall healthcareai
    2. pip install healthcareai
    3. From a python console, type from healthcareai import SupervisedModelTrainer

Release process (Including Read The Docs)

  1. update all version numbers
    • setup.py
  2. update CHANGELOG
    • Move all items under unreleased to a new release number
    • Leave the template under unreleased
  3. merge in the PR
  4. create release on github releases (making sure this matches the release number in setup.py)
  5. Create and upload the new pypi release (see above)
  6. update readthedocs settings
    • Admin > Versions
    • Ensure that the new release number is checked for public
  7. Manually build new read the docs
    • Builds > Build version
  8. verify the new version builds and is viewable at the public url
  9. Verify the DOI links and badges on zenodo

Conda Packaging and Distribution

Creating a conda package is much easier if you have already built the PyPI package.

  1. Install prerequisites (only needed once)
    • Install conda build conda install conda-build
    • Install anaconda cli conda install anaconda-client
    • Login to anaconda.org with anaconda login
  2. Configure conda
    • conda config --set always_yes true
    • conda config --set anaconda_upload no
  3. Create the skeleton conda recipe from the existing PyPI package
    • conda skeleton pypi healthcareai
  4. Build the conda package for the main python versions
    • conda build --python 2.7 healthcareai
    • conda build --python 3.4 healthcareai
    • conda build --python 3.5 healthcareai
    • conda build --python 3.6 healthcareai
  5. Convert the existing builds to work on all platforms (win32, win64, osx62, linux32, linux64). Note this can take a while.
    • conda convert --platform all win-64/healthcareai-*-py*.tar.bz2 -o <PATH_TO_BUILD_DIRECTORY>
  6. Upload to anaconda using the anaconda cli
    • Note that you'll have to keep track of where the builds are put!
    • anaconda upload <PATH_TO_BUILD_DIRECTORY>/**/healthcareai*.tar.bz2
  7. Clean up the mess
    • conda build purge
Helpful Resources

Sphinx Progress

Ideally, this project will have a user guide, (currently in the form of the docs folder) and method level documentation generated by sphinx.

  1. Install sphinx
  2. install

From the dox/_build (you may need to create it if it doesn't exist) directory, runsphinx-apidoc.exe -f -o ../ ../../healthcareai && sphinx-build.exe -b html ../ ./ && python -m http.server 8888 --bind 127.0.0.1

Sphinx resources