π€ Maintainersο
This document is intended for maintainers of the scivision project and includes the following how-tos:
If you are new to the scivision project and wish to become a maintainer for either the PyPI release or the readthedocs documentation, send an email to scivision@turing.ac.uk
π Python package releasesο
A new release of the scivision package will be uploaded to PyPI each time a tagged commit is pushed to the main branch of the scivision GitHub repo. In order to trigger this automated process, do the following:
On a new branch of the
scivisionrepo, containing your changes to be included in the release, increment theversioninsetup.pyand any other metadata that differs for the new release.Create a pull request and merge to the
mainbranch.At the main repo page on GitHub, click the following
Releases -> Draft a new release. ClickChoose a tagand create a new tag named as theversionnumber. Fill in the descriptive fields and publish the release. After a few moments, the new version should show up at https://pypi.org/project/scivision/
Alternatively, developers of scivision with maintainer access to alan-turing-institute/scivision & https://pypi.org/project/scivision can manually release a new version of the package with the following steps:
On a new branch of the
scivisionrepo, containing your changes to be included in the release, increment theversioninsetup.pyand any other metadata that differs for the new release.Make sure you have a working python 3 installation. Check your version with:
python --version
Install these packages if you donβt have them:
pip install build twine
Build the release:
python -m build
Upload the release, substituting
<version>with the new version number:python -m twine upload dist/<version>*
Note: Youβll need to provide your PyPI username and password
Commit changes to
setup.pyand pull request to themainbranch of alan-turing-institute/scivision
π Build scivision documentationο
Maintainers of this readthedocs site can build and view the docs by doing the following:
Make sure you have a working python 3 installation. Check your version with:
python --version
Clone alan-turing-institute/scivision and install requirements:
pip install -r docs/requirements.txt
Build the docs:
In the top dir of the repo:
sphinx-build -b html docs/ build/
The HTML will be created in
build/
Update the API documentation:
Edit (or add) to the docstring of the function in question
Ensure that the module containing that function has been added to
docs/api.rstOpen
build/index.htmlin a browser to view edits
Push the updates to the readthedocs site:
Create a pull request with your changes
A build of the docs should be triggered
You can also log into the https://readthedocs.org/projects/scivision/ dashboard as a maintainer and click
Builds->Build Version