Releasing a new version of WebbPSF

Prerequisites

  • Is the build passing on Travis?
  • Are you up to date with master on the upstream branch (mperrin/webbpsf)?
  • Do you have twine installed?
  • Do you have access to WebbPSF on PyPI with the owner or maintainer role?
  • Do you have your ~/.pypirc filled out? (more info)

Releasing new data packages

  1. Run dev_utils/make-data-sdist.sh (details below) to make a gzipped tarred archive of the WebbPSF data
  2. If the new data package is required (meaning you can’t run WebbPSF without it, or you can run but may get incorrect results), you must bump DATA_VERSION_MIN in __init__.py to (0, X, Y)
  3. Extract the resulting data archive and check that you can run the WebbPSF tests with WEBBPSF_PATH pointing to it
  4. Copy the data archive into public web space
  5. Update the link in installation.rst under Installing the Required Data Files

Invoke dev_utils/make-data-sdist.sh one of the following ways to make a gzipped tarred archive of the WebbPSF data suitable for distribution.

If you are on the Institute network:

$ cd webbpsf/dev_utils/
$ ./make-data-sdist.sh 0.X.Y
$ cp ./webbpsf-data-0.X.Y.tar.gz /path/to/public/web/directory/

If you’re working from a local data root:

$ cd webbpsf/dev_utils/
$ DATAROOT="/Users/you/webbpsf-data-sources/" ./make-data-sdist.sh 0.X.Y
$ cp ./webbpsf-data-0.X.Y.tar.gz /where/ever/you/want/

Releasing new versions on PyPI

  1. Edit relnotes.rst to add a release date and reference anchor (e.g. .. _rel0.X.Y:) to the section for this release
  2. Update the link to “What’s new” in index.rst
  3. Add any important notes to the appropriate section in the release notes
  4. Edit setup.py in this repository to remove .dev from the version number in the VERSION variable
  5. Build a source distribution with python setup.py build sdist
  6. Copy the resulting file (webbpsf-0.X.Y.tar.gz) to a new folder, extract it, and cd there
  7. Run python setup.py test (preferably in a new virtualenv containing only the WebbPSF dependencies) and verify that the test suite passes with the code you’re about to release
  8. If that runs as expected, cd back to your webbpsf repository and run twine upload dist/webbpsf-0.X.Y.tar.gz for your new version
  9. Verify that the latest version is visible and others are hidden on the PyPI package editing page

Uploading updated docs

  1. On the same PyPI package editing page, there is a field for uploading updated documentation, so keep that window open.
  2. In your terminal, cd to webbpsf/docs and run make html
  3. cd _build/html
  4. Build a zip file for upload: zip -r docs-to-upload.zip ./*
  5. Choose the new zip file from the file field on the PyPI package editing page and click “Upload Documentation”

Finishing the release

  1. Commit your edits to relnotes.rst and setup.py
  2. Tag that commit as the release with git tag v0.X.Y and push the tags to origin and upstream with git push --tags origin and git push --tags upstream
  3. Edit setup.py to increment the version number in the VERSION variable and re-add the .dev suffix
  4. Edit relnotes.rst to add a new heading for the upcoming version
  5. Commit your edits with a message like “Back to development: version 0.X.Y+1”
  6. Email an announcement to webbpsf-users@stsci.edu

Releasing a new version through AstroConda

To test that an Astroconda package builds, you will need conda-build:

$ conda install conda-build
  1. Fork (if needed) and clone https://github.com/astroconda/astroconda-contrib
  2. If there is a new version of POPPY available to package, edit poppy/meta.yaml to reflect the new version and git_tag.
  3. If the minimum needed version of the webbpsf-data package has changed in webbpsf/__init__.py, edit webbpsf-data/meta.yaml to reflect the new version and url.
  4. Edit webbpsf/meta.yaml to reflect the new versions of POPPY and webbpsf-data, if necessary.
  5. Edit in the git_tag name from git tag in the PyPI release instructions (v0.X.Y).
  6. Verify that you can build the package from the astroconda-contrib directory: conda build -c http://ssb.stsci.edu/astroconda webbpsf
  7. Commit your changes to a new branch and push to GitHub.
  8. Create a pull request against astroconda/astroconda-contrib.
  9. Wait for SSB to build the conda packages.
  10. (optional) Create a new conda environment to test the package installation following these instructions.