Skip to content

Releasing

rocky edited this page Apr 24, 2026 · 17 revisions

Table of Contents

Get latest sources:

$ git pull

If we are tracking an API change, check .github/workflows to see if we can use PyPI packages instead of GitHub repositories.

Change version in Mathics3-Module-networkx/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__" .

Check that Mathics3 isn't broken with this code:

$ make check

Update Changes

$ make ChangeLog
$ codespell ChangeLog

If there are errors, fix the errors and:

$ mv -v ChangeLog.spell-corrected
$ mv -v ChangeLog.orig ChangeLog
$ diff -u ChangeLog ChangeLog.spell-corrected > ChangeLog-spell-corrected.diff

Update NEWS.md from ChangeLog

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

Check Package from GitHub and 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.13.5  # Use a version that is not the most recent
$ pip install -e git+https://github.com/Mathics3/Mathics3-Module-networkx.git#egg=mathics3-module-networkx
$ mathicsscript
In[1]:= LoadModule["pymathics.graph"]
In[2]:= CompleteKaryTree[3, VertexLabels->True]
Ctrl-D
$ pip uninstall mathics3-module-networkx
$ popd

Make packages and check

$ ./admin-tools/check-versions
$ (cd ./admin-tools && bash ./make-dist.sh)
$ twine check dist/mathics3_module_networkx-$__version__*

Go over what is in the dist directory, and remove unnecessary files in dist.

$ tar -tvf ../dist/mathics3_module_networkx-${__version}.tar.gz

Try out the wheel in a separate Python version

$ cd dist
$ pyenv local *not_currenv_python*
$ pip install mathics3_module_networkx-${__version__}-py3-none-any.whl
$ cd ..

Release on Github

Goto https://github.com/Mathics3/Mathics3-Module-networkx/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/Mathics3-Module-networkx.git@${__version__}#egg=mathics3-module-networkx
$ mathicsscript
In[1]:= LoadModule["pymathics.graph"]
In[2]:= CompleteKaryTree[3, VertexLabels->True]
Ctrl-D
$ pip uninstall mathics3-module-networkx
$ popd

Upload the release to PyPI

Upload it to PyPI with twine

$ twine upload dist/mathics3_module_networkx-${__version__}*

Post-Release