-
-
Notifications
You must be signed in to change notification settings - Fork 1
Releasing
Note: This package depends on ``mathics-core``, so if that needs a release too, do that before this.
$ PACKAGE="Mathics3-Module-nltk" $ root_dir="pymathics/natlang"
Edit ${root_dir}/version.py
$ source ${root_dir}/version.py # to set in POSIX shell $ echo $__version__
$ git checkout -b release-$__version__ $ git commit -m"Get ready for release $__version__" .
Check .github/workflows/*.yml
to see if we are using GitHub versions for testing. If so, adjust.
$ make ChangeLog
$ codespell ChangeLog
If there are errors, fix the errors and:
$ mv -v ChangeLog ChangeLog.spell-corrected
$ mv -v ChangeLog.orig ChangeLog
$ diff -u ChangeLog ChangeLog.spell-corrected > ChangeLog-spell-corrected.diff
Update CHANGES.rst
from ChangeLog
$ make check $ git commit --amend . $ git push -u origin HEAD # get CI testing going early
$ ./admin-tools/check-versions.sh
Go to GitHub and merge the release into the master branch.
Then...
$ git checkout master $ git pull
If we are tracking an API change, check .github/workflows to see if we can use PyPI packages instead of GitHub repositories.
TODO: turn this into a script in admin-tools
$ [[ ! -d /tmp/gittest ]] && mkdir /tmp/gittest; pushd /tmp/gittest $ pyenv local 3.12.10 # Use a version that is not the most recent $ pip install -e git+https://github.com/Mathics3/${PACKAGE}.git#egg=${PACKAGE}[full] $ mathics -c 'LoadModule["pymathics.natlang"]; Pluralize["try"]' $ pip uninstall ${PACKAGE} $ popd
$ bash ./admin-tools/make-dist.sh $ twine check dist/*-$__version__*
Go over what is in the dist
directory, and remove unnecessary files in dist
.
Go to https://github.com/Mathics3/Mathics3-Module-nltk/releases/new
https://cloudconvert.com/rst-to-md can be used to change the CHANGES.rst section to markdown.
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 -e git+https://github.com/Mathics3/${PACKAGE}.git@${__version__}#egg=${PACKAGE}[full]
$ mathics -c 'LoadModule["pymathics.natlang"]; Pluralize["try"]'
$ pip uninstall ${PACKAGE}
$ popd
Upload it to PyPI with twine
:
$ twine upload --verbose dist/*-${__version__}*{whl,gz}
$ [[ ! -d dist/uploaded ]] || mkdir dist/uploaded $ mv -v dist/$PACKAGE*{whl,gz} dist/uploaded/
Add 1 to the release number of the version in ${PACKAGE}/version.py
; also append "dev0".