Skip to content

Commit ecded6b

Browse files
committed
Merge branch 'doc-prod' into pandas-1.0
2 parents 42abe3c + d6d6aa3 commit ecded6b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+3541
-3171
lines changed

.circleci/create_conda_optional_env.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if [ ! -d $HOME/miniconda/envs/circle_optional ]; then
1414
./miniconda.sh -b -p $HOME/miniconda
1515

1616
# Create environment
17-
# PYTHON_VERSION=3.6
17+
# PYTHON_VERSION=2.7 or 3.5
1818
$HOME/miniconda/bin/conda create -n circle_optional --yes python=$PYTHON_VERSION \
1919
requests nbformat six retrying psutil pandas decorator pytest mock nose poppler xarray scikit-image ipython jupyter ipykernel ipywidgets
2020

CHANGELOG.md

+21-3
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,30 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [4.5.2] - 2020-02-24
6+
7+
### Fixed
8+
9+
- Fix build errors in JupyterLab extension by pinning version of `@types/plotly.js` (#2223)(https://github.com/plotly/plotly.py/issues/2223)
10+
11+
## [4.5.1] - 2020-02-19
12+
13+
### Updated
14+
- Updated Plotly.js to version 1.52.2. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/releases/tag/v1.52.2) for more information on bug fixes.
15+
16+
### Fixed
17+
18+
- `update_annotations`, `update_shapes` and `update_layout_images` now no longer require the `patch` argument, as per the docstring [#2167](https://github.com/plotly/plotly.py/issues/2167)
19+
- `px.defaults` no longer accepts arbitrary keys [#2168](https://github.com/plotly/plotly.py/issues/2168)
20+
- better error message when `pandas` is not installed [#2125](https://github.com/plotly/plotly.py/issues/2125)
21+
- support columns of numerical type in `path` argument of `px.sunburst`/`px.treemap` and add values of `color` column in hoverlabel for `px.sunburst`/`px.treemap` [#2133](https://github.com/plotly/plotly.py/pull/2133)
22+
23+
24+
525
## [4.5.0] - 2020-01-22
626

727
### Updated
8-
- Updated Plotly.js to version 1.52.1. See the
9-
[plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/v1.52.0/CHANGELOG.md#1520----2020-01-08)
10-
for more information on numerous new attribute and bug fixes.
28+
- Updated Plotly.js to version 1.52.1. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/v1.52.0/CHANGELOG.md#1520----2020-01-08) for more information on numerous new attribute and bug fixes.
1129
- Plotly Express uses the new `legend.title` attribute and so now has shorter trace `name`s [#2051](https://github.com/plotly/plotly.py/pull/2051)
1230
- The heuristic used by `px.parallel_categories` to determine which columns of the data frame to draw has been changed and made more configurable with the `dimensions_max_cardinality` argument [#2102](https://github.com/plotly/plotly.py/pull/2102)
1331
- The `simple_white` colorbar styling has been streamlined [#2110](https://github.com/plotly/plotly.py/pull/2110)

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
## Quickstart
2828

29-
`pip install plotly==4.5.0`
29+
`pip install plotly==4.5.2`
3030

3131
Inside [Jupyter notebook](https://jupyter.org/install) (installable with `pip install "notebook>=5.3" "ipywidgets>=7.2"`):
3232

@@ -75,13 +75,13 @@ Built on top of [plotly.js](https://github.com/plotly/plotly.js), `plotly.py` is
7575
plotly.py may be installed using pip...
7676

7777
```
78-
pip install plotly==4.5.0
78+
pip install plotly==4.5.2
7979
```
8080

8181
or conda.
8282

8383
```
84-
conda install -c plotly plotly=4.5.0
84+
conda install -c plotly plotly=4.5.2
8585
```
8686

8787
### Jupyter Notebook Support
@@ -128,10 +128,10 @@ set NODE_OPTIONS=--max-old-space-size=4096
128128
jupyter labextension install @jupyter-widgets/[email protected] --no-build
129129
130130
# FigureWidget support
131-
jupyter labextension install [email protected].0 --no-build
131+
jupyter labextension install [email protected].2 --no-build
132132
133133
# and jupyterlab renderer support
134-
jupyter labextension install [email protected].0 --no-build
134+
jupyter labextension install [email protected].2 --no-build
135135
136136
# Build extensions (must be done to activate extensions since --no-build is used above)
137137
jupyter lab build

binder/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
jupytext
2-
plotly==4.5.0
2+
plotly==4.5.1
33
jupyter
44
notebook
55
pandas==0.23.0

contributing.md

+73-33
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,15 +205,15 @@ 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
216-
has been made in the `js/` directory source code, OR if the version of
216+
has been made in the `packages/javascript` directory source code, OR if the version of
217217
plotly.js has been updated. If neither of these is the case, there's no need
218218
to increment the `plotlywidget` version or to publish a new version to npm.
219219

@@ -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`.
@@ -253,7 +253,9 @@ Note that the conda installation instructions must include
253253
"-c plotly/lable/test" rather than "-c plotly" in order to install the
254254
release candidate version.
255255

256-
Commit Changelog and README updates.
256+
Update the `doc/python/getting-started.md` file with the same version numbers.
257+
258+
Commit Changelog, README and getting-started updates.
257259

258260
### Bump to release candidate version
259261
1) Manually update the plotlywidget version to `A.B.C-rc.1` in the files
@@ -263,17 +265,21 @@ specified below.
263265
+ Update `__frontend_version__` to `^A.B.C-rc.1` (Note the `^` prefix)
264266
- `packages/javascript/plotlywidget/package.json`
265267
+ Update `"version"` to `A.B.C-rc.1`
266-
268+
+ Run `npm install && npm run build`
269+
- `packages/javascript/jupyterlab-plotly/package.json`
270+
+ Update `"version"` to `A.B.C-rc.1`
271+
+ Run `npm install && npm run build`
272+
267273
2) Commit the changes
268-
274+
269275
3) Tag this commit on the release branch as `vX.Y.Zrc1` and `widget-vA.B.C-rc.1`
270-
276+
271277
In both cases `rc` is the semantic versioning code for Release Candidate.
272-
278+
273279
The number 1 means that this is the first release candidate, this number can
274280
be incremented if we need to publish multiple release candidates.
275281
Note that the `npm` suffix is `-rc.1` and the PyPI suffix is `rc1`.
276-
282+
277283
Publishing `plotly.py` and `plotlywidget` as release candidates
278284
allows us to go through the publication process, and test that the
279285
installed packages work properly before general users will get them by
@@ -291,44 +297,54 @@ And, you'll need the credentials file `~/.pypirc`. Request access from
291297
@jonmmease and @chriddyp. Then, from inside the repository:
292298

293299
```bash
300+
(plotly_dev) $ cd packages/python/plotly
294301
(plotly_dev) $ git checkout release_X.Y.Z
295302
(plotly_dev) $ git stash
303+
(plotly_dev) $ rm -rf dist
296304
(plotly_dev) $ python setup.py sdist bdist_wheel
305+
(plotly_dev) $ rm dist/*dirty*
297306
(plotly_dev) $ twine upload dist/plotly-X.Y.Zrc1*
298307
```
299308

300-
### Publish release candidate of `plotlywidget` to NPM
309+
Note: this will intentionally fail if your current git tree is dirty, because we want the tag
310+
to reflect what is being released, and the version number comes from the tag and the dirty-state.
311+
312+
313+
### Publish release candidate of `plotlywidget` and `jupyterlab-plotly` to NPM
301314
Now, publish the release candidate of the `plotlywidget` NPM package.
302315

303316
```bash
304-
cd ./js
305-
npm publish --access public --tag next
317+
cd ./packages/javascript/plotlywidget
318+
npm run build && npm publish --access public --tag next
306319
```
307320

308321
The `--tag next` part ensures that users won't install this version unless
309322
they explicitly ask for the version or for the version wtih the `next` tag.
310323

324+
Do the same in the `jupyterlab-plotly` directory.
325+
311326
### Publish release candidate to plotly anaconda channel
312327
To publish package to the plotly anaconda channel you'll need to have the
313328
anaconda or miniconda distribution installed, and you'll need to have the
314329
`anaconda-client` package installed.
315330

316331
```bash
332+
(plotly_dev) $ conda config --set anaconda_upload no
317333
(plotly_dev) $ conda build recipe/
318334
```
319335

320336
Next run `anaconda login` and enter the credentials for the plotly anaconda
321337
channel.
322-
338+
323339
Then upload artifacts to the anaconda channel using the test label. Using the test
324340
label will ensure that people will only download the release candidate version
325341
if they explicitly request it.
326342

327343
```
328-
$ anaconda upload --label test /path/to/anaconda3/conda-bld/noarch/plotly-*.tar.bz2
344+
$ anaconda upload --label test /path/to/anaconda3/conda-bld/noarch/plotly-*.tar.bz2
329345
```
330346

331-
Then logout with `anaconda logout`
347+
Then logout with `anaconda logout`
332348

333349
### Manually test the release candidate
334350
Create a fresh virtual environment (or conda environment) and install
@@ -340,7 +356,7 @@ https://github.com/jonmmease/plotly_ipywidget_notebooks using the classic
340356
notebook and JupyterLab. Make sure `FigureWidget` objects are displayed as
341357
plotly figures, and make sure the in-place updates and callbacks work.
342358

343-
If appropriate, ask users who have submitted bug reports or feature
359+
If appropriate, ask users who have submitted bug reports or feature
344360
requests that are resolved in this version to try out the release candidate.
345361

346362
If problems are found in the release candidate, fix them on the release
@@ -352,7 +368,7 @@ Update CHANGELOG with release date and update README with final versions.
352368

353369
In the conda installation instructions, be sure to change the
354370
"-c plotly/label/test" argument to "-c plotly"
355-
371+
356372
Commit updates.
357373

358374
### Finalize versions
@@ -361,17 +377,21 @@ release candidate suffix from the following version strings:
361377

362378
- `plotly/_widget_version.py`:
363379
+ Update `__frontend_version__` to `^A.B.C` (Note the `^` prefix)
364-
- `js/package.json`
380+
- `packages/javascript/plotlywidget/package.json`
381+
+ Update `"version"` to `A.B.C`
382+
+ Run `npm install && npm run build`
383+
- `packages/javascript/jupyterlab-plotly/package.json`
365384
+ Update `"version"` to `A.B.C`
366-
385+
+ Run `npm install && npm run build`
386+
367387
Commit and push to the release branch.
368388

369389
### Merge release into master
370390
Make sure the integration tests are passing on the release branch, then merge
371391
it into master on GitHub.
372392

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

376396
push the tag.
377397

@@ -391,10 +411,15 @@ Publish the final version to PyPI
391411

392412
```bash
393413
(plotly_dev) $ cd packages/python/plotly
414+
(plotly_dev) $ rm -rf dist
394415
(plotly_dev) $ python setup.py sdist bdist_wheel
416+
(plotly_dev) $ rm dist/*dirty*
395417
(plotly_dev) $ twine upload dist/plotly-X.Y.Z*
396418
```
397419

420+
Note: this will intentionally fail if your current git tree is dirty, because we want the tag
421+
to reflect what is being released, and the version number comes from the tag and the dirty-state.
422+
398423
After it has uploaded, move to another environment and double+triple check that you are able to upgrade ok:
399424
```bash
400425
$ pip install plotly --upgrade
@@ -408,18 +433,20 @@ And ask one of your friends to do it too. Our tests should catch any issues, but
408433
Finally, publish the final version of the widget library to npm with:
409434

410435
```bash
411-
cd ./js
412-
npm publish --access public
436+
cd packages/javascript/jupyterlab-plotly
437+
npm run build && npm publish --access public
438+
cd packages/javascript/plotlywidget
439+
npm run build && npm publish --access public
413440
```
414441

415442
### Publishing to the plotly conda channel
416443
Follow the anaconda upload instructions as described for the release candidate
417444
above, except:
418445

419446
- Do not include the `--label test` argument when uploading
420-
447+
421448
```
422-
$ anaconda upload /path/to/anaconda3/conda-bld/noarch/plotly-*.tar.bz2
449+
$ anaconda upload /path/to/anaconda3/conda-bld/noarch/plotly-*.tar.bz2
423450
```
424451

425452
### Add GitHub Release entry
@@ -431,6 +458,19 @@ Make "Release title" the same string as the tag.
431458

432459
Copy changelog section for this version as the "Describe this release"
433460

461+
### Upgrade doc requirements and API doc
462+
463+
Files to be updated:
464+
- `doc/apidoc/conf.py` with new version number
465+
- `doc/requirements.txt`
466+
- `binder/requirements.txt`
467+
468+
### Synchronize master and doc-prod branches
469+
470+
doc-prod should already have been merged on a regular basis into master, but
471+
start doing it first. Then merge master into doc-prod to deploy the doc related
472+
to features in the release.
473+
434474
### Post announcement
435475
Post a simple announcement to the Plotly Python forum, with links to the
436476
README installation instructions and to the CHANGELOG.
@@ -480,7 +520,7 @@ From `packages/python/plotly-geo`, build the conda packge
480520
Then upload to the plotly anaconda channel as described above
481521

482522
## Release process - chart-studio package
483-
The `chart-studio` package contains the utilities for interacting with
523+
The `chart-studio` package contains the utilities for interacting with
484524
Chart Studio (both Cloud or On-Prem).
485525

486526
### Update version

doc/apidoc/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
# The short X.Y version
2929
version = ""
3030
# The full version, including alpha/beta/rc tags
31-
release = "4.2"
31+
release = "4.5.1"
3232

3333

3434
# -- General configuration ---------------------------------------------------

0 commit comments

Comments
 (0)