Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Version 4 integration #1666

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 78 commits into from
Jul 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
2a44ce3
[v4 integration] Remove future flags (#1594)
jonmmease Jun 3, 2019
e840a9f
V4 chart studio extraction (#1597)
jonmmease Jun 5, 2019
90352b3
create_choropleth figure factory returns go.Figure (#1600)
emmanuelle Jun 10, 2019
59e36cf
Restructure repo with a top-level `packages/` directory (#1604)
jonmmease Jun 13, 2019
20e0ead
plotly_express integration (#1613)
jonmmease Jun 14, 2019
c4189cd
Restore plotlywidget/__init__.py
jonmmease Jun 14, 2019
641005f
Add plotly.graph_objects alias
jonmmease Jun 14, 2019
6a44329
Add update_layout figure method to update a figure's layout
jonmmease Jun 14, 2019
a123026
Add support for specifying `fig.data` as a scalar trace.
jonmmease Jun 14, 2019
b55c3f8
Fix deprecation warnings by using raw string to specify regexes
jonmmease Jun 14, 2019
380f7fc
Added dict-style `pop` method to Figure and graph objects
jonmmease Jun 14, 2019
1718a73
Remove legacy test cases that were only passing because
jonmmease Jun 14, 2019
dc16da6
Fix validator tests
jonmmease Jun 14, 2019
4c3aae5
Fix image test case
jonmmease Jun 14, 2019
9486e3b
V4 release instructions (#1618)
jonmmease Jun 15, 2019
1c5ba64
package metadata updates (#1619)
jonmmease Jun 15, 2019
17cf071
V4 alpha 2 release (#1620)
jonmmease Jun 15, 2019
6afca65
V4 chart studio updates (#1621)
jonmmease Jun 16, 2019
00f8891
Merge jupyterlab mime renderer extension into plotlywidget
jonmmease Jun 17, 2019
c5f5748
Rename combined extension jupyterlab-plotly
jonmmease Jun 17, 2019
8bce92d
Update plotly logo
jonmmease Jun 17, 2019
17b5ab1
Render static image versions of figures on notebook load
jonmmease Jun 17, 2019
58090ce
Revert figures to static images on WebGL context loss
jonmmease Jun 17, 2019
ec8e70c
Disable auto-animate on figures with frames
jonmmease Jun 17, 2019
73bcd4d
Comments / Review
jonmmease Jun 17, 2019
485d3cb
Fix dev build artifact paths
jonmmease Jun 17, 2019
53cae70
chart_studio: Delete existing file before creating rather than update
jonmmease Jun 18, 2019
7be7f19
Bumpy jupyterlab-plotly extension version to 1.0.0-alpha.1
jonmmease Jun 18, 2019
daa5bfc
Fix test URL expectation
jonmmease Jun 18, 2019
4bcd671
V4 Update add_trace, add_traces, and add_{trace} methods to return fi…
jonmmease Jun 18, 2019
2b54b67
V4 merge plotly jupyterlab extensions (#1623)
jonmmease Jun 18, 2019
a06bd15
Merge pull request #1625 from plotly/v4_chart_studio_overwrite
jonmmease Jun 18, 2019
958a6b7
bump chart studio version to 1.0.0a3
jonmmease Jun 18, 2019
874bbae
V4 insitute code formatting standard using Black (#1626)
jonmmease Jun 18, 2019
8dafbc6
V4 remove chunked_requests submodule (#1627)
jonmmease Jun 19, 2019
7b6fad9
Remove plot.ly URL in exported HTML if user didn't enable link or sen…
jonmmease Jun 19, 2019
a6005e0
V4: Have side-effect renderers show figure on display (#1629)
jonmmease Jun 19, 2019
b90126e
V4 refine dependencies (#1631)
jonmmease Jun 19, 2019
14883ac
Update to plotly.js 1.48.3 (#1632)
jonmmease Jun 20, 2019
0cf8783
Merge branch 'master' into v4_integration
jonmmease Jun 20, 2019
e640879
V4 alpha4 release (#1633)
jonmmease Jun 20, 2019
6014071
build jupyterlab-plotly
jonmmease Jun 20, 2019
e140a28
Fix conda build for new repo structure
jonmmease Jun 20, 2019
652bdcf
Update templates so that surface and heatmapgl traces pick up default…
jonmmease Jun 21, 2019
09b3d80
Remove reference to deprecated "plotly_v4_colors" template
jonmmease Jun 21, 2019
5f743ff
Template updates
jonmmease Jun 22, 2019
d23a90f
Codegen docstring updates for template properties
jonmmease Jun 22, 2019
91bcd07
Have px honor the symbol sequence and line dash sequence from template
jonmmease Jun 22, 2019
99a1890
Added azure renderer
jonmmease Jun 24, 2019
96569c4
Bundle plotly.js in html for iframe renderer for chrome compatibility
jonmmease Jun 24, 2019
98910e7
Don't ignore dataset files, add files
jonmmease Jun 25, 2019
eebd905
changed column name in wind dataset (#1637)
emmanuelle Jun 25, 2019
698e0b8
Update plotly templates to default to shapes with outline and not fill
jonmmease Jun 29, 2019
bdd5a3a
Fix initialization of 'none' template
jonmmease Jun 30, 2019
de02fca
v4 colorscale updates (#1647)
jonmmease Jul 1, 2019
d913f8e
Updated chart-studio logic to not overwrite files when filename not p…
jonmmease Jul 1, 2019
56edaa6
bump chart-studio to alpha 5
jonmmease Jul 1, 2019
a156246
Fix availability of plotlyjs colors
jonmmease Jul 1, 2019
f859f26
Updates for jupyterlab 1.0
jonmmease Jul 1, 2019
156f19b
v4: Split jupyterlab extensions (#1650)
jonmmease Jul 1, 2019
289ed89
Bump alpha versions
jonmmease Jul 1, 2019
39daa70
downgrade readme insructions to JupyterLab 0.35
jonmmease Jul 1, 2019
5e84da1
Merge sphinx gallery scraper commit into v4_integration
jonmmease Jul 3, 2019
09fec98
Add nteract renderer detection
jonmmease Jul 3, 2019
1836fec
Fix visibility of bar trace error bars in templates (#1656)
jonmmease Jul 4, 2019
7283012
Change compatibility of plotlywidget to JupyterLab 1.0
jonmmease Jul 4, 2019
fbf7c15
Update readme instructions to JupyterLab 1.0.0 and plotlywidget 1.0.0…
jonmmease Jul 4, 2019
9b150cc
gantt ff should return go.Figure object (#1607)
emmanuelle Jul 4, 2019
3b915ff
Merge branch 'v4_integration' of github.com:plotly/plotly.py into v4_…
jonmmease Jul 4, 2019
7ce3c00
Initial version 4 changelog
jonmmease Jul 8, 2019
d9229ec
When updating an initialized tuple property with a longer tuple,
jonmmease Jul 8, 2019
f589b66
When updating an initialized tuple property with a longer tuple,
jonmmease Jul 8, 2019
cbf9b84
Update migration guide to reference v4-migration documentation page
jonmmease Jul 8, 2019
58a96e7
Fix stored version in conda packages
jonmmease Jul 9, 2019
09f7879
Update to rc1 versions
jonmmease Jul 9, 2019
b39db73
Auto detect Spyder and enable SVG renderer
jonmmease Jul 16, 2019
6613db8
Update to final versions
jonmmease Jul 16, 2019
9b8f4be
Update changelog date
jonmmease Jul 16, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
82 changes: 51 additions & 31 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
version: 2

jobs:
check-code-formatting:
docker:
- image: circleci/python:3.7-stretch-node-browsers

steps:
- checkout
- run:
name: Install black
command: 'sudo pip install black'
- run:
name: Check formatting with black
command: 'black --check .'

# Core
python-2.7-core:
docker:
Expand All @@ -15,7 +28,7 @@ jobs:
command: 'sudo pip install tox'
- run:
name: Test with tox
command: 'tox -e py27-core'
command: 'cd packages/python/plotly; tox -e py27-core'
no_output_timeout: 20m

python-3.5-core:
Expand All @@ -31,7 +44,7 @@ jobs:
command: 'sudo pip install tox'
- run:
name: Test with tox
command: 'tox -e py35-core'
command: 'cd packages/python/plotly; tox -e py35-core'
no_output_timeout: 20m

python-3.6-core:
Expand All @@ -47,7 +60,7 @@ jobs:
command: 'sudo pip install tox'
- run:
name: Test with tox
command: 'tox -e py36-core'
command: 'cd packages/python/plotly; tox -e py36-core'
no_output_timeout: 20m

python-3.7-core:
Expand All @@ -63,7 +76,7 @@ jobs:
command: 'sudo pip install tox'
- run:
name: Test with tox
command: 'tox -e py37-core'
command: 'cd packages/python/plotly; tox -e py37-core'
no_output_timeout: 20m

# Optional
Expand All @@ -80,11 +93,11 @@ jobs:
command: 'sudo pip install tox'
- run:
name: Install npm dependencies
command: cd plotly/tests/test_optional/test_jupyter && npm install
command: cd packages/python/plotly/plotly/tests/test_optional/test_jupyter && npm install
no_output_timeout: 20m
- run:
name: Test with tox
command: 'tox -e py27-optional'
command: 'cd packages/python/plotly; tox -e py27-optional'
no_output_timeout: 20m

python-3.5-optional:
Expand All @@ -100,11 +113,11 @@ jobs:
command: 'sudo pip install tox'
- run:
name: Install npm dependencies
command: cd plotly/tests/test_optional/test_jupyter && npm install
command: cd packages/python/plotly/plotly/tests/test_optional/test_jupyter && npm install
no_output_timeout: 20m
- run:
name: Test with tox
command: 'tox -e py35-optional'
command: 'cd packages/python/plotly; tox -e py35-optional'
no_output_timeout: 20m

python-3.6-optional:
Expand All @@ -120,11 +133,11 @@ jobs:
command: 'sudo pip install tox'
- run:
name: Install npm dependencies
command: cd plotly/tests/test_optional/test_jupyter && npm install
command: cd packages/python/plotly/plotly/tests/test_optional/test_jupyter && npm install
no_output_timeout: 20m
- run:
name: Test with tox
command: 'tox -e py36-optional'
command: 'cd packages/python/plotly; tox -e py36-optional'
no_output_timeout: 20m

python-3.7-optional:
Expand All @@ -140,11 +153,11 @@ jobs:
command: 'sudo pip install tox'
- run:
name: Install npm dependencies
command: cd plotly/tests/test_optional/test_jupyter && npm install
command: cd packages/python/plotly/plotly/tests/test_optional/test_jupyter && npm install
no_output_timeout: 20m
- run:
name: Test with tox
command: 'tox -e py37-optional'
command: 'cd packages/python/plotly; tox -e py37-optional'
no_output_timeout: 20m

# Plot.ly
Expand All @@ -161,7 +174,7 @@ jobs:
command: 'sudo pip install tox'
- run:
name: Test with tox
command: 'tox -e py27-plot_ly'
command: 'cd packages/python/chart-studio; tox -e py27-plot_ly'
no_output_timeout: 20m

python-3.5-plot_ly:
Expand All @@ -177,7 +190,7 @@ jobs:
command: 'sudo pip install tox'
- run:
name: Test with tox
command: 'tox -e py35-plot_ly'
command: 'cd packages/python/chart-studio; tox -e py35-plot_ly'
no_output_timeout: 20m

python-3.7-plot_ly:
Expand All @@ -193,7 +206,7 @@ jobs:
command: 'sudo pip install tox'
- run:
name: Test with tox
command: 'tox -e py37-plot_ly'
command: 'cd packages/python/chart-studio; tox -e py37-plot_ly'
no_output_timeout: 20m

python-2-7-orca:
Expand All @@ -220,8 +233,8 @@ jobs:
command: |
. /home/circleci/miniconda/etc/profile.d/conda.sh
conda activate circle_optional
pytest --disable-warnings plotly/tests/test_core
pytest plotly/tests/test_orca
pytest --disable-warnings packages/python/plotly/plotly/tests/test_core
pytest packages/python/plotly/plotly/tests/test_orca

- store_artifacts:
path: plotly/tests/test_orca/images/linux/failed
Expand Down Expand Up @@ -250,8 +263,8 @@ jobs:
command: |
. /home/circleci/miniconda/etc/profile.d/conda.sh
conda activate circle_optional
pytest --disable-warnings plotly/tests/test_core
pytest plotly/tests/test_orca
pytest --disable-warnings packages/python/plotly/plotly/tests/test_core
pytest packages/python/plotly/plotly/tests/test_orca

- store_artifacts:
path: plotly/tests/test_orca/images/linux/failed
Expand Down Expand Up @@ -280,8 +293,8 @@ jobs:
command: |
. /home/circleci/miniconda/etc/profile.d/conda.sh
conda activate circle_optional
pytest --disable-warnings plotly/tests/test_core
pytest plotly/tests/test_orca
pytest --disable-warnings packages/python/plotly/plotly/tests/test_core
pytest packages/python/plotly/plotly/tests/test_orca

- store_artifacts:
path: plotly/tests/test_orca/images/linux/failed
Expand All @@ -297,47 +310,53 @@ jobs:
- checkout
- run:
name: Install tox
command: 'sudo pip install tox requests yapf pytz decorator retrying inflect'
command: 'sudo pip install retrying tox black inflect'
- run:
name: Update plotlywidget version
command: 'python setup.py updateplotlywidgetversion'
name: Update jupyterlab-plotly version
command: 'cd packages/python/plotly; python setup.py updateplotlywidgetversion'
- run:
name: Update plotly.js to dev
command: 'python setup.py updateplotlyjsdev'
command: 'cd packages/python/plotly; python setup.py updateplotlyjsdev'
- run:
name: Test with tox
command: |
cd packages/python/plotly
locale
tox -e py37-core -- -a '!nodev'
no_output_timeout: 20m
- run:
name: Commit
command: |
cd packages/python/plotly
sudo mkdir /dist
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
git add -A
git commit -m "Codegen"
when: always
- run:
name: Build source distribution package
name: Build source distribution packages
command: |
cd packages/python/plotly
python setup.py sdist
sudo cp dist/* /dist
when: always
- run:
name: npm-pack widget
command: |
cd js/
cd packages/javascript/jupyterlab-plotly/
npm install webpack
npm pack
sudo cp ./plotlywidget* /dist
sudo cp ./jupyterlab-plotly* /dist
when: always
- store_artifacts:
path: /dist
path: packages/python/plotly/dist

workflows:
version: 2
code_formatting:
jobs:
- check-code-formatting
dev_build:
jobs:
- plotlyjs_dev_build
Expand All @@ -354,8 +373,9 @@ workflows:
# 3.7 optional disabled due to current shapely incompatibility
# - python-3.7-optional
- python-2.7-plot_ly
- python-3.5-plot_ly
- python-3.7-plot_ly
- python-3.7-plot_ly:
requires:
- python-2.7-plot_ly
- python-2-7-orca
- python-3-5-orca
- python-3-7-orca
2 changes: 1 addition & 1 deletion .circleci/create_conda_optional_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if [ ! -d $HOME/miniconda/envs/circle_optional ]; then
# Create environment
# PYTHON_VERSION=3.6
$HOME/miniconda/bin/conda create -n circle_optional --yes python=$PYTHON_VERSION \
requests six pytz retrying psutil pandas decorator pytest mock nose poppler xarray scikit-image ipython
requests nbformat six retrying psutil pandas decorator pytest mock nose poppler xarray scikit-image ipython

# Install orca into environment
$HOME/miniconda/bin/conda install --yes -n circle_optional -c plotly plotly-orca
Expand Down
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

*.gz

# Don't ignore dataset files
!*.csv.gz

*.ipynb

*.coverage
Expand All @@ -20,7 +23,7 @@ plotly/presentation_objs/

.idea

js/node_modules/
node_modules/

.pytest_cache

Expand All @@ -35,3 +38,5 @@ plotly.egg-info/

plotly/tests/test_orca/images/*/failed
plotly/tests/test_orca/images/*/tmp
/plotly-package/plotly/tests/test_core/test_offline/plotly.min.js
temp-plot.html
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
repos:
- repo: https://github.com/ambv/black
rev: stable
hooks:
- id: black
language_version: python
51 changes: 49 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,53 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [4.0.0] - 2019-07-16

This is a major release that includes many new features, and a few breaking changes. See the [version 4 announcement]() for a summary of the important changes.

### Updated
- Updated Plotly.js to version 1.48.3. See the
[plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#1483----2019-06-13)
for more information.

### Added
- The Plotly Express tech preview (https://medium.com/@plotlygraphs/introducing-plotly-express-808df010143d) has been integrated as the `plotly.express` module ([#1613](https://github.com/plotly/plotly.py/pull/1613))
- Added a new renderers framework the supports rendering figure in a wide variety of contexts ([#1474](https://github.com/plotly/plotly.py/pull/1474)). See the new [Displaying Plotly Figures](https://plot.ly/python/next/renderers) documentation page for more information.
- Added `plotly.io.write_html` and `plotly.io.to_html` functions for exporting figures to HTML ([1474](https://github.com/plotly/plotly.py/pull/1474)). Also available as `.write_html` and `.to_html` figure methods.
- Added new figure methods for batch updating figure properties (`update_layout`, `update_traces`, `update_xaxes`, etc.) ([#1624](https://github.com/plotly/plotly.py/pull/1624)). See the new [Creating and Updating Figures](https://plot.ly/python/next/creating-and-updating-figures/) documentation page for more details.
- Added support for all trace types in `make_subplots` ([#1528](https://github.com/plotly/plotly.py/pull/1528))
- Added support for secondary y-axes in `make_subplots` ([#1564](https://github.com/plotly/plotly.py/pull/1564))
- Support passing a scalar trace object (rather than a list or tuple of trace objects) as the `data` property to the `Figure` constructor ([#1614](https://github.com/plotly/plotly.py/pull/1614))
- Added dictionary-stule `.pop` method to graph object classes ([#1614](https://github.com/plotly/plotly.py/pull/1614))
- New `jupyterlab-plotly` JupyterLab extension for rendering figures in JupyterLab. Replaces the `@jupyterlab/plotly-extension` extension, and includes JupyterLab 1.0 support.
- Added new suite of built-in colorscales to the `plotly.colors` module, and support for specifying this wide range of colorscales by name. Also added support for specifying colorscales as a list of colors, in which case the color spacing is assumed to be uniform ([#1647](https://github.com/plotly/plotly.py/pull/1647)).
- Added `sphinx-gallery` renderer for embedding plotly figures in [Sphinx-Gallery](https://sphinx-gallery.github.io/) ([#1577](https://github.com/plotly/plotly.py/pull/1577), [plotly/plotly-sphinx-gallery](https://github.com/plotly/plotly-sphinx-gallery)).

### Removed
- The follow modules for interfacing with the Chart Studio cloud service have been removed from plotly.py and moved to the new `chart-studio` distribution package. The following modules have been moved to a new top-level `chart_studio` module:
- `plotly.plotly` -> `chart_studio.plotly`
- `plotly.api` -> `chart_studio.api`
- `plotly.dashboard_objs` -> `chart_studio.dashboard_objs`
- `plotly.grid_objs` -> `chart_studio.grid_objs`
- `plotly.presentation_objs` -> `chart_studio.presentation_objs`
- The legacy `plotly.widgets.GraphWidget` class for displaying online figures hosted by Chart Studio as ipywidgets has been removed. Please use the offline, and much more capable, `plotly.graph_objects.FigureWidget` class instead.
- The `fileopt` argument to `chart_studio.plotly.plot` has been removed, so in-place modifications to previously published figures are no longer supported, and a figure will always overwrite a figure with the same name.

### Changed
- The `'plotly'` template is used as the default theme across all figures.
- In order to reduce the size of the core `plotly` distribution package, the bundled geographic shape files used by the `create_choropleth` figure factory have been moved to a new optional `plotly-geo` distribution package ([1604](https://github.com/plotly/plotly.py/pull/1604))
- For consistency with other figure factories, the `create_choropleth` and `create_gantt` figure factories now always returns `Figure` objects, rather than dictionaries ([#1600](https://github.com/plotly/plotly.py/pull/1600), [#1607](https://github.com/plotly/plotly.py/pull/1607)).
- Figure add trace methods (`.add_trace`, `.add_traces`, `.add_scatter`, etc.) now return a reference to the calling figure, rather than the newly created trace ([#1624](https://github.com/plotly/plotly.py/pull/1624))
- `plotly.tools.make_subplots` has been moved to `plotly.subplots.make_subplots`, though it is still available at the previous location for backward compatibility
- The `plotly.graph_objs` module has been moved to `plotly.graph_objects`, though it is still available at the previous location for backward compatibility ([#1614](https://github.com/plotly/plotly.py/pull/1614))
- Trace `uid` properties are only generated automatically when a trace is added to a `FigureWidget`. When a trace is added to a standard `Figure` graph object the input `uid`, if provided, is accepted as is ([#1580](https://github.com/plotly/plotly.py/pull/1580)).
- `datetime` objects that include timezones are not longer converted to UTC ([#1581](https://github.com/plotly/plotly.py/pull/1581))
- When a tuple property (e.g. `layout.annotations`) is updated with a list/tuple that is longer than the current value, the extra elements are appended to the end of the tuple.

### Fixed
- Fixed visibility of `bar` trace error bars in built-in templates ([1656](https://github.com/plotly/plotly.py/pull/1656))


## [3.10.0] - 2019-05-31

### Updated
Expand Down Expand Up @@ -641,7 +688,7 @@ must be installed:
- From here forward, new versions of plotly.py will be published to the [plotly anaconda channel](https://anaconda.org/plotly/)
on the same day they are published to PyPI.
([72ad0e4](https://github.com/plotly/plotly.py/commit/72ad0e4bf54bb8a06445d2ca55488ffc11c836a7))
- The [`README`](README.md) now includes conda installation instructions alongside the pip instructions.
- The [`README`](packages/python/plotly-geo/README.md) now includes conda installation instructions alongside the pip instructions.
- In addition to the existing installation approaches, orca is now also available as a
[conda package](https://anaconda.org/plotly/plotly-orca) from the plotly anaconda channel.

Expand Down Expand Up @@ -703,7 +750,7 @@ must be installed:

### JupyterLab Versions
For use with JupyterLab, the following versions of the following packages
must be installed. See [README.md](README.md) for instructions.
must be installed. See [README.md](packages/python/plotly-geo/README.md) for instructions.

- Python Packages
- plotly==3.1.0
Expand Down
Loading