@@ -42,41 +42,44 @@ specified below.
42
42
+ Update ` "version" ` to ` X.Y.Z `
43
43
+ Ensure you're using ` node ` version 12 and ` npm ` version 6 to minimize diffs to ` package-lock.json `
44
44
+ 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 `
46
46
- This the last good time to install the extensions locally and check that everything works in dev mode
47
47
- Run ` git diff ` and ensure that only the files you modified and the build artifacts have changed
48
48
- Ensure that the diff in ` package-lock.json ` seems sane
49
49
- Commit and tag but * don't push* until after everything is available on NPM/PyPI/Conda (see below):
50
50
+ ` git commit -a -m "release vX.Y.Z" `
51
51
+ ` git tag vX.Y.Z `
52
52
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.
64
53
65
54
### Publishing to PyPI
66
55
67
56
Build and publish the final version to PyPI.
68
57
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
+
69
61
``` bash
70
62
(plotly_dev) $ git status # make sure it's not dirty!
71
63
(plotly_dev) $ cd packages/python/plotly
72
64
(plotly_dev) $ rm -rf dist
73
65
(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
75
80
(plotly_dev) $ twine upload dist/plotly-X.Y.Z*
76
81
```
77
82
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.
80
83
81
84
After it has uploaded, move to another environment and double+triple check that you are able to upgrade ok:
82
85
``` bash
@@ -85,6 +88,18 @@ $ pip install plotly --upgrade
85
88
86
89
And ask one of your friends to do it too. Our tests should catch any issues, but you never know.
87
90
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
+
88
103
### Publishing to the plotly conda channel
89
104
90
105
To 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:
185
200
(plotly_dev) $ git stash
186
201
(plotly_dev) $ rm -rf dist
187
202
(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
190
211
```
191
212
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 .
194
215
216
+ ``` bash
217
+ (plotly_dev) $ twine upload dist/plotly-X.Y.Zrc1*
218
+ ```
195
219
196
220
### Publish release candidate of JS Extensions to NPM
197
221
198
222
Now, publish the release candidate of the extensions to NPM.
199
223
200
224
``` bash
201
225
cd ./packages/javascript/jupyterlab-plotly
202
- npm run build && npm publish --access public --tag next
226
+ npm publish --access public --tag next
203
227
```
204
228
205
229
The ` --tag next ` part ensures that users won't install this version unless
0 commit comments