Skip to content

Releasing

rocky edited this page Feb 26, 2023 · 8 revisions

Get latest sources:

$ git pull

Change version in pymathics-graph/version.py

On Mathics3/pymathics-graph master branch. For each release candidate:

update __version__ in pymathics/graph/version.py

$ source pymathics/graph/version.py # to set in POSIX shell
$ echo $__version__

Make release branch:

$ git checkout -b release-$__version__
$ git commit -m"Get ready for release $__version__" .

Update Changes

$ make ChangeLog

Update NEWS.md from ChangeLog

$ make check
$ git commit --amend .
$ git push   # get CI testing going early

Check package from github, then...

$ get checkout master
$ git pull origin HEAD

Todo: turn this into a script in admin-tools

$ [[ ! -d /tmp/gittest ]] && mkdir /tmp/gittest; pushd /tmp/gittest
$ pyenv local 3.10.9  # Use a version that is not the most recent
$ pip install -e git+https://github.com/Mathics3/pymathics-graph.git#egg=pymathics-graph
$ mathicsscript
In[1]:= LoadModule["pymathics.graph"]
In[2]:= CompleteKaryTree[3, VertexLabels->True]
Ctrl-D
$ pip uninstall pymathics-graph
$ popd

Make packages and check

$ (cd ./admin-tools && bash ./make-dist.sh)
$ twine check dist/pymathics[_-]graph-$__version__*

Release on Github

Goto https://github.com/Mathics3/pymathics-graph/releases/new

Now check the tagged release. (Checking the untagged release was previously done).

Todo: turn this into a script in admin-tools

$ git pull # to pull down new tag
$ pushd /tmp/gittest
$ pip install -e git+https://github.com/Mathics3/pymathics-graph.git@${__version__}#egg=pymathics-graph
$ mathicsscript
In[1]:= LoadModule["pymathics.graph"]
In[2]:= CompleteKaryTree[3, VertexLabels->True]
Ctrl-D
$ pip uninstall pymathics-graph
$ popd

Upload the release to PyPI

Upload it to PyPI with twine

$ twine upload dist/pymathics[_-]graph-${__version__}*

Post-Release