The recommended way to make a release is to use jupyter_releaser
.
voila
follows a similar bump strategy as in JupyterLab:
https://github.com/jupyterlab/jupyterlab/blob/master/RELEASE.md#bump-version
jupyter_releaser
handles the bump automatically so it is not necessary to do it manually, as long as the spec is correctly specified in the workflow.
To manually bump the version, run:
# install the dependencies
python -m pip install -e ".[test,dev]"
# bump the version
python scripts/bump-version.py <spec>
Where <spec>
can be one of the following: patch
, minor
, major
, release
or next
(auto for patch
or minor
).
When there is a breaking change in a JS package, the version of the package should be bumped by one major version.
For example if the version of the preview extension was 2.1.0-alpha.1
and a breaking is introduced, bump to 3.0.0-alpha.0
.
- Open a new PR on https://github.com/conda-forge/voila-feedstock to update the
version
and thesha256
hash (see example) - Wait for the tests
- Merge the PR
The new version will be available on conda-forge
soon after.
Creating a new environment can help avoid pushing local changes and any extra tag.
mamba create -q -y -n voila-release -c conda-forge twine nodejs keyring pip matplotlib tornado jupyter-packaging jupyterlab build
conda activate voila-release
Alternatively, the local repository can be cleaned with:
git clean -fdx
Make sure the dist/
folder is empty.
- Bump the version:
python -m pip install bump2version jupyter-releaser
- For a patch or build release:
python scripts/bump-version next
python -m build
- Double check the size of the bundles in the
dist/
folder - Make sure the JupyterLab extension is correctly bundled in source distribution
- Run the tests
pip install "dist/voila-X.Y.Z-py3-none-any.whl[test]
cd tests/test_template
pip install tests/test_template tests/skip_template
py.test
export TWINE_USERNAME=mypypi_username
twine upload dist/*
Commit the changes, create a new release tag, and update the stable
branch (for Binder), where x.y.z
denotes the new version:
git checkout main
git add voila/_version.py
git commit -m "Release x.y.z"
git tag x.y.z
git checkout stable
git reset --hard main
git push origin main stable x.y.z
The prebuilt extension is already packaged in the main Python package.
However we also publish it to npm
to:
- let other third-party extensions depend on
@voila-dashboards/jupyterlab-preview
- let users install from source if they would like to
- Update packages/jupyterlab-preview/package.json with the new version number (to be done when making a new release of the Python package)
cd ./packages/jupyterlab-preview
npm login
npm publish
The JupyterLab extension should follow the publish cycle of the main Python package (see above).