Skip to content

Merge main to doc-prod and make docs changes live #5252

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 377 commits into from
Jun 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
377 commits
Select commit Hold shift + click to select a range
0ee60e7
Pin shapely version in test requirements
marthacryan Apr 4, 2025
4a2f699
Make default renderer in jupyterlab/notebook plotly_mimetype
marthacryan Apr 7, 2025
0fb1f67
remove ff.create_choropleth test
emilykl Apr 7, 2025
533f504
Merge pull request #5132 from plotly/remove-create-choropleth-test
emilykl Apr 7, 2025
9180733
Update CHANGELOG.md
emilykl Apr 7, 2025
062809c
Merge pull request #5133 from plotly/changelog-not-change-log
gvwilson Apr 8, 2025
7d8f8ad
Merge branch 'main' into remove-append-trace
LiamConnors Apr 8, 2025
de7f742
Merge branch 'main' into patch-2
LiamConnors Apr 8, 2025
b6d86a7
Merge pull request #5126 from plotly/remove-append-trace
LiamConnors Apr 8, 2025
1647279
Update print_grid default
LiamConnors Apr 8, 2025
151f544
fix return type
LiamConnors Apr 8, 2025
d69844f
feat: incorporating feedback from @emilykl
gvwilson Apr 8, 2025
9256014
Merge pull request #5122 from williamstein/patch-1
LiamConnors Apr 8, 2025
efc4316
Moved language from #4984 per suggestion of @LiamConnors
rl-utility-man Apr 9, 2025
26c82aa
Merge pull request #5134 from plotly/update-default-print-grid
LiamConnors Apr 9, 2025
3d262d7
Merge pull request #5135 from plotly/update-return-type
LiamConnors Apr 10, 2025
18f70ac
AUpdate file structure and make package include jupyterlab files
marthacryan Apr 11, 2025
ca54548
Update js access to use new filepaths
marthacryan Apr 11, 2025
b827f02
Update path of js output
marthacryan Apr 11, 2025
c67cada
Add metadata about jupyterlab extension
marthacryan Apr 11, 2025
e3afcf7
Add version into package
marthacryan Apr 11, 2025
62721e9
Add js build to dev build
marthacryan Apr 11, 2025
3a6f3ee
Revert changes to requirements
marthacryan Apr 11, 2025
0859aef
Merge branch 'main' of github.com:plotly/plotly.py into notebook-conn…
marthacryan Apr 11, 2025
1260612
Update node root path in commands.py
marthacryan Apr 11, 2025
1db6c81
Add js build to CI
marthacryan Apr 11, 2025
4bcbd30
Black
marthacryan Apr 11, 2025
b8cc069
Update build files included in output
marthacryan Apr 11, 2025
cbfddad
Add CI to check for changes to js build files
marthacryan Apr 11, 2025
5254258
Add build step to check for js build changes in CI
marthacryan Apr 11, 2025
f51b3dc
Add build file
marthacryan Apr 11, 2025
b4cd36c
Make js uncommitted files check its own job
marthacryan Apr 11, 2025
5d0aa9c
Make js uncommitted files check its own job
marthacryan Apr 11, 2025
56433a7
Add jupyter to env before running npm run build
marthacryan Apr 11, 2025
a7cf8e1
Commit built widget js
marthacryan Apr 11, 2025
54cc73f
Use tmp to compare the build files before and after build
marthacryan Apr 11, 2025
afc511a
Remove extra call to check js build job
marthacryan Apr 11, 2025
0f61cc3
remove to_images tests
emilykl Apr 13, 2025
fe12aec
remove to_images function
emilykl Apr 13, 2025
692842f
refactor write_images to use kaleido write_fig function (WIP)
emilykl Apr 14, 2025
be3b500
Update horizontal-bar-charts.md
rl-utility-man Apr 14, 2025
87c5260
Update diff and only run CI when there are changes in the js directory
marthacryan Apr 14, 2025
f167e6f
Attempt running CI
marthacryan Apr 14, 2025
daac60e
Try different approach to only running on changes to js/
marthacryan Apr 14, 2025
024325e
Add debugging statements to the diff checker
marthacryan Apr 14, 2025
0df9265
Add special handling for package.json
marthacryan Apr 14, 2025
aac9c20
refactor write_images() to use kaleido.write_fig_from_object_sync()
emilykl Apr 14, 2025
ad57031
update kaleido tests
emilykl Apr 14, 2025
e26d9da
Update ignore pattern
marthacryan Apr 14, 2025
b9e5f7a
Merge branch 'main' into upgrade-kaleido
emilykl Apr 14, 2025
ab922bf
Add debugging print statements
marthacryan Apr 14, 2025
a56c55a
update diff method
marthacryan Apr 14, 2025
720ada5
add and fix type hints
emilykl Apr 14, 2025
f7df6a8
update diff method
marthacryan Apr 14, 2025
ce27281
Add artifact upload when ci finds differences between build and src
marthacryan Apr 14, 2025
f918835
Dummy commit to check CI
marthacryan Apr 14, 2025
53d486a
add mathjax and topojson config options
emilykl Apr 15, 2025
c990736
format
emilykl Apr 15, 2025
cd26c8f
Use github actions instead of circleci for checking js build files
marthacryan Apr 15, 2025
585cf4a
fix syntax error
marthacryan Apr 15, 2025
4fdca55
Dummy js commit
marthacryan Apr 15, 2025
d7157f6
Fix artifact upload
marthacryan Apr 15, 2025
d10fd16
Update labextension source
marthacryan Apr 15, 2025
ce161d9
Update CONTRIBUTING.md
marthacryan Apr 15, 2025
48c510c
Add back npm build to full release build
marthacryan Apr 15, 2025
2dbb09c
Remove extraneous or true
marthacryan Apr 15, 2025
9e097ec
Update CONTRIBUTING.md
marthacryan Apr 15, 2025
f3a4278
Update logic for deciding whether js has changed
marthacryan Apr 15, 2025
5baedf3
Update name of CI step
marthacryan Apr 15, 2025
2e9a296
Update CONTRIBUTING.md
emilykl Apr 15, 2025
15ea2d7
Update .github/workflows/check-js-build.yml
marthacryan Apr 15, 2025
a4b0c42
Merge pull request #5144 from plotly/js-contributing-md-updates
marthacryan Apr 15, 2025
35506f3
remove check for changes in js folder to avoid missing CI failures
marthacryan Apr 15, 2025
ce867a1
Update node version in github actions
marthacryan Apr 15, 2025
8f3227e
remove extraneous persist_credentials flag
marthacryan Apr 15, 2025
3ac4224
Update version to match plotly.py version
marthacryan Apr 15, 2025
60735fe
Update build files
marthacryan Apr 15, 2025
4dded6c
Merge pull request #5096 from plotly/notebook-connected-default
marthacryan Apr 16, 2025
97c418f
feat: adding https://plotly.com/python/css-colors/ URL for colors.
gvwilson Apr 16, 2025
0fc297e
Merge branch 'main' into codegen2
gvwilson Apr 17, 2025
a7f5810
feat: rebuilding after merging main
gvwilson Apr 17, 2025
db82ee4
fix: satisfying black formatting
gvwilson Apr 17, 2025
529771d
Merge pull request #4978 from plotly/codegen2
gvwilson Apr 17, 2025
88fcb7d
Merge pull request #4994 from SimaRaha/patch-2
LiamConnors Apr 17, 2025
fada8e8
Fix test pypi release
marthacryan Apr 17, 2025
549b457
Merge pull request #5146 from plotly/fix-test-pypi-release
marthacryan Apr 17, 2025
9b7e69c
Add back key for release github actions
marthacryan Apr 17, 2025
627c0e9
Merge pull request #5147 from plotly/fix-test-pypi-release
marthacryan Apr 22, 2025
6ba54f3
Update static-image-export.md
LiamConnors Apr 23, 2025
30cc778
Update doc/python/static-image-generation-migration.md
LiamConnors Apr 23, 2025
96bb17a
fix a few bugs with setting topojson default
emilykl Apr 24, 2025
f736f4c
remove 'import choreographer' and fix SyntaxWarning
emilykl Apr 24, 2025
aca1620
update kaleido rc version for tests
emilykl Apr 24, 2025
e1725dd
Fix script tag for notebook renderers
marthacryan Apr 25, 2025
ab3fbbd
Merge pull request #5154 from plotly/fix-script-tag
marthacryan Apr 25, 2025
564aa51
clean up deprecation messages, fix bug with passing mathjax
emilykl Apr 28, 2025
2b45f47
add --path argument for plotly_get_chrome command
emilykl Apr 28, 2025
691fce6
format
emilykl Apr 28, 2025
9b09504
Merge branch 'main' into kaleido-docs-updates
LiamConnors Apr 28, 2025
0799bf5
merge main
emilykl Apr 28, 2025
651eafd
print exe path after installing Chrome
emilykl Apr 29, 2025
0413341
format
emilykl Apr 29, 2025
0c1b1c1
format
emilykl Apr 29, 2025
7702233
Merge pull request #5062 from plotly/upgrade-kaleido
emilykl Apr 29, 2025
fded494
Merge branch 'kaleido-docs-updates' of https://github.com/plotly/plot…
LiamConnors Apr 29, 2025
077a356
Add note on browsers
LiamConnors Apr 29, 2025
2821776
Merge branch 'main' into kaleido-docs-updates
LiamConnors Apr 29, 2025
753f2fc
bump kaleido version to rc13 in pyproject.toml and CI
emilykl Apr 30, 2025
a2697d5
Merge pull request #5160 from plotly/update-kaleido-version-rc13
emilykl Apr 30, 2025
9f9262b
Update doc/python/static-image-generation-migration.md
LiamConnors Apr 30, 2025
551eaa6
update install commands
LiamConnors Apr 30, 2025
b9816bd
Merge branch 'kaleido-docs-updates' of https://github.com/plotly/plot…
LiamConnors Apr 30, 2025
8a8b052
Update doc/python/static-image-export.md
LiamConnors Apr 30, 2025
fc13f1d
Update doc/python/static-image-generation-migration.md
LiamConnors Apr 30, 2025
63229fc
Update doc/python/static-image-export.md
LiamConnors Apr 30, 2025
2eeac47
Update doc/python/static-image-export.md
LiamConnors Apr 30, 2025
b42185e
Update doc/python/static-image-generation-migration.md
LiamConnors Apr 30, 2025
e753b7b
Update doc/python/static-image-generation-migration.md
LiamConnors Apr 30, 2025
9fb73a1
Update doc/python/static-image-generation-migration.md
LiamConnors Apr 30, 2025
0284d5e
Update doc/python/static-image-export.md
LiamConnors Apr 30, 2025
ff62066
Update doc/python/static-image-export.md
LiamConnors Apr 30, 2025
41d72f0
Update doc/python/static-image-export.md
LiamConnors Apr 30, 2025
4b5d943
change references to 'master' branch to 'main'
emilykl Apr 30, 2025
78313f0
version updates for 6.1.0rc0
emilykl Apr 30, 2025
a27e2a9
Update static-image-export.md
LiamConnors May 1, 2025
8e62339
Update static-image-export.md
LiamConnors May 1, 2025
b8253c4
Update static-image-generation-migration.md
LiamConnors May 1, 2025
ba8ab39
Update static-image-export.md
LiamConnors May 1, 2025
2cc67f3
Update getting-started.md
LiamConnors May 1, 2025
9be1a49
Update static-image-generation-migration.md
LiamConnors May 1, 2025
70984fb
Update _kaleido.py
LiamConnors May 2, 2025
d0d449e
Add SRI (Subresource Integrity) hash to CDN script tags
ddworken May 2, 2025
1965279
Merge pull request #5161 from plotly/release-6.1.0rc0
emilykl May 2, 2025
0c9e4df
Add CHANGELOG entry for SRI hash support
ddworken May 2, 2025
e4aadf2
Fix CI test in test_renderers.py to include integrity and crossorigin…
ddworken May 2, 2025
912733d
Fix whitespace issue in test_renderers.py
ddworken May 2, 2025
87a4e8f
Apply formatting fixes from linter
ddworken May 2, 2025
ed01db9
Merge branch 'main' into add-sri-hash-to-cdn
ddworken May 2, 2025
3aa6d25
Revert .gitignore changes
ddworken May 2, 2025
2f66bf1
Update plotly/io/_kaleido.py
LiamConnors May 6, 2025
815d975
Merge pull request #5164 from plotly/docstring-updates
LiamConnors May 6, 2025
d3ba372
Merge branch 'main' into kaleido-docs-updates
LiamConnors May 6, 2025
f70d8bf
Merge pull request #5111 from plotly/kaleido-docs-updates
LiamConnors May 7, 2025
0e20fff
Merge branch 'main' into updates-for-main
LiamConnors May 7, 2025
3611046
Update supported-colors.md
LiamConnors May 7, 2025
04203fa
Merge branch 'updates-for-main' of https://github.com/plotly/plotly.p…
LiamConnors May 7, 2025
058eed2
Merge pull request #5171 from plotly/updates-for-main
LiamConnors May 8, 2025
3185ed3
Calculate hash in tests dynamically to avoid future breakage
ddworken May 9, 2025
b91887b
disable kaleido and orca deprecation warnings
emilykl May 9, 2025
467c135
update docstrings
emilykl May 9, 2025
61bb76c
format
emilykl May 9, 2025
34adb55
Merge pull request #5177 from plotly/remove-kaleido-deprecation-warnings
emilykl May 12, 2025
545efef
version bump 6.1.0
emilykl May 15, 2025
5af8a6c
Update CHANGELOG.md
emilykl May 15, 2025
1462f3f
Merge pull request #5185 from plotly/release-6.1.0
emilykl May 15, 2025
1b7efe2
Merge branch 'patch-1' of github.com:haydenflinner/plotly.py into pre…
gvwilson May 16, 2025
7250704
fix indentation
emilykl May 20, 2025
6c25793
add test to prevent regression
emilykl May 20, 2025
b7ee03d
Merge pull request #5193 from plotly/fix-5187
emilykl May 20, 2025
1746687
update pyproject.toml and changelog for 6.1.1
emilykl May 20, 2025
c044f1e
Merge pull request #5194 from plotly/release-6.1.1
emilykl May 20, 2025
86514e1
feat: restore type checking portion of code generation
gvwilson May 22, 2025
44907a3
feat: restore type checking support in generated code
gvwilson May 25, 2025
305ab9b
change deprecation version
LiamConnors May 26, 2025
2611205
feat: reformatting code with black
gvwilson May 27, 2025
7bc7ce5
Merge pull request #5199 from plotly/fix-5186-type-checking-renegerat…
gvwilson May 27, 2025
6edfa8a
Merge pull request #5202 from plotly/update-kaleido-doc
LiamConnors May 27, 2025
3f5cbda
version updates for v6.1.2
emilykl May 27, 2025
1d6d3bc
Merge pull request #5205 from plotly/release-6.1.2
emilykl May 27, 2025
6837831
support setting plotly.js path
emilykl May 27, 2025
6280578
docs: mention support for marimo notebooks in README
akshayka May 31, 2025
f0aba76
improve pio.defaults test
emilykl Jun 2, 2025
bdf8f05
format
emilykl Jun 2, 2025
2e66fb0
add actual image generation step in test
emilykl Jun 3, 2025
0770689
Delete plotly-universities-1.ipynb
rl-utility-man Jun 3, 2025
85bd8ef
moved the revised code into bar-charts.md from the notebook
rl-utility-man Jun 3, 2025
fdab92c
bump kaleido rc version in pyproject.toml and test_requirements
emilykl Jun 3, 2025
3afcd45
Merge pull request #5207 from plotly/support-setting-plotlyjs-path
emilykl Jun 3, 2025
0089b4d
Merge pull request #5212 from akshayka/aka/docs-readme-marimo
gvwilson Jun 4, 2025
2cf19ff
removing old generated validators
bmaranville May 8, 2025
1f911b6
write single json instead of python files
bmaranville May 8, 2025
930509f
generate validator class instances from json data
bmaranville May 8, 2025
3fd1cfd
use validators from ValidatorCache
bmaranville May 8, 2025
665595d
use validators from ValidatorCache
bmaranville May 8, 2025
af43f68
use DataValidator from ValidatorCache
bmaranville May 8, 2025
771f918
trace validator should be instance not class of DataValidator
bmaranville May 8, 2025
6d905e7
use validators from ValidatorCache
bmaranville May 8, 2025
58ab3e1
use template validator from ValidatorCache
bmaranville May 8, 2025
44f7a4e
allow overlaying args on derived classes
bmaranville May 8, 2025
2507be9
add DataValidator to autogenerated instances provided by ValidatorCac…
bmaranville May 8, 2025
5d1ccdb
add DataValidator to autogenerated instances provided by ValidatorCac…
bmaranville May 8, 2025
6bd2bb3
add DataValidator to autogenerated instances provided by ValidatorCac…
bmaranville May 8, 2025
fdaf441
use a copy of the DataValidator in BaseFigure, with local set_uid att…
bmaranville May 8, 2025
7baa252
update validator params store
bmaranville May 8, 2025
0e913eb
DataValidator is an instance already, and is not callable
bmaranville May 8, 2025
ba8ec10
use heatmap colorscale validator
bmaranville May 8, 2025
2454767
update documentation example to use validator from ValidatorCache
bmaranville May 8, 2025
c62f6cb
cleanup
bmaranville May 9, 2025
cb4c504
black formatting
bmaranville May 9, 2025
6f777ef
black formatting
bmaranville May 9, 2025
6be6f28
revert this file - it is auto-generated
bmaranville May 9, 2025
1b99411
cleanup
bmaranville May 9, 2025
03d85de
use ValidatorCache for generated Layout validators
bmaranville May 9, 2025
f8daca4
black formatting
bmaranville May 9, 2025
0184bd4
feat: regenerating validators with all recent changes
gvwilson Jun 4, 2025
66e9b05
fix black exclude parameter in pyproject.toml to properly exclude ONL…
emilykl Jun 4, 2025
c0f6fb1
Update README.md
emilykl Jun 5, 2025
595172c
added lots of comments; adjusted layout
rl-utility-man Jun 5, 2025
fbbae16
Update bar-charts.md
rl-utility-man Jun 5, 2025
a76b656
Merge pull request #5216 from plotly/fix-black-exclude
gvwilson Jun 5, 2025
36345ce
fixed minor bugs and improved comments.
rl-utility-man Jun 5, 2025
945c000
Merge pull request #5217 from plotly/update-readme-can-be-viewed
emilykl Jun 6, 2025
d1da3e6
Merge branch 'main' into add-sri-hash-to-cdn
ddworken Jun 6, 2025
513337c
fix: address code review issues
emilykl Jun 4, 2025
37c387e
fix path to _validators.json
emilykl Jun 10, 2025
9dc08a1
Merge pull request #5214 from plotly/refactor-validators
gvwilson Jun 10, 2025
c08e203
Clean up
ddworken Jun 10, 2025
4ed9889
Merge branch 'main' into add-sri-hash-to-cdn
ddworken Jun 10, 2025
7a99cd7
Fix formatting
ddworken Jun 10, 2025
1ec864b
Merge pull request #5165 from ddworken/add-sri-hash-to-cdn
gvwilson Jun 11, 2025
eb95abc
feat: convert to uv and ruff
gvwilson Jun 10, 2025
4a1a814
fix: corrections based on code review from @EmilyKL
gvwilson Jun 13, 2025
12cd7a6
merging recent changes from main
gvwilson Jun 13, 2025
0db8555
fix: minor updates based on feedback from @EmilyKL
gvwilson Jun 13, 2025
fbb65c8
Merge pull request #5218 from plotly/switch-to-ruff
gvwilson Jun 19, 2025
a09b2de
Merge branch 'main' into merge-doc-prod-changes-to-main
LiamConnors Jun 19, 2025
0f9141b
Merge pull request #5235 from plotly/merge-doc-prod-changes-to-main
LiamConnors Jun 19, 2025
f512eb8
Revert "update docstrings" commit which removed deprecation language
emilykl Jun 19, 2025
8534a24
re-enable deprecation warnings
emilykl Jun 19, 2025
2159db5
bump kaleido version specified in extras
emilykl Jun 19, 2025
8b1e878
update changelog
emilykl Jun 19, 2025
f2a9d60
Merge pull request #5236 from plotly/re-enable-kaleido-deprecations
emilykl Jun 19, 2025
6096ba4
update changelog
emilykl Jun 19, 2025
e7586e3
bump version to 6.2.0
emilykl Jun 19, 2025
75ebf6a
Update what_about_dash.md
LiamConnors Jun 20, 2025
46de349
Merge branch 'main' into doc-prod-to-main
LiamConnors Jun 20, 2025
c1a1958
add back ruff changes
LiamConnors Jun 20, 2025
3ab4eb4
Merge pull request #5242 from plotly/LiamConnors-patch-3
gvwilson Jun 25, 2025
abe7595
update changelog
emilykl Jun 25, 2025
8c6acc2
Merge branch 'main' into release-6.2.0
emilykl Jun 25, 2025
12be407
update changelog
emilykl Jun 26, 2025
58a7511
Merge branch 'main' into master
gvwilson Jun 26, 2025
2287b27
Merge pull request #4958 from rl-utility-man/master
gvwilson Jun 26, 2025
cafbdc5
Merge pull request #5237 from plotly/release-6.2.0
emilykl Jun 26, 2025
4355e67
Merge remote-tracking branch 'acepace/acepace_chore_fix_deprecation' …
gvwilson Jun 26, 2025
389158a
Merge pull request #5250 from plotly/acepace_chore_fix_deprecation
gvwilson Jun 26, 2025
8e663af
Merge branch 'main' into doc-prod-to-main
LiamConnors Jun 26, 2025
8df00b1
Merge pull request #5243 from plotly/doc-prod-to-main
LiamConnors Jun 26, 2025
5cf3121
update to plotly 6.2.0
LiamConnors Jun 26, 2025
ae85438
Merge pull request #5251 from plotly/update-plotly-version
LiamConnors Jun 26, 2025
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
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
113 changes: 69 additions & 44 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ commands:
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv
source .venv/bin/activate
uv pip install .
uv pip install -r ./test_requirements/requirements_core.txt
uv lock --check
uv sync --extra dev_core
- run:
name: List installed packages and python version
command: |
Expand Down Expand Up @@ -56,11 +56,7 @@ commands:
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv
source .venv/bin/activate
uv pip install .
uv pip install -r ./test_requirements/requirements_optional.txt
cd js
npm ci
npm run build
uv sync --extra dev_optional

