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 PySAL.org site should be made to pubicize the releaes.
- Enusre all tests are passing
- On GitHUB, go to the main page of the repository
- Under the repository name, click Releases
- Click Draft a new release
- On your clone, use
tools/gitcount.ipynbto generate the main content of your release notes
- Use that content also to update the
CHANGELOG.mdthat is part of your source.
- Commit your updated
CHANGELOG.mdand issue a PR to upstream.
- After your PR is merged, Click Publish release on GitHUB.
- Move on to do the pypi release
- If you have not done so already, register your package on PyPi and TestPyPI
- Based on the github release you just completed, download the tarball associated with that release
- Unpack the tarball, and
cdinto the source directory
python setup.py sdist
pip install twine
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
Then test, your package locally to see if installation is clean:
pip install --extra-index-url https://test.pypi.python.org/pypi yourpackagename
If all is good, move on and push your package to pypi:
twine upload dist/*
- Move on to announce your release to the community.
(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 conda-forge.org, 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
- On github.com, fork the conda-forge/staged-recipes repository https://github.com/conda-forge/staged-recipes
- Clone your fork locally and check out a new branch named after your package
git checkout -b spaghetti
- In the
recipesdirectory, duplicate the "example" directory, and rename "example" to the name of your package
- 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. https://pypi.org/project/splot/#files)
- click the link for the SHA256 hash which will copy it to the clipboard. Paste the hash into the section for
sha256in the conda-forge recipe
requirements/runsection lists your package dependencies as would be found in your
about/homeshould list "http://pysal.org"
about/dev_urlshould list the package repository URL, e.g. "http://github.com/pysal/spaghetti"
about/doc_urlshould list the readthedocs URL, e.g. "http://readthedocs.org/projects/segregation/
- Commit your changes and issue a PR against conda-forge/staged-recipes
- 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