Skip to content

Release Instructions

Sergio Rey edited this page Jul 29, 2019 · 13 revisions

Instructions for releasing a PySAL package

PySAL packages use a standard release process that involves two targets:

  • github release
  • pypi release

Following these two releases, updates for the site should be made to pubicize the releaes.

Github release

  1. Enusre all tests are passing
  2. On GitHUB, go to the main page of the repository
  3. Under the repository name, click Releases
  4. Click Draft a new release
  5. On your clone, use tools/gitcount.ipynb to generate the main content of your release notes
  6. Use that content also to update the that is part of your source.
  7. Commit your updated and issue a PR to upstream.
  8. After your PR is merged, Click Publish release on GitHUB.
  9. Move on to do the pypi release

PyPi release

  1. If you have not done so already, register your package on PyPi and TestPyPI
  2. Based on the github release you just completed, download the tarball associated with that release
  3. Unpack the tarball, and cd into the source directory
  4. python sdist
  5. pip install twine
  6. twine upload --repository-url dist/*

Then test, your package locally to see if installation is clean:

  1. pip install --extra-index-url yourpackagename

If all is good, move on and push your package to pypi:

  1. twine upload dist/*
  2. Move on to announce your release to the community.

conda-forge release

(If the package has been set up on conda-forge, you do not need to redo the following procedures. The conda-forge repo will automatically grab and test the new release on pypi/github (whatever you set up) and pin the maintainers.)

First, go to, click on packages at the top, and search for your package to see whether someone has already created a recipe for your package--you may be in luck

  1. On, fork the conda-forge/staged-recipes repository
  2. Clone your fork locally and check out a new branch named after your package
    • e.g. git checkout -b spaghetti
  3. In the recipes directory, duplicate the "example" directory, and rename "example" to the name of your package
  4. Edit the recipe for your package according to the instructions found here. There are three key steps:
    • at the top of the file, change the name and version of the package to match the released versions on github and pypi
    • Go to the package's page on pypi and click "download files" in the left-hand side panel (e.g.
    • click the link for the SHA256 hash which will copy it to the clipboard. Paste the hash into the section for sha256 in the conda-forge recipe
    • the requirements/run section lists your package dependencies as would be found in your requirements.txt
    • about/home should list ""
    • about/dev_url should list the package repository URL, e.g. ""
    • about/doc_url should list the readthedocs URL, e.g. "
  5. Commit your changes and issue a PR against conda-forge/staged-recipes
  6. If you have listed other pysal devs as co-maintainers of the recipe, ping them in your PR so they can agree to co-maintain


  1. See the pysal/ README for updating