- when:
condition:
Expand All @@ -73,8 +69,7 @@ commands:
name: Install pandas
command: |
source .venv/bin/activate
uv pip install pip
python -m pip install pandas==<<parameters.pandas_version>> numpy==<<parameters.numpy_version>>
uv pip install pandas==<<parameters.pandas_version>> numpy==<<parameters.numpy_version>>

- run:
name: Test core
Expand Down Expand Up @@ -117,6 +112,34 @@ commands:
source .venv/bin/activate
python -m pytest -x test_init/test_lazy_imports.py

test_io_kaleido_v0:
steps:
- checkout
- browser-tools/install-chrome
- browser-tools/install-chromedriver
- run:
name: Install dependencies
command: |
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv
source .venv/bin/activate
uv sync --extra dev_optional
# Install Kaleido v0 instead of the v1 specified in requirements_optional.txt
uv pip uninstall kaleido
uv pip install kaleido==0.2.1
- run:
name: List installed packages and python version
command: |
source .venv/bin/activate
uv pip list
python --version
- run:
name: Test plotly.io image output with Kaleido v0
command: |
source .venv/bin/activate
python -m pytest tests/test_optional/test_kaleido
no_output_timeout: 20m

jobs:
check-code-formatting:
docker:
Expand All @@ -125,16 +148,16 @@ jobs:
steps:
- checkout
- run:
name: Install black
name: Install ruff
command: |
python -m venv venv
. venv/bin/activate
pip install black==22.3.0
uv venv
source .venv/bin/activate
uv sync --extra dev_core
- run:
name: Check formatting with black
name: Check handwritten code with ruff
command: |
. venv/bin/activate
black --check . --exclude venv
source .venv/bin/activate
ruff format --check .

