1
1
2
2
# How to release plotly packages
3
3
4
- ## Release process - plotly package
4
+ There are 3 Python packages (` plotly ` , ` plotly-geo ` and ` chart-studio ` ) which need to be
5
+ published to PyPI and conda, and 2 JS packages (` jupyterlab-plotly ` and ` plotlywdiget ` )
6
+ which need to be published to NPM. In addition, there are various changelogs, github
7
+ releases and forum announcements to do :)
8
+
9
+ ## Release process - ` plotly ` package and extensions
5
10
6
11
This is the release process for releasing ` plotly.py ` version ` X.Y.Z ` with
7
12
` plotlywidget ` /` jupyterlab-plotly ` with matching versions.
@@ -10,11 +15,13 @@ Note: it's easier to lock all three versions together, even if it means we occas
10
15
push no-change versions to NPM/PyPI/Conda.
11
16
12
17
### Create a release branch
18
+
13
19
After all of the functionality for the release has been merged into master,
14
20
create a branch named ` release_X.Y.Z ` . This branch will become the
15
21
final version
16
22
17
23
### Finalize changelog
24
+
18
25
Review the contents of ` packages/python/plotly/CHANGELOG.md ` . We try to follow
19
26
the [ keepachangelog] ( https://keepachangelog.com/en/1.0.0/ ) guidelines.
20
27
Make sure the changelog includes the version being published at the top, along
@@ -50,18 +57,19 @@ Update the `doc/python/getting-started.md` file with the same version numbers.
50
57
Commit Changelog, README and getting-started updates.
51
58
52
59
### Bump to release candidate version
53
- 1 ) Manually update the plotlywidget version to ` X.Y.Z-rc.1 ` in the files
60
+
61
+ 1 ) Manually update the versions to ` X.Y.Z-rc.1 ` in the files
54
62
specified below.
55
63
56
64
- ` packages/python/plotly/plotly/_widget_version.py ` :
57
65
+ Update ` __frontend_version__ ` to ` ^X.Y.Z-rc.1 ` (Note the ` ^ ` prefix)
58
66
- ` packages/javascript/plotlywidget/package.json `
59
67
+ Update ` "version" ` to ` X.Y.Z-rc.1 `
60
- + Ensure you're using ` node ` version 8 and ` npm ` version 6 to minimize diffs to ` package-lock.json `
68
+ + Ensure you're using ` node ` version 12 and ` npm ` version 6 to minimize diffs to ` package-lock.json `
61
69
+ Run ` rm -rf node_modules && npm install && npm run build `
62
70
- ` packages/javascript/jupyterlab-plotly/package.json `
63
71
+ Update ` "version" ` to ` X.Y.Z-rc.1 `
64
- + Ensure you're using ` node ` version 8 and ` npm ` version 6 to minimize diffs to ` package-lock.json `
72
+ + Ensure you're using ` node ` version 12 and ` npm ` version 6 to minimize diffs to ` package-lock.json `
65
73
+ Run ` rm -rf node_modules && npm install && npm run build `
66
74
67
75
2 ) Commit the changes
@@ -82,13 +90,13 @@ that their bug reports are in fact resolved before we pull the trigger
82
90
on the official release.
83
91
84
92
### Publish release candidate to PyPI
93
+
85
94
To upload to PyPI you'll also need to have ` twine ` installed:
86
95
``` bash
87
96
(plotly_dev) $ pip install twine
88
97
```
89
98
90
- And, you'll need the credentials file ` ~/.pypirc ` . Request access from
91
- @jonmmease and @chriddyp . Then, from inside the repository:
99
+ And, you'll need to be a maintainer on PyPI. Then, from inside the repository:
92
100
93
101
``` bash
94
102
(plotly_dev) $ cd packages/python/plotly
@@ -104,8 +112,9 @@ Note: this will intentionally fail if your current git tree is dirty, because we
104
112
to reflect what is being released, and the version number comes from the tag and the dirty-state.
105
113
106
114
107
- ### Publish release candidate of ` plotlywidget ` and ` jupyterlab-plotly ` to NPM
108
- Now, publish the release candidate of the ` plotlywidget ` NPM package.
115
+ ### Publish release candidate of JS Extensions to NPM
116
+
117
+ Now, publish the release candidate of the extensions to NPM.
109
118
110
119
``` bash
111
120
cd ./packages/javascript/plotlywidget
@@ -118,6 +127,7 @@ they explicitly ask for the version or for the version wtih the `next` tag.
118
127
Do the same in the ` jupyterlab-plotly ` directory.
119
128
120
129
### Publish release candidate to plotly anaconda channel
130
+
121
131
To publish package to the plotly anaconda channel you'll need to have the
122
132
anaconda or miniconda distribution installed, and you'll need to have the
123
133
` anaconda-client ` package installed.
@@ -141,6 +151,7 @@ $ anaconda upload --label test /path/to/anaconda3/conda-bld/noarch/plotly-*.tar.
141
151
Then logout with ` anaconda logout `
142
152
143
153
### Manually test the release candidate
154
+
144
155
Create a fresh virtual environment (or conda environment) and install
145
156
the release candidate by following the new ` README.md ` instructions
146
157
(the instructions updated above to include the release candidate versions)
@@ -158,6 +169,7 @@ branch and then publish another release candidate with the candidate number
158
169
incremented.
159
170
160
171
### Finalize CHANGELOG and README
172
+
161
173
Update CHANGELOG with release date and update README with final versions.
162
174
163
175
In the conda installation instructions, be sure to change the
@@ -168,24 +180,26 @@ Update the doc/python/getting-started.md file with the same version numbers.
168
180
Commit Changelog, README and getting-started updates.
169
181
170
182
### Finalize versions
183
+
171
184
When no problems are identified in the release candidate, remove the
172
185
release candidate suffix from the following version strings:
173
186
174
187
- ` plotly/_widget_version.py ` :
175
188
+ Update ` __frontend_version__ ` to ` ^X.Y.Z ` (Note the ` ^ ` prefix)
176
189
- ` packages/javascript/plotlywidget/package.json `
177
190
+ Update ` "version" ` to ` X.Y.Z `
178
- + Ensure you're using ` node ` version 8 and ` npm ` version 6 to minimize diffs to ` package-lock.json `
191
+ + Ensure you're using ` node ` version 12 and ` npm ` version 6 to minimize diffs to ` package-lock.json `
179
192
+ Run ` rm -rf node_modules && npm install && npm run build `
180
193
- ` packages/javascript/jupyterlab-plotly/package.json `
181
194
+ Update ` "version" ` to ` X.Y.Z `
182
- + Ensure you're using ` node ` version 8 and ` npm ` version 6 to minimize diffs to ` package-lock.json `
195
+ + Ensure you're using ` node ` version 12 and ` npm ` version 6 to minimize diffs to ` package-lock.json `
183
196
+ Run ` rm -rf node_modules && npm install && npm run build `
184
197
- Run ` git diff ` and ensure that only the files you modified and the build artifacts have changed
185
198
- Ensure that the diff in ` package-lock.json ` seems sane
186
199
- Commit and push to the release branch.
187
200
188
201
### Merge release into master
202
+
189
203
Make sure the integration tests are passing on the release branch, then merge
190
204
it into master on GitHub.
191
205
@@ -202,7 +216,7 @@ push the tag.
202
216
(plotly_dev) $ git push origin vX.Y.Z
203
217
```
204
218
205
- ### Publishing to PYPI
219
+ ### Publishing to PyPI
206
220
207
221
Publish the final version to PyPI
208
222
@@ -224,10 +238,9 @@ $ pip install plotly --upgrade
224
238
225
239
And ask one of your friends to do it too. Our tests should catch any issues, but you never know.
226
240
227
- <3 Team Plotly
241
+ ### Publish JS Extensions to NPM
228
242
229
- ### Publish widget library to npm
230
- Finally, publish the final version of the widget library to npm with:
243
+ Finally, publish the final version of the extensions to NPM with:
231
244
232
245
``` bash
233
246
cd packages/javascript/jupyterlab-plotly
@@ -237,6 +250,7 @@ npm run build && npm publish --access public
237
250
```
238
251
239
252
### Publishing to the plotly conda channel
253
+
240
254
Follow the anaconda upload instructions as described for the release candidate
241
255
above, except:
242
256
@@ -247,6 +261,7 @@ $ anaconda upload /path/to/anaconda3/conda-bld/noarch/plotly-*.tar.bz2
247
261
```
248
262
249
263
### Add GitHub Release entry
264
+
250
265
Go to https://github.com/plotly/plotly.py/releases and "Draft a new release"
251
266
252
267
Enter the vX.Y.Z tag
@@ -269,25 +284,30 @@ start doing it first. Then merge master into doc-prod to deploy the doc related
269
284
to features in the release.
270
285
271
286
### Post announcement
272
- Post a simple announcement to the Plotly Python forum, with links to the
287
+
288
+ Post an announcement to the Plotly Python forum, with links to the
273
289
README installation instructions and to the CHANGELOG.
274
290
275
- ## Release process - plotly-geo package
291
+ ## Release process - ` plotly-geo ` package
292
+
276
293
The ` plotly-geo ` package contains the shape file resources used by plotly.py.
277
294
These files are relatively large and change infrequently so it is useful
278
295
to release them in a separate package.
279
296
280
297
### Update version
298
+
281
299
Update the version of the ` plotly-geo ` package in
282
300
` packages/python/plotly-geo/setup.py ` .
283
301
284
302
This version is not intended to match the version of plotly.py.
285
303
286
304
### Update CHANGELOG
305
+
287
306
Add a new entry to the CHANGELOG at ` packages/python/plotly-geo/CHANGELOG.md `
288
307
and commit the changes.
289
308
290
309
### Tag Release
310
+
291
311
Create a new tag for the release
292
312
293
313
``` bash
@@ -299,6 +319,7 @@ Create a new tag for the release
299
319
```
300
320
301
321
### Publishing to PYPI
322
+
302
323
Publish the final version to PyPI
303
324
304
325
``` bash
@@ -309,28 +330,33 @@ Publish the final version to PyPI
309
330
```
310
331
311
332
### Publish to plotly anaconda channel
333
+
312
334
From ` packages/python/plotly-geo ` , build the conda packge
313
335
``` bash
314
336
(plotly_dev) $ conda build recipe/
315
337
```
316
338
317
339
Then upload to the plotly anaconda channel as described above
318
340
319
- ## Release process - chart-studio package
341
+ ## Release process - ` chart-studio ` package
342
+
320
343
The ` chart-studio ` package contains the utilities for interacting with
321
344
Chart Studio (both Cloud or On-Prem).
322
345
323
346
### Update version
347
+
324
348
Update the version of the ` chart-studio ` package in
325
349
` packages/python/chart-studio/setup.py ` .
326
350
327
351
This version is not intended to match the version of plotly.py.
328
352
329
353
### Update CHANGELOG
354
+
330
355
Add a new entry to the CHANGELOG at ` packages/python/chart-studio/CHANGELOG.md `
331
356
and commit the changes.
332
357
333
358
### Tag Release
359
+
334
360
Create a new tag for the release
335
361
336
362
``` bash
@@ -342,6 +368,7 @@ Create a new tag for the release
342
368
```
343
369
344
370
### Publishing to PYPI
371
+
345
372
Publish the final version to PyPI
346
373
347
374
``` bash
@@ -352,6 +379,7 @@ Publish the final version to PyPI
352
379
```
353
380
354
381
### Publish to plotly anaconda channel
382
+
355
383
From ` packages/python/plotly-geo ` , build the conda packge
356
384
``` bash
357
385
(plotly_dev) $ conda build recipe/
0 commit comments