Skip to content

Releasing

R. Bernstein edited this page Sep 4, 2025 · 11 revisions

Table of Contents

Get latest sources:

$ git pull

Change version in pymathics/trepan/version.py:


    $ emacs pymathics/trepan/version.py
    $ echo $__version__
    $ git checkout -b release-$__version__
    $ git commit -m"Get ready for release $__version__".

Update ChangeLog:

    $ make ChangeLog
    $ codespell ChangeLog

If ChangeLog has spelling typos, make the corrections and:

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

If the diff looks like it captures the corrections:

    $ diff -u ChangeLog ChangeLog-spell-corrected > ChangeLog-spell-corrected.diff

Update NEWS.md from ChangeLog:

$ git commit --amend .
$ git push origin HEAD # get CI testing going early

Check package from GitHub

Todo: turn this into a script in admin-tools

$ [[ ! -d /tmp/gittest ]] && mkdir /tmp/gittest; pushd /tmp/gittest
$ pyenv local 3.13.5  # or some other non-current version
$ pip install --no-build-isolation -e git+https://github.com/Mathics3/Mathics3-Module-trepan.git#egg=Mathics3-Module-trepan
$ mathics
In[1] LoadModule["pymathics.trepan"]
In[2]:= Debugger[]
(Mathics3 Debug) continue
Out[2]= Debugger[]
In[3]:= TraceActivate[SymPy->True, mpmath->True]
Out[3]= TraceActivate[SymPy → True, mpmath → True]

In[4]:= Exp[1.0]
mpmath call  : mpmath.ctx_base.StandardBaseContext.power(2.718281828459045, 1.0)
mpmath result: 2.71828182845905
Out[4]= 2.71828
In[5] TraceEvaluation[Exp[-1.0]]
In[6]:= Quit[]
$ pip uninstall Mathics3-Module-trepan
$ popd

Make packages and check

   $ ./admin-tool/make-dist.sh

Check packages

$ twine check dist/mathics3_module_trepan-${__version__}*

Release on GitHub

Goto https://github.com/Mathics3/Mathics3-Module-trepan/releases/new

Set the version, copy the CHANGES.rst item, and upload the binaries.

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 the new tag
$ pushd /tmp/gittest
$ pip install --no-build-isolation -e git+https://github.com/Mathics3/Mathics3-Module-trepan.git@${__version__}#egg=Mathics3-Module-trepan
$ mathics
In[1] LoadModule["pymathics.trepan"]
In[2]:= Debugger[]
(Mathics3 Debug) continue
Out[2]= Debugger[]
In[3]:= TraceActivate[SymPy->True, mpmath->True]
Out[3]= TraceActivate[SymPy → True, mpmath → True]

In[4]:= Exp[1.0]
mpmath call  : mpmath.ctx_base.StandardBaseContext.power(2.718281828459045, 1.0)
mpmath result: 2.71828182845905
Out[4]= 2.71828
In[5] TraceEvaluation[Exp[-1.0]]
In[6]:= Quit[]
$ pip uninstall Mathics3-Module-trepan
$ popd

Get on PyPI

$ twine upload dist/mathics3_module_trepan-${__version__}*.{whl,gz}

Check on https://pypi.org/project/Mathics3-Module-trepan/

Move dist files to uploaded

$ mv -v dist/mathics3_module_trepan3k-${__version__}* dist/uploaded

Bump version to dev

In trepan/version.py, bump version number and add .dev0.