Skip to content

Release Process

Brent Huisman edited this page Jun 21, 2021 · 9 revisions

Release Process

These notes enumerate the steps required every time we release a new version of Arbor.

Pre-release: update tags/versions and test

  1. Create new temp-branch? v0.5.1-rc
  2. Bump the VERSION file: https://github.com/arbor-sim/arbor/blob/master/VERSION
  3. Update Python/pip/PyPi metadata and scripts
  1. Double check all examples/tutorials/etc not covered by CI
  2. python setup.py sdist
  3. python -m venv env
  4. source env/bin/activate
  5. move tarball here and extract
  6. pip install --upgrade pip
  7. pip install numpy
  8. pip install ./arbor-0.5.1 --verbose
  9. python -c 'import arbor; print(arbor.config)'
  10. twine upload testpypi dist/* (have some testrepo)
  11. create another venv: python -m venv env && source env/bin/activate
  12. pip install numpy
  13. pip install -i https://test.pypi.org/simple/ arbor==0.5.1 --verbose
  14. python -c 'import arbor; print(arbor.config)'

Pre-release 2

  1. Create/overwrite ciwheel-branch with the above branch, and push to Github.
  2. Collect artifact from GA run.
  3. twine upload testpypi dist/*
  4. Ask users to test the above.
  5. twine upload pypi dist/*
  6. create another venv: python -m venv env && source env/bin/activate
  7. pip install numpy
  8. pip install -i https://test.pypi.org/simple/ arbor==0.5.1 --verbose
  9. python -c 'import arbor; print(arbor.config)'

Release

  1. Tag and release: https://github.com/arbor-sim/arbor/releases
  2. AUTOMATED push to [email protected]:arbor-sim/arbor.git

Post release

  1. Upload new version to PyPi
  • twine upload dist/*
  • Use GH action?
  1. Update spack package make PR here
  2. Add release for citation on Zenodo
  3. Add tagged version of docs on ReadTheDocs
  4. HBP internal admin

Python configuration

Here is a description of the steps required to release a version of Arbor to PyPi so that it can be installed using pip. In the example below, we are working with v0.4.

Quick steps to test installation

python -m venv env
source env/bin/activate
pip install --upgrade pip

# test out basic install
pip install git+https://github.com/arbor-sim/[email protected] --verbose

# test out a fancy install (depends on what you have available)
pip install --install-option='--vec' --install-option='--gpu=cuda' --install-option='--mpi' git+https://github.com/arbor-sim/[email protected] --verbose

# test out installation
python -c 'import arbor; print(arbor.__config__)'

# I get the following output:
#   {'mpi': False, 'mpi4py': False, 'gpu': True, 'vectorize': True, 'version': '0.4', 'source': '2020-10-07 21:06:47 +0200 4a94032abe2925e462727400105c6c55ef4d87c5', 'arch': 'native'}

set up a clean environment

python3 -m venv env
source env/bin/activate
pip install --upgrade pip
pip install wheel
pip install twine

create a new branch

git checkout -b v0.4-rc

update VERSION

vim VERSION

test

git push origin v0.4-rc

# try to install in your virtual env

pip install git+https://github.com/arbor-sim/[email protected]

# try out some different options

pip install --install-option='--vec' --install-option='--gpu=cuda' git+https://github.com/arbor-sim/[email protected]

create source distribution

python setup.py sdist
# check the distribution:
ls dist
# prints the following for this use case:
#     arbor-0.4.tar.gz

The source distribution can be expanded somewhere and you can try to install from there. This can save you the latency of uploading it to TestPyPi to discover that there was an issue.

cp dist/arbor-0.4.tar.gz ~/tmp
cd ~/tmp
tar -xzvf arbor-0.4.tar.gz
cd arbor-0.4
# you can check the auto-generated PKF-INFO file.
# check for 'UNKNOWN' in PKG-INFO, which usually indicates incorrect/missing information
# in the setup.py file.
python setup.py install

upload it to testpypi

python3 -m twine upload --repository testpypi dist/*

note give the package a different name in the config.py if you have to upload multiple times.