Skip to content

Commit 584d1ef

Browse files
updating release docs
1 parent cf44ee3 commit 584d1ef

File tree

3 files changed

+49
-46
lines changed

3 files changed

+49
-46
lines changed

contributing.md

Lines changed: 42 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Check out our Support App: https://support.plot.ly/libraries/python or Community
1616

1717
## Want to improve the plotly documentation?
1818

19-
Thank you! Instructions on how to contribute to the documentation are given [here](doc/contributing.md). Please also read the next section if you need to setup a development environment.
19+
Thank you! Instructions on how to contribute to the documentation are given [here](doc/contributing.md). Please also read the next section if you need to setup a development environment.
2020

2121
## Setup a Development Environment
2222

@@ -57,7 +57,7 @@ conda activate plotly-dev
5757
### ipywidgets development install
5858

5959
Run the following commands in your virtual environment to use the
60-
development version of `FigureWidget`,
60+
development version of `FigureWidget`,
6161

6262
$ jupyter nbextension enable --py widgetsnbextension
6363
$ jupyter nbextension install --py --symlink --sys-prefix plotlywidget
@@ -66,7 +66,7 @@ development version of `FigureWidget`,
6666
To make plotly plots show up in JupyterLab, you also need to [install the plotly jupyterlab extensions][plotly-jl].
6767

