During development run npm run watch
for real time updates. When releasing a new version, first confirm that latest version of the front and back ends are working locally (check console logs, etc).
Update the versions in the following files
- package.json
- widget.ts
- _version.py
- example.py
- requirements.txt
- _frontend.py
Run the following commands to build the JavaScript bundle:
npm run build
npm run build:nbextension
npm run build:labextension
Publish to npm using
npm publish
These instructions are based on the release instructions from the jupyter-widgets/widget-ts-cookiecutterREADME.
Next, bundle the python package using
python setup.py sdist bdist_wheel
Then, upload the PYPI:
twine upload dist/*
After releasing a new version several things need to be checked to ensure proper widget functioning.
- https://www.npmjs.com/package/clustergrammer2 (can be slow to update)
- https://pypi.org/project/clustergrammer2/
- Run
jupyter nbconvert --to html introduction_nb.ipynb
(from the examples directory) to generate a static HTML and check that the latest widget is working (uses unpkg.com) - Check NBViewer using link to notebook on GitHub (e.g. https://nbviewer.jupyter.org/github/ismms-himc/clustergrammer2/blob/master/examples/introduction_nb.ipynb?flush_cache=true). Make sure to use the querystring
flush_cache=True
in the URL to ensure that NBVIewer re-runs nbconvert.
- Check MyBinder
- Check Kaggle (re-install clustergrammer2)