π€ 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
scivision
repo, containing your changes to be included in the release, increment theversion
inpyproject.toml
and any other metadata that differs for the new release.Create a pull request and merge to the
main
branch.At the main repo page on GitHub, click the following
Releases -> Draft a new release
. ClickChoose a tag
and create a new tag named as theversion
number. Choose the commit you would like to target the release to (i.e. the one you have just merged). Fill in the descriptive fields and publish the release. (You donβt need to upload the binaries as these are automatically generated). 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
scivision
repo, containing your changes to be included in the release, increment theversion
inpyproject.toml
and 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
pyproject.toml
and pull request to themain
branch 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.rst
Open
build/index.html
in 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