Skip to content

Commit 83bd88e

Browse files
Merge branch 'plotly:main' into patch-3
2 parents a14f4cb + 627c0e9 commit 83bd88e

File tree

30,198 files changed

+740401
-962759
lines changed

Some content is hidden

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

30,198 files changed

+740401
-962759
lines changed

.circleci/config.yml

+185-373
Large diffs are not rendered by default.

.flake8

-2
This file was deleted.

.gitattributes

-1
This file was deleted.

.github/pull_request_template.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ below :-).
77
### Documentation PR
88
99
- [ ] I've [seen the `doc/README.md` file](https://github.com/plotly/plotly.py/blob/master/doc/README.md)
10-
- [ ] This change runs in the current version of Plotly on PyPI and targets the `doc-prod` branch OR it targets the `master` branch
10+
- [ ] This change runs in the current version of Plotly on PyPI and targets the `doc-prod` branch OR it targets the `main` branch
1111
- [ ] If this PR modifies the first example in a page or adds a new one, it is a `px` example if at all possible
1212
- [ ] Every new/modified example has a descriptive title and motivating sentence or paragraph
1313
- [ ] Every new/modified example is independently runnable
@@ -27,7 +27,7 @@ below :-).
2727
2828
## Code PR
2929
30-
- [ ] I have read through the [contributing notes](https://github.com/plotly/plotly.py/blob/master/contributing.md) and understand the structure of the package. In particular, if my PR modifies code of `plotly.graph_objects`, my modifications concern the `codegen` files and not generated files.
30+
- [ ] I have read through the [contributing notes](https://github.com/plotly/plotly.py/blob/master/CONTRIBUTING.md) and understand the structure of the package. In particular, if my PR modifies code of `plotly.graph_objects`, my modifications concern the `codegen` files and not generated files.
3131
- [ ] I have added tests (if submitting a new feature or correcting a bug) or
3232
modified existing tests.
3333
- [ ] For a new feature, I have added documentation examples in an existing or

.github/workflows/check-js-build.yml

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
on: push
2+
3+
jobs:
4+
check-js-build:
5+
name: Check JS build artifacts
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v4
9+
- name: Set up Python
10+
uses: actions/setup-python@v5
11+
with:
12+
python-version: "3.x"
13+
14+
- name: Install Node
15+
uses: actions/setup-node@v2
16+
with:
17+
node-version: '22'
18+
19+
- name: Copy current files to a temporary directory
20+
run: |
21+
cp -R plotly/labextension/ plotly/labextension-tmp/
22+
23+
- name: Install dependencies and build
24+
run: |
25+
curl -LsSf https://astral.sh/uv/install.sh | sh
26+
uv venv
27+
source .venv/bin/activate
28+
uv pip install jupyter
29+
cd js
30+
npm ci
31+
npm run build
32+
- name: Check JupyterLab build artifacts
33+
run: |
34+
# 1. Hash contents of all static files, sort by content hash
35+
find plotly/labextension/static -type f -exec sha256sum {} \; | awk '{print $1}' | sort > new_hashes.txt
36+
find plotly/labextension-tmp/static -type f -exec sha256sum {} \; | awk '{print $1}' | sort > old_hashes.txt
37+
38+
# 2. Compare the sorted content hashes
39+
diff old_hashes.txt new_hashes.txt > content_diff.txt
40+
41+
# Remove the "load" line from both package.json files before comparing
42+
grep -v '"load": "static/' plotly/labextension/package.json > pkg1.json
43+
grep -v '"load": "static/' plotly/labextension-tmp/package.json > pkg2.json
44+
45+
# Compare stripped versions
46+
diff pkg1.json pkg2.json > package_json_diff.txt
47+
48+
# 5. Final check
49+
if [ -s content_diff.txt ] || [ -s package_json_diff.txt ]; then
50+
echo "❌ Build artifacts differ:"
51+
echo "--- Unexpected diffs ---"
52+
cat content_diff.txt
53+
echo "--- Unexpected package.json diffs ---"
54+
cat package_json_diff.txt
55+
echo "Please replace the 'plotly/labextension' directory with the artifacts of this CI run."
56+
exit 1
57+
else
58+
echo "✅ Build artifacts match expected output (ignoring known 'load' hash in package.json)."
59+
fi
60+
61+
- name: Store the build artifacts from plotly/labextension
62+
uses: actions/upload-artifact@v4
63+
if: failure()
64+
with:
65+
name: labextension
66+
path: plotly/labextension

.github/workflows/test-release.yml

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
2+
3+
on:
4+
workflow_dispatch
5+
6+
jobs:
7+
build:
8+
name: Build distribution 📦
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
persist-credentials: false
15+
- name: Set up Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: "3.x"
19+
20+
- name: Install Node
21+
uses: actions/setup-node@v2
22+
with:
23+
node-version: '22'
24+
25+
- name: Install npm dependencies
26+
run: |
27+
curl -LsSf https://astral.sh/uv/install.sh | sh
28+
uv venv
29+
source .venv/bin/activate
30+
uv pip install jupyter
31+
cd js
32+
npm ci --verbose
33+
npm run build --verbose
34+
35+
- name: Install pypa/build
36+
run: >-
37+
python3 -m
38+
pip install
39+
build
40+
--user
41+
- name: Build a binary wheel and a source tarball
42+
run: python3 -m build
43+
- name: Store the distribution packages
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: python-package-distributions
47+
path: dist/
48+
49+
publish-to-testpypi:
50+
name: Publish Python 🐍 distribution 📦 to TestPyPI
51+
needs:
52+
- build
53+
runs-on: ubuntu-latest
54+
55+
environment:
56+
name: testpypi
57+
url: https://test.pypi.org/p/plotly
58+
59+
permissions:
60+
id-token: write # IMPORTANT: mandatory for trusted publishing
61+
62+
steps:
63+
- name: Download all the dists
64+
uses: actions/download-artifact@v4
65+
with:
66+
name: python-package-distributions
67+
path: dist/
68+
- name: Publish distribution 📦 to TestPyPI
69+
uses: pypa/gh-action-pypi-publish@release/v1
70+
with:
71+
repository-url: https://test.pypi.org/legacy/

.gitignore

+7-11
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
0
22
0.html
33
iframe_figures/
4-
packages/python/plotly/plotly/tests/test_orca/images/linux/failed/
4+
tests/test_orca/images/linux/failed/
55

66
*.egg-info
77

@@ -15,6 +15,7 @@ doc/python/raw.githubusercontent.com/
1515

1616
# Don't ignore dataset files
1717
!*.csv.gz
18+
!*.geojson.gz
1819

1920
*.ipynb
2021

@@ -48,9 +49,9 @@ plotly.egg-info/
4849
# macOS utility file
4950
**/.DS_Store
5051

51-
plotly/tests/test_orca/images/*/failed
52-
plotly/tests/test_orca/images/*/tmp
53-
/plotly-package/plotly/tests/test_core/test_offline/plotly.min.js
52+
tests/test_orca/images/*/failed
53+
tests/test_orca/images/*/tmp
54+
tests/test_core/test_offline/plotly.min.js
5455
temp-plot.html
5556
.vscode
5657
doc/python/.ipynb_checkpoints
@@ -59,10 +60,5 @@ doc/.ipynb_checkpoints
5960
tags
6061
doc/check-or-enforce-order.py
6162

62-
packages/javascript/jupyterlab-plotly/lib/
63-
packages/python/plotly/jupyterlab_plotly/labextension/
64-
packages/python/plotly/jupyterlab_plotly/nbextension/index.js*
65-
packages/python/plotly/plotly/package_data/widgetbundle.js
66-
67-
test/percy/*.html
68-
test/percy/pandas2/*.html
63+
tests/percy/*.html
64+
tests/percy/pandas2/*.html

.pre-commit-config.yaml

-6
This file was deleted.

CHANGELOG.md

+27-10
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,25 @@
1-
# Change Log
1+
# Changelog
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-
## [6.0.0rc0] - 2024-11-27
5+
## Unreleased
6+
7+
### Fixed
8+
- Fix third-party widget display issues in v6 [[#5102]https://github.com/plotly/plotly.py/pull/5102]
9+
10+
## [6.0.1] - 2025-03-14
11+
12+
### Updated
13+
- Updated Plotly.js from version 3.0.0 to version 3.0.1. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#301----2025-02-18) for more information.
14+
15+
16+
### Fixed
17+
- Fix `TypeError` when using `orjson` to serialize `pandas.NA` [[#5040](https://github.com/plotly/plotly.py/pull/5040)].
18+
- Fix issue where using `category_orders` on `px.pie` raised `ColumnNotFoundError` [[#5000](https://github.com/plotly/plotly.py/pull/5000)].
19+
- Fix incorrect `DeprecationWarning` shown when creating a `px` chart [[#5080](https://github.com/plotly/plotly.py/pull/5080), [#5086](https://github.com/plotly/plotly.py/pull/5086)]
20+
21+
22+
## [6.0.0] - 2025-01-28
623

724
### Added
825
- Add `plotly[express]` extra for easily installing Plotly Express dependencies [[#4644](https://github.com/plotly/plotly.py/pull/4644)]
@@ -14,12 +31,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1431
- Drop support for Jupyter Notebook version 6 and earlier [[#4822](https://github.com/plotly/plotly.py/pull/4822)]. The minimum supported version is now 7.0.0.
1532

1633
### Updated
17-
- Deprecate Mapbox-based traces.[[#4900](https://github.com/plotly/plotly.py/pull/4900)]. See the [MapLibre Migration](https://plotly.com/python/mapbox-to-maplibre/) page for details on migrating from Mapbox to Maplibre.
18-
- Update plotly.py to use base64 encoding of typed arrays e.g. numpy in plotly JSON to keep precision intact and improve performance [[#4470](https://github.com/plotly/plotly.py/pull/4470)].
19-
- Make plotly-express dataframe agnostic via Narwhals [[#4790](https://github.com/plotly/plotly.py/pull/4790)].
20-
- Update `go.FigureWidget` to use `anywidget` [[#4823](https://github.com/plotly/plotly.py/pull/4823)]
21-
- Use modern [native ES6 import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) to load plotly.js bundle instead of requirejs which is [no longer under active development](https://github.com/requirejs/r.js/compare/2.3.6...2.3.7) [[#4736](https://github.com/plotly/plotly.py/pull/4763)]
22-
- Update Plotly.js from version 2.34.2 to version 3.0.0-rc1 See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#300-rc1----2024-11-27) for more information. These changes are reflected in the auto-generated `plotly.graph_objects` module. Notable changes include:
34+
- Update Plotly.js from version 2.34.2 to version 3.0.0 See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#300----2025-01-27) for more information. These changes are reflected in the auto-generated `plotly.graph_objects` module. Notable changes include:
2335
- Make offsetgroup work with barmode "stacked" and "relative" for bar traces [[#7009](https://github.com/plotly/plotly.js/pull/7009)]
2436
- Drop support for deprecated attributes `titlefont`, `titleposition`, `titleside`, and `titleoffset` [[#7212](https://github.com/plotly/plotly.js/pull/7212)].
2537
- Drop deprecated pointcloud and heatmapgl traces and gl2d subplots [[#7213](https://github.com/plotly/plotly.js/pull/7213)]
@@ -31,6 +43,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
3143
- Drop deprecated `zauto`, `zmin` and `zmax` from the surface trace [[#7234](https://github.com/plotly/plotly.js/pull/7234)]
3244
- Drop deprecated `autotick` attributes from cartesian axes [[#7236](https://github.com/plotly/plotly.js/pull/7236)]
3345
- Drop `transforms` from the API [[#7240](https://github.com/plotly/plotly.js/pull/7240), [#7254](https://github.com/plotly/plotly.js/pull/7254)]
46+
- Deprecate Mapbox-based traces.[[#4900](https://github.com/plotly/plotly.py/pull/4900)]. See the [MapLibre Migration](https://plotly.com/python/mapbox-to-maplibre/) page for details on migrating from Mapbox to Maplibre.
47+
- Update plotly.py to use base64 encoding of typed arrays e.g. numpy in plotly JSON to keep precision intact and improve performance [[#4470](https://github.com/plotly/plotly.py/pull/4470)].
48+
- Make plotly-express dataframe agnostic via Narwhals [[#4790](https://github.com/plotly/plotly.py/pull/4790)].
49+
- Update `go.FigureWidget` to use `anywidget` [[#4823](https://github.com/plotly/plotly.py/pull/4823)]
50+
- Use modern [native ES6 import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) to load plotly.js bundle instead of requirejs which is [no longer under active development](https://github.com/requirejs/r.js/compare/2.3.6...2.3.7) [[#4736](https://github.com/plotly/plotly.py/pull/4763)]
3451

3552
### Fixed
3653
- Fix a bug in JupyterLab >= 4 and Jupyter Notebook >= 7 that caused LaTeX to not render in plotly charts [[#4763](https://github.com/plotly/plotly.py/pull/4763)].
@@ -716,7 +733,7 @@ This version includes several performance improvements ([#2368](https://github.c
716733
- Introduce range breaks on date axes (for example, to remove week-ends) via `layout.xaxis.rangebreaks`
717734
- Introduce a new unified x (or y) hovermode (`layout.hovermode="x unified"`), in which the hover box shows the information for all traces at a given x (or y) position
718735
- Add `node.customdata` and `link.customdata` to sankey traces
719-
- Updated [contributing notes](https://github.com/plotly/plotly.py/blob/master/contributing.md) for more explanations on how to contribute to plotly.py [#2290](https://github.com/plotly/plotly.py/pull/2290). Please give feedback on these notes!
736+
- Updated [contributing notes](https://github.com/plotly/plotly.py/blob/master/CONTRIBUTING.md) for more explanations on how to contribute to plotly.py [#2290](https://github.com/plotly/plotly.py/pull/2290). Please give feedback on these notes!
720737
- Updated documentation examples [#2325](https://github.com/plotly/plotly.py/pull/2325), and to show how to color links in Sankey diagrams [#2291](https://github.com/plotly/plotly.py/pull/2291).
721738
- Special thanks to [@SylwiaOliwia2](https://github.com/SylwiaOliwia2) and [@dangercrow](https://github.com/dangercrow) for improving our documentation!
722739

@@ -1738,7 +1755,7 @@ This is a major version with many exciting updates. See the [Introducing plotly.
17381755
- Error message for `plotly.figure_factory.create_choropleth` is now helpful to Anaconda users who do not have the correct modules installed for the County Choropleth figure factory.
17391756

17401757
### Changed / Deprecated
1741-
Please see the [migration guid](migration-guide.md) for a full list of the changes and deprecations in version 3.0.0
1758+
Please see the [migration guide](MIGRATION_GUIDE.md) for a full list of the changes and deprecations in version 3.0.0
17421759

17431760

17441761

0 commit comments

Comments
 (0)