test_core_py:
parameters:
Expand Down Expand Up @@ -166,6 +189,17 @@ jobs:
pandas_version: <<parameters.pandas_version>>
numpy_version: <<parameters.numpy_version>>

test_kaleido_v0:
parameters:
python_version:
default: "3.12"
type: string
executor:
name: docker-container
python_version: <<parameters.python_version>>
steps:
- test_io_kaleido_v0

# Percy
python_311_percy:
docker:
Expand All @@ -189,22 +223,20 @@ jobs:
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv
source .venv/bin/activate
uv pip install -e .
uv pip install -r test_requirements/requirements_optional.txt
uv sync --extra dev_optional

- run:
name: Build html figures (Pandas 2)
name: Build HTML figures (Pandas 2)
command: |
source .venv/bin/activate
python tests/percy/plotly-express.py
- run:
name: Build html figures (Pandas 1) and compare
name: Build HTML figures (Pandas 1) and compare
command: |
source .venv/bin/activate
mkdir tests/percy/pandas2
mv tests/percy/*.html tests/percy/pandas2/
uv pip install pip
python -m pip install pandas==1.5.3 numpy==1.26.4
uv pip install pandas==1.5.3 numpy==1.26.4
python tests/percy/plotly-express.py
python tests/percy/compare-pandas.py
rm -rf tests/percy/pandas2
Expand Down Expand Up @@ -236,8 +268,7 @@ jobs:
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv
source .venv/bin/activate
uv pip install -e .
uv pip install -r ./test_requirements/requirements_core.txt black inflect jupyterlab
uv sync --extra dev_optional
- run:
name: Update plotly.js to dev
command: |
Expand All @@ -254,7 +285,7 @@ jobs:
name: Build source distribution packages
command: |
source .venv/bin/activate
uv pip install build
uv sync --extra dev_build
python -m build --sdist --wheel -o dist
when: always
- store_artifacts:
Expand All @@ -269,22 +300,17 @@ jobs:

steps:
- checkout

- run:
name: initial NPM Build
name: PyPI Build
command: |
python -m venv venv
. venv/bin/activate
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv
source .venv/bin/activate
uv sync --extra dev_build
cd js
npm ci
npm run build
git status

- run:
name: PyPI Build
command: |
. venv/bin/activate
pip install build
cd ..
python -m build --sdist --wheel -o dist
cp -R dist output
git status
Expand All @@ -310,7 +336,6 @@ jobs:
- checkout
- browser-tools/install-chrome
- browser-tools/install-chromedriver

- run:
name: Install dependencies
command: |
Expand All @@ -321,16 +346,11 @@ jobs:
uv venv
source .venv/bin/activate
uv pip install -r requirements.txt
cd ..
if [ "${CIRCLE_BRANCH}" != "doc-prod" ]; then
uv pip uninstall plotly
cd ..
uv pip install -e .
cd js
npm ci
npm run build
cd ../doc
fi
cd ..

- run:
name: make html
Expand Down Expand Up @@ -412,6 +432,7 @@ jobs:
- store_artifacts:
path: doc/build
destination: doc/build

workflows:
code_formatting:
jobs:
Expand All @@ -422,7 +443,6 @@ workflows:
release_build:
jobs:
- full_build

build:
jobs:
- test_core_py:
Expand Down Expand Up @@ -450,5 +470,10 @@ workflows:
python_version: "3.9"
pandas_version: "1.2.4"
numpy_version: "1.26.4"
- test_kaleido_v0:
matrix:
parameters:
python_version:
- "3.12"
- python_311_percy
- build-doc
12 changes: 7 additions & 5 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
Thanks for your interest in Plotly.py!
Thanks for your interest in Plotly.py.
Before opening an issue, please:

Before opening an issue, please search for existing and closed issues :)
- Use the [latest version](https://github.com/plotly/plotly.py/blob/main/CHANGELOG.md) of plotly.py in your report unless not applicable.
- Search for existing and closed issues.
- Include a minimal reproducible example with bug reports.

**Please** accompany bug reports with a reproducible example. Please use the [latest version](https://github.com/plotly/plotly.py/blob/master/CHANGELOG.md) of plotly.py in your report unless not applicable.

Note that GitHub Issues are meant to be used for bug reports and feature requests only. Implementation or usage questions should be asked on [community.plotly.com](https://community.plotly.com/c/graphing-libraries/python/10) or on Stack Overflow (tagged [`plotly`](https://stackoverflow.com/questions/tagged/plotly)).
Note that GitHub Issues are meant to be used for bug reports and feature requests.
Questions about usage should be asked on [community.plotly.com](https://community.plotly.com/c/graphing-libraries/python/10).
58 changes: 29 additions & 29 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
<!--
Please uncomment this block and take a look at this checklist if your PR is making substantial changes to **documentation**/impacts files in the `doc` directory. Check all that apply to your PR, and leave the rest unchecked to discuss with your reviewer! Not all boxes must be checked for every PR :)
Please uncomment this block and fill in this checklist if your PR makes substantial changes to documentation in the `doc` directory.
Not all boxes must be checked for every PR:
check those that apply to your PR and leave the rest unchecked to discuss with your reviewer.

