@@ -42,41 +42,44 @@ specified below.
4242 + Update ` "version" ` to ` X.Y.Z `
4343 + Ensure you're using ` node ` version 12 and ` npm ` version 6 to minimize diffs to ` package-lock.json `
4444 + Ensure you're in a Python virtual environment with JupyterLab 3 installed
45- + Run ` rm -rf node_modules && npm install && npm run build:prod `
45+ + Run ` rm -rf node_modules && npm install && npm run clean && npm run build:prod `
4646 - This the last good time to install the extensions locally and check that everything works in dev mode
4747 - Run ` git diff ` and ensure that only the files you modified and the build artifacts have changed
4848 - Ensure that the diff in ` package-lock.json ` seems sane
4949 - Commit and tag but * don't push* until after everything is available on NPM/PyPI/Conda (see below):
5050 + ` git commit -a -m "release vX.Y.Z" `
5151 + ` git tag vX.Y.Z `
5252
53- ### Publish JS Extensions to NPM
54-
55- Build and publish the final version of the extensions to NPM. We do this first because
56- once we push to PyPI the README will refer to these versions.
57-
58- ``` bash
59- cd packages/javascript/jupyterlab-plotly
60- npm run build && npm publish --access public
61- ```
62-
63- Final checks could be done here if desired.
6453
6554### Publishing to PyPI
6655
6756Build and publish the final version to PyPI.
6857
58+ > NOTE: for some reason, this produces a broken build if ` npm run build:prod ` isn't '
59+ > run once before in the ` jupyterlab-plotly ` directory so don't skip that step above!
60+
6961``` bash
7062(plotly_dev) $ git status # make sure it's not dirty!
7163(plotly_dev) $ cd packages/python/plotly
7264(plotly_dev) $ rm -rf dist
7365(plotly_dev) $ python setup.py sdist bdist_wheel
74- (plotly_dev) $ rm -f dist/* dirty*
66+ (plotly_dev) $ rm -f dist/* dirty* # make sure your version is not dirty!
67+ ```
68+
69+ Here you should do some local QA:
70+
71+ ``` bash
72+ (plotly_dev) $ pip uninstall plotly
73+ (plotly_dev) $ pip install dist/plotly-X.Y.X-py2.py3-none-any.whl
74+ ```
75+
76+ Once you're satisfied that things render in Lab and Notebook in Widget and regular mode,
77+ you can upload to PyPI.
78+
79+ ``` bash
7580(plotly_dev) $ twine upload dist/plotly-X.Y.Z*
7681```
7782
78- Note: this will intentionally fail if your current git tree is dirty, because we want the tag
79- to reflect what is being released, and the version number comes from the tag and the dirty-state.
8083
8184After it has uploaded, move to another environment and double+triple check that you are able to upgrade ok:
8285``` bash
@@ -85,6 +88,18 @@ $ pip install plotly --upgrade
8588
8689And ask one of your friends to do it too. Our tests should catch any issues, but you never know.
8790
91+ ### Publish JS Extensions to NPM
92+
93+ Build and publish the final version of the extensions to NPM. We do this right away because
94+ once we push to PyPI the README will refer to these versions.
95+
96+ > NOTE: this assumes the extension is already built above so don't skip that step above!
97+
98+ ``` bash
99+ cd packages/javascript/jupyterlab-plotly
100+ npm publish --access public
101+ ```
102+
88103### Publishing to the plotly conda channel
89104
90105To publish package to the plotly anaconda channel you'll need to have the
@@ -185,21 +200,30 @@ And, you'll need to be a maintainer on PyPI. Then, from inside the repository:
185200(plotly_dev) $ git stash
186201(plotly_dev) $ rm -rf dist
187202(plotly_dev) $ python setup.py sdist bdist_wheel
188- (plotly_dev) $ rm -f dist/* dirty*
189- (plotly_dev) $ twine upload dist/plotly-X.Y.Zrc1*
203+ (plotly_dev) $ rm -f dist/* dirty* # make sure your version is not dirty!
204+ ```
205+
206+ Here you should do some local QA:
207+
208+ ``` bash
209+ (plotly_dev) $ pip uninstall plotly
210+ (plotly_dev) $ pip install dist/plotly-vX.Y.Zrc1-py2.py3-none-any.whl
190211```
191212
192- Note: this will intentionally fail if your current git tree is dirty, because we want the tag
193- to reflect what is being released, and the version number comes from the tag and the dirty-state .
213+ Once you're satisfied that things render in Lab and Notebook in Widget and regular mode,
214+ you can upload to PyPI .
194215
216+ ``` bash
217+ (plotly_dev) $ twine upload dist/plotly-X.Y.Zrc1*
218+ ```
195219
196220### Publish release candidate of JS Extensions to NPM
197221
198222Now, publish the release candidate of the extensions to NPM.
199223
200224``` bash
201225cd ./packages/javascript/jupyterlab-plotly
202- npm run build && npm publish --access public --tag next
226+ npm publish --access public --tag next
203227```
204228
205229The ` --tag next ` part ensures that users won't install this version unless
0 commit comments