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.
- Build a source distribution: from python3 (ran in windows anaconda python 3) run
python setup.py sdist
- Register the package by using theform on pypi.
Upload your
PKG-INFO
that was generated inside the.egg
file. - 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.
- Verify install on all three platforms (linux, macOS, windows) by:
pip uninstall healthcareai
pip install healthcareai
- From a python console, type
from healthcareai import SupervisedModelTrainer
- update all version numbers
setup.py
- update CHANGELOG
- Move all items under unreleased to a new release number
- Leave the template under unreleased
- merge in the PR
- create release on github releases (making sure this matches the release number in
setup.py
) - Create and upload the new pypi release (see above)
- update readthedocs settings
- Admin > Versions
- Ensure that the new release number is checked for public
- Manually build new read the docs
- Builds > Build version
- verify the new version builds and is viewable at the public url
- Verify the DOI links and badges on zenodo
Creating a conda package is much easier if you have already built the PyPI package.
- 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
- Install conda build
- Configure conda
conda config --set always_yes true
conda config --set anaconda_upload no
- Create the skeleton conda recipe from the existing PyPI package
conda skeleton pypi healthcareai
- 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
- 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>
- 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
- Clean up the mess
conda build purge
- Conda Building Packages
- Anaconda.org dashboard
- Taken from the excellent conda.io docs
- Also, some taken from this Travis CI build#
Ideally, this project will have a user guide, (currently in the form of the docs folder) and method level documentation generated by sphinx.
- Install sphinx
- 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