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
conda activate voila-release
Alternatively, the local repository can be cleaned with:
git clean -fdx
Make sure the dist/
folder is empty.
- If the JupyterLab extension has changed, make sure to bump the version number in
./packages/jupyterlab-preview/package.json
- If the Voilà front-end JavaScript has changed, make sure to bump the version number in
./packages/voila/package.json
- Update voila/_version.py and environment.yml with the new version number (see and example diff)
python setup.py sdist bdist_wheel
- 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 .) && (cd tests/skip_template; pip install .) && py.test)
export TWINE_USERNAME=mypypi_username
twine upload dist/*
- 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.
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 master
git add voila/_version.py environment.yml
git commit -m "Release x.y.z"
git tag x.y.z
git checkout stable
git reset --hard master
git push origin master 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).