If your PR modifies code of the `plotly` package, we have a different checklist
below :-).
If your PR modifies code of the `plotly` package, we have a different checklist below.

### Documentation PR
## Documentation PR

- [ ] I've [seen the `doc/README.md` file](https://github.com/plotly/plotly.py/blob/master/doc/README.md)
- [ ] This change runs in the current version of Plotly on PyPI and targets the `doc-prod` branch OR it targets the `main` branch
- [ ] If this PR modifies the first example in a page or adds a new one, it is a `px` example if at all possible
- [ ] Every new/modified example has a descriptive title and motivating sentence or paragraph
- [ ] Every new/modified example is independently runnable
- [ ] Every new/modified example is optimized for short line count and focuses on the Plotly/visualization-related aspects of the example rather than the computation required to produce the data being visualized
- [ ] Meaningful/relatable datasets are used for all new examples instead of randomly-generated data where possible
- [ ] The random seed is set if using randomly-generated data in new/modified examples
- [ ] New/modified remote datasets are loaded from https://plotly.github.io/datasets and added to https://github.com/plotly/datasets
- [ ] Large computations are avoided in the new/modified examples in favour of loading remote datasets that represent the output of such computations
- [ ] Imports are `plotly.graph_objects as go` / `plotly.express as px` / `plotly.io as pio`
- [ ] Data frames are always called `df`
- [ ] `fig = <something>` call is high up in each new/modified example (either `px.<something>` or `make_subplots` or `go.Figure`)
- [ ] Liberal use is made of `fig.add_*` and `fig.update_*` rather than `go.Figure(data=..., layout=...)` in every new/modified example
- [ ] Specific adders and updaters like `fig.add_shape` and `fig.update_xaxes` are used instead of big `fig.update_layout` calls in every new/modified example
- [ ] `fig.show()` is at the end of each new/modified example
- [ ] `plotly.plot()` and `plotly.iplot()` are not used in any new/modified example
- [ ] Hex codes for colors are not used in any new/modified example in favour of [these nice ones](https://github.com/plotly/plotly.py/issues/2192)
- [ ] I have seen the [`doc/README.md`](https://github.com/plotly/plotly.py/blob/main/doc/README.md) file.
- [ ] This change runs in the current version of Plotly on PyPI and targets the `doc-prod` branch OR it targets the `main` branch.
- [ ] If this PR modifies the first example in a page or adds a new one, it is a `px` example if at all possible.
- [ ] Every new/modified example has a descriptive title and motivating sentence or paragraph.
- [ ] Every new/modified example is independently runnable.
- [ ] Every new/modified example is optimized for short line count and focuses on the Plotly/visualization-related aspects of the example rather than the computation required to produce the data being visualized.
- [ ] Meaningful/relatable datasets are used for all new examples instead of randomly-generated data where possible.
- [ ] The random seed is set if using randomly-generated data.
- [ ] New/modified remote datasets are loaded from https://plotly.github.io/datasets and added to https://github.com/plotly/datasets.
- [ ] Large computations are avoided in the new/modified examples in favour of loading remote datasets that represent the output of such computations.
- [ ] Imports are `plotly.graph_objects as go`, `plotly.express as px`, and/or `plotly.io as pio`.
- [ ] Data frames are always called `df`.
- [ ] `fig = <something>` is called high up in each new/modified example (either `px.<something>` or `make_subplots` or `go.Figure`).
- [ ] Liberal use is made of `fig.add_*` and `fig.update_*` rather than `go.Figure(data=..., layout=...)`.
- [ ] Specific adders and updaters like `fig.add_shape` and `fig.update_xaxes` are used instead of big `fig.update_layout` calls.
- [ ] `fig.show()` is at the end of each example.
- [ ] `plotly.plot()` and `plotly.iplot()` are not used in any example.
- [ ] Named colors are used instead of hex codes wherever possible.
- [ ] Code blocks are marked with `&#96;&#96;&#96;python`.

## Code PR

- [ ] 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.
- [ ] I have added tests (if submitting a new feature or correcting a bug) or
modified existing tests.
- [ ] For a new feature, I have added documentation examples in an existing or
new tutorial notebook (please see the doc checklist as well).
- [ ] I have added a CHANGELOG entry if fixing/changing/adding anything substantial.
- [ ] For a new feature or a change in behaviour, I have updated the relevant docstrings in the code to describe the feature or behaviour (please see the doc checklist as well).
- [ ] I have read through the [contributing notes](https://github.com/plotly/plotly.py/blob/main/CONTRIBUTING.md) and understand the structure of the package. In particular, if my PR modifies code of `plotly.graph_objects`, my modifications concern the code generator and *not* the generated files.
- [ ] I have added tests or modified existing tests.
- [ ] For a new feature, I have added documentation examples (please see the doc checklist as well).
- [ ] I have added a CHANGELOG entry if changing anything substantial.
- [ ] For a new feature or a change in behavior, I have updated the relevant docstrings in the code.

-->
66 changes: 66 additions & 0 deletions .github/workflows/check-js-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
on: push

jobs:
check-js-build:
name: Check JS build artifacts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: Install Node
uses: actions/setup-node@v2
with:
node-version: '22'

- name: Copy current files to a temporary directory
run: |
cp -R plotly/labextension/ plotly/labextension-tmp/

- name: Install dependencies and build
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv
source .venv/bin/activate
uv pip install jupyter
cd js
npm ci
npm run build
- name: Check JupyterLab build artifacts
run: |
# 1. Hash contents of all static files, sort by content hash
find plotly/labextension/static -type f -exec sha256sum {} \; | awk '{print $1}' | sort > new_hashes.txt
find plotly/labextension-tmp/static -type f -exec sha256sum {} \; | awk '{print $1}' | sort > old_hashes.txt

# 2. Compare the sorted content hashes
diff old_hashes.txt new_hashes.txt > content_diff.txt

# Remove the "load" line from both package.json files before comparing
grep -v '"load": "static/' plotly/labextension/package.json > pkg1.json
grep -v '"load": "static/' plotly/labextension-tmp/package.json > pkg2.json

# Compare stripped versions
diff pkg1.json pkg2.json > package_json_diff.txt

# 5. Final check
if [ -s content_diff.txt ] || [ -s package_json_diff.txt ]; then
echo "❌ Build artifacts differ:"
echo "--- Unexpected diffs ---"
cat content_diff.txt
echo "--- Unexpected package.json diffs ---"
cat package_json_diff.txt
echo "Please replace the 'plotly/labextension' directory with the artifacts of this CI run."
exit 1
else
echo "✅ Build artifacts match expected output (ignoring known 'load' hash in package.json)."
fi

- name: Store the build artifacts from plotly/labextension
uses: actions/upload-artifact@v4
if: failure()
with:
name: labextension
path: plotly/labextension
Loading