6868
[plotly-jl]: https://plot.ly/python/getting-started/#jupyterlab-support-python-35
69-
69+
7070
### Configure black code formatting
7171
This repo uses the [Black](https://black.readthedocs.io/en/stable/) code formatter,
7272
and the [pre-commit](https://pre-commit.com/) library to manage a git commit hook to
@@ -79,7 +79,7 @@ environment.
7979

8080
```bash
8181
(plotly_dev) $ pre-commit install
82-
```
82+
```
8383

8484
Now, whenever you perform a commit, the Black formatter will run. If the formatter
8585
makes no changes, then the commit will proceed. But if the formatter does make changes,
@@ -110,16 +110,16 @@ Once you've made your changes (and hopefully written some tests...), make that p
110110

111111

112112
## Update to a new version of Plotly.js
113-
First update the version of the `plotly.js` dependency in `js/package.json`.
113+
First update the version of the `plotly.js` dependency in `packages/javascript/plotlywidget/package.json`.
114114

115115
Then run the `updateplotlyjs` command with:
116116

117117
```bash
118118
$ python setup.py updateplotlyjs
119119
```
120120

121-
This will download new versions of `plot-schema.json` and `plotly.min.js` from
122-
the `plotly/plotly.js` GitHub repository (and place them in
121+
This will download new versions of `plot-schema.json` and `plotly.min.js` from
122+
the `plotly/plotly.js` GitHub repository (and place them in
123123
`plotly/package_data`). It will then regenerate all of the `graph_objs`
124124
classes based on the new schema.
125125

@@ -205,12 +205,12 @@ You're *strongly* encouraged to write tests that check your added functionality.
205205

206206
When you write a new test anywhere under the `tests` directory, if your PR gets accepted, that test will run in a virtual machine to ensure that future changes don't break your contributions!
207207

208-
Test accounts include: `PythonTest`, `PlotlyImageTest`, and `PlotlyStageTest`.
208+
Test accounts include: `PythonTest`, `PlotlyImageTest`, and `PlotlyStageTest`.
209209

210210
## Release process - plotly package
211211

212212
This is the release process for releasing `plotly.py` version `X.Y.Z` with
213-
`plotlywidget` version `A.B.C`.
213+
`plotlywidget`/`jupyterlab-plotly` version `A.B.C`.
214214

215215
Note: The `plotlywidget` instructions must be followed if any change
216216
has been made in the `packages/javascript` directory source code, OR if the version of
@@ -235,7 +235,7 @@ noteable changes as sub-bullets (new trace types in particular), and provide
235235
a link to the plotly.js CHANGELOG.
236236

237237
As the first entry in the changelog, include a `JupyterLab Versions` section.
238-
Here, document the versions of `plotlywidget`,
238+
Here, document the versions of `plotlywidget`,
239239
`@jupyter-widgets/jupyterlab-manager`, `jupyterlab`, and
240240
`@jupyterlab/plotly-extension` that are known to be compatible with this
241241
version of `plotly.py`.
@@ -265,17 +265,21 @@ specified below.
265265
+ Update `__frontend_version__` to `^A.B.C-rc.1` (Note the `^` prefix)
266266
- `packages/javascript/plotlywidget/package.json`
267267
+ Update `"version"` to `A.B.C-rc.1`
268-
268+
+ Run `npm install && npm build`
269+
- `packages/javascript/jupyterlab-plotly/package.json`
270+
+ Update `"version"` to `A.B.C-rc.1`
271+
+ Run `npm install && npm build`
272+
269273
2) Commit the changes
270-
274+
271275
3) Tag this commit on the release branch as `vX.Y.Zrc1` and `widget-vA.B.C-rc.1`
272-
276+
273277
In both cases `rc` is the semantic versioning code for Release Candidate.
274-
278+
275279
The number 1 means that this is the first release candidate, this number can
276280
be incremented if we need to publish multiple release candidates.
277281
Note that the `npm` suffix is `-rc.1` and the PyPI suffix is `rc1`.
278-
282+
279283
Publishing `plotly.py` and `plotlywidget` as release candidates
280284
allows us to go through the publication process, and test that the
281285
installed packages work properly before general users will get them by
@@ -293,9 +297,12 @@ And, you'll need the credentials file `~/.pypirc`. Request access from
293297
@jonmmease and @chriddyp. Then, from inside the repository:
294298

295299
```bash
300+
(plotly_dev) $ cd packages/python/plotly
296301
(plotly_dev) $ git checkout release_X.Y.Z
297302
(plotly_dev) $ git stash
303+
(plotly_dev) $ rm -rf dist
298304
(plotly_dev) $ python setup.py sdist bdist_wheel
305+
(plotly_dev) $ rm dist/*dirty*
299306
(plotly_dev) $ twine upload dist/plotly-X.Y.Zrc1*
300307
```
301308

@@ -304,7 +311,7 @@ Now, publish the release candidate of the `plotlywidget` NPM package.
304311

305312
```bash
306313
cd ./packages/javascript/plotlywidget
307-
npm publish --access public --tag next
314+
npm build && npm publish --access public --tag next
308315
```
309316

310317
The `--tag next` part ensures that users won't install this version unless
@@ -318,21 +325,22 @@ anaconda or miniconda distribution installed, and you'll need to have the
318325
`anaconda-client` package installed.
319326

320327
```bash
328+
(plotly_dev) $ conda config --set anaconda_upload no
321329
(plotly_dev) $ conda build recipe/
322330
```
323331

324332
Next run `anaconda login` and enter the credentials for the plotly anaconda
325333
channel.
326-
334+
327335
Then upload artifacts to the anaconda channel using the test label. Using the test
328336
label will ensure that people will only download the release candidate version
329337
if they explicitly request it.
330338

331339
```
332-
$ anaconda upload --label test /path/to/anaconda3/conda-bld/noarch/plotly-*.tar.bz2
340+
$ anaconda upload --label test /path/to/anaconda3/conda-bld/noarch/plotly-*.tar.bz2
333341
```
334342

335-
Then logout with `anaconda logout`
343+
Then logout with `anaconda logout`
336344

337345
### Manually test the release candidate
338346
Create a fresh virtual environment (or conda environment) and install
@@ -344,7 +352,7 @@ https://github.com/jonmmease/plotly_ipywidget_notebooks using the classic
344352
notebook and JupyterLab. Make sure `FigureWidget` objects are displayed as
345353
plotly figures, and make sure the in-place updates and callbacks work.
346354

347-
If appropriate, ask users who have submitted bug reports or feature
355+
If appropriate, ask users who have submitted bug reports or feature
348356
requests that are resolved in this version to try out the release candidate.
349357

350358
If problems are found in the release candidate, fix them on the release
@@ -356,7 +364,7 @@ Update CHANGELOG with release date and update README with final versions.
356364

357365
In the conda installation instructions, be sure to change the
358366
"-c plotly/label/test" argument to "-c plotly"
359-
367+
360368
Commit updates.
361369

362370
### Finalize versions
@@ -367,17 +375,19 @@ release candidate suffix from the following version strings:
367375
+ Update `__frontend_version__` to `^A.B.C` (Note the `^` prefix)
368376
- `packages/javascript/plotlywidget/package.json`
369377
+ Update `"version"` to `A.B.C`
378+
+ Run `npm install && npm build`
370379
- `packages/javascript/jupyterlab-plotly/package.json`
371380
+ Update `"version"` to `A.B.C`
372-
381+
+ Run `npm install && npm build`
382+
373383
Commit and push to the release branch.
374384

375385
### Merge release into master
376386
Make sure the integration tests are passing on the release branch, then merge
377387
it into master on GitHub.
378388

379389
Make sure tests also pass on master, then update your local master,
380-
tag this merge commit as `vX.Y.Z` (e.g. `v3.1.1`) and `widget-vA.B.C`
390+
tag this merge commit as `vX.Y.Z` (e.g. `v3.1.1`) and `widget-vA.B.C`
381391

382392
push the tag.
383393

@@ -397,7 +407,9 @@ Publish the final version to PyPI
397407

398408
```bash
399409
(plotly_dev) $ cd packages/python/plotly
410+
(plotly_dev) $ rm -rf dist
400411
(plotly_dev) $ python setup.py sdist bdist_wheel
412+
(plotly_dev) $ rm dist/*dirty*
401413
(plotly_dev) $ twine upload dist/plotly-X.Y.Z*
402414
```
403415

@@ -414,18 +426,20 @@ And ask one of your friends to do it too. Our tests should catch any issues, but
414426
Finally, publish the final version of the widget library to npm with:
415427

416428
```bash
417-
cd ./js
418-
npm publish --access public
429+
cd packages/javascript/jupyterlab-plotly
430+
npm build && npm publish --access public
431+
cd packages/javascript/plotlywidget
432+
npm build && npm publish --access public
419433
```
420434

421435
### Publishing to the plotly conda channel
422436
Follow the anaconda upload instructions as described for the release candidate
423437
above, except:
424438

425439
- Do not include the `--label test` argument when uploading
426-
440+
427441
```
428-
$ anaconda upload /path/to/anaconda3/conda-bld/noarch/plotly-*.tar.bz2
442+
$ anaconda upload /path/to/anaconda3/conda-bld/noarch/plotly-*.tar.bz2
429443
```
430444

431445
### Add GitHub Release entry
@@ -499,7 +513,7 @@ From `packages/python/plotly-geo`, build the conda packge
499513
Then upload to the plotly anaconda channel as described above
500514

501515
## Release process - chart-studio package
502-
The `chart-studio` package contains the utilities for interacting with
516+
The `chart-studio` package contains the utilities for interacting with
503517
Chart Studio (both Cloud or On-Prem).
504518

505519
### Update version
Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1-
pythonic plotly API for use in Jupyter
1+
JupyterLab Extension for Plotly.py
22

3-
Package Install
4-
---------------
3+
See https://plot.ly/python/getting-started/ for details.
54

6-
**Prerequisites**
7-
- [node](http://nodejs.org/)
8-
9-
```bash
10-
npm install --save plotlywidget
11-
```
5+
Install with `jupyter labextension install jupyterlab-plotly`
Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
pythonic plotly API for use in Jupyter
1+
Jupyter Extension for Plotly.py
22

3-
Package Install
4-
---------------
3+
See https://plot.ly/python/getting-started/ for details.
54

6-
**Prerequisites**
7-
- [node](http://nodejs.org/)
8-
9-
```bash
10-
npm install --save plotlywidget
11-
```
5+
Install with `jupyter labextension install plotlywidget` in JupyterLab, otherwise
6+
just install Plotly.py and it will automatically work in Classic Notebooks.

0 commit comments

Comments
 (0)