Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
688fe67
Optimize validate_gantt
codeflash-ai[bot] Oct 30, 2025
6be6284
Apply suggestion from @misrasaurabh1
misrasaurabh1 Oct 30, 2025
9e2a2f0
Apply suggestion from @misrasaurabh1
misrasaurabh1 Oct 30, 2025
7ddb02b
adding validate_gantt tests file
mashraf-222 Oct 30, 2025
666dcc2
fix formatting
mashraf-222 Oct 30, 2025
ef98a70
fixing formatting
mashraf-222 Oct 30, 2025
0e84b4a
Merge branch 'main' into codeflash/optimize-validate_gantt-mhcxyu68
KRRT7 Nov 18, 2025
4c5dcd1
remove conditional pandas
KRRT7 Nov 18, 2025
084595a
remove redundant tests
KRRT7 Nov 18, 2025
df67ffb
apply ruff formatting
KRRT7 Nov 18, 2025
3dde3b6
add changelong entry
KRRT7 Nov 19, 2025
79fe9f4
apply suggestion
KRRT7 Nov 19, 2025
f083977
Merge pull request #5386 from codeflash-ai/codeflash/optimize-validat…
camdecoster Nov 19, 2025
965b3bd
Add trace-specific color sequence support from template.data
antonymilne Nov 26, 2025
83faec8
Support trace-specific color sequences in Plotly Express via templates
antonymilne Nov 26, 2025
7bdec7f
Add trace-specific color sequences in Plotly Express via templates
antonymilne Nov 26, 2025
befea7d
Minor
antonymilne Nov 27, 2025
d578ab4
Format code with ruff
antonymilne Nov 27, 2025
a2dc490
Add CHANGELOG entry for trace-specific color sequences fix
antonymilne Dec 1, 2025
74543f3
Update changelog
antonymilne Dec 1, 2025
2f1008f
fix: Update GitHub issue templates
camdecoster Dec 3, 2025
509d1fc
Merge pull request #5441 from plotly/cam/5440/update-github-issue-tem…
camdecoster Dec 3, 2025
675c668
Refactor trace-specific color handling in apply_default_cascade
antonymilne Dec 4, 2025
c24b05c
Remove redundant color_discrete_sequence check in apply_default_cascade
antonymilne Dec 4, 2025
076ff14
Update tests/test_optional/test_px/test_px.py
antonymilne Dec 4, 2025
a3853d2
Ruff
antonymilne Dec 4, 2025
af1546c
Merge branch 'main' into main
antonymilne Dec 4, 2025
e8339e0
Fix imshow
antonymilne Dec 5, 2025
adfdfcd
Merge pull request #5437 from antonymilne/main
emilykl Dec 5, 2025
a5f469a
update call to color_discrete_sequence with new call signature
emilykl Dec 5, 2025
fa4db1d
Merge pull request #5442 from plotly/fix-docs-build-bug-2
emilykl Dec 8, 2025
27b5bba
Update editable installs ref in CONTRIBUTING doc
palmerusaf Dec 10, 2025
f265d9b
Merge pull request #5448 from palmerusaf/update-contrib-docs
ndrezn Dec 10, 2025
caa57e2
Remove unneeded `type="text/javascript"` attribute from `<style>` tag
hannob Dec 19, 2025
cf5ac9f
Fix codingstyle with ruff
hannob Dec 19, 2025
6f94d9c
Update plotly.js to v3.3.1 and associated files
camdecoster Dec 22, 2025
6f13fb0
Add missing lock file
camdecoster Dec 22, 2025
ca6e55e
Update Jupyter support files
camdecoster Dec 22, 2025
f4236c2
Merge pull request #5456 from plotly/cam/update-plotly.js-v3.3.1
camdecoster Dec 22, 2025
d2aa044
Version changes for v6.5.1
camdecoster Dec 24, 2025
4b902be
Merge pull request #5457 from plotly/release-6.5.1
camdecoster Jan 7, 2026
d12c162
fix: Handle arrays in BooleanValidator
camdecoster Jan 9, 2026
1d665ba
Add array_ok to SubplotidValidator, used in pie.legend
my-tien Jan 12, 2026
40532e4
Fix names of test cases (forgot to rename them after copy-paste)
my-tien Jan 12, 2026
3a50e45
Run ruff format after adding support for arrays in subplotid validator.
my-tien Jan 12, 2026
d1993cc
Fix docstring and description of SubplotidValidator
my-tien Jan 13, 2026
b809b46
changed helper function in SubplotidValidator
my-tien Jan 13, 2026
cef18a9
Separate test for coercion of geo1 to geo and legend1 to legend
my-tien Jan 13, 2026
fff298c
Simplify test
camdecoster Jan 13, 2026
5a0440c
Merge pull request #5464 from plotly/cam/5463/handle-arrays-booleanva…
camdecoster Jan 13, 2026
b587428
Merge branch 'main' into legend-arrayok
camdecoster Jan 13, 2026
dad2520
Merge pull request #5465 from my-tien/legend-arrayok
camdecoster Jan 14, 2026
61c9f6f
Merge branch 'main' into merge-doc-prod-to-main
LiamConnors Jan 14, 2026
3293f4d
Merge pull request #5466 from plotly/merge-doc-prod-to-main
LiamConnors Jan 14, 2026
7f57ccb
fix: Update graph_objs per recent bug fixes
camdecoster Jan 14, 2026
1f45fa5
Merge pull request #5467 from plotly/cam/update-graph-objs
camdecoster Jan 14, 2026
36d8bf8
Version changes for v6.5.2
camdecoster Jan 14, 2026
4e2900b
Use the correct dates
camdecoster Jan 14, 2026
55597ab
Merge pull request #5468 from plotly/release-6.5.2
camdecoster Jan 14, 2026
279b716
update example to use geodatasets
LiamConnors Jan 26, 2026
d08c05f
fix: Remove global warning format side effect
emmanuel-ferdman Feb 5, 2026
4e953f3
Merge pull request #5454 from hannob-forks/unneededtype
emilykl Feb 10, 2026
87befc3
Merge branch 'main' into fix-warnings-format
emilykl Feb 13, 2026
b2fcf3b
Merge pull request #5481 from emmanuel-ferdman/fix-warnings-format
emilykl Feb 16, 2026
490e92a
Merge branch 'main' into merge-doc-prod-to-main-branch
LiamConnors Feb 16, 2026
4be2983
Merge pull request #5513 from plotly/merge-doc-prod-to-main-branch
LiamConnors Feb 17, 2026
9dc893d
Update shapes.md
LiamConnors Feb 18, 2026
e9fbfd8
Update marker-style.md
LiamConnors Feb 19, 2026
8ce515f
Update marker-style.md
LiamConnors Feb 19, 2026
a2ecc5c
Merge pull request #5478 from plotly/update-example
camdecoster Feb 20, 2026
2275bc7
Fix spurious engine deprecation warning in write_image
mosh3eb Feb 20, 2026
bc93d27
Merge branch 'main' into new-charts
LiamConnors Feb 23, 2026
ea9fe93
Update legend.md
LiamConnors Feb 23, 2026
0b62296
Merge branch 'new-charts' of https://github.com/plotly/plotly.py into…
LiamConnors Feb 23, 2026
21df906
Merge pull request #5517 from mosh3eb/fix/write-image-spurious-engine…
emilykl Feb 24, 2026
206b66b
Update doc/python/shapes.md
LiamConnors Feb 26, 2026
a4832a8
Merge branch 'main' into new-charts
LiamConnors Feb 26, 2026
cf1b9ae
upgrade plotly.js to v3.4.0
emilykl Feb 27, 2026
7dc360c
update package-lock
emilykl Feb 27, 2026
46a8aa2
update js artifacts
emilykl Feb 27, 2026
aee4c33
update changelog
emilykl Mar 2, 2026
03fd2ed
Merge pull request #5527 from plotly/update-plotlyjs-3.4.0
emilykl Mar 2, 2026
5aabff0
Merge branch 'main' into new-charts
LiamConnors Mar 2, 2026
bb783da
Merge pull request #5516 from plotly/new-charts
LiamConnors Mar 2, 2026
e0278b3
update changelog
emilykl Mar 2, 2026
837d27e
changes for v6.6.0
emilykl Mar 2, 2026
2b00113
Merge pull request #5528 from plotly/release-branch-6.6.0
emilykl Mar 2, 2026
3868b05
Update requirements.txt
LiamConnors Mar 2, 2026
02e03c3
Merge pull request #5529 from plotly/update-docs-version
LiamConnors Mar 3, 2026
70f9b68
Merge branch 'doc-prod' into make-docs-live-6-6-0
LiamConnors Mar 3, 2026
b47d435
Update conf.py
LiamConnors Mar 3, 2026
e879fab
Merge pull request #5531 from plotly/update-version
LiamConnors Mar 3, 2026
e13d38d
Merge branch 'main' into make-docs-live-6-6-0
LiamConnors Mar 3, 2026
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
  •  
  •  
  •  
9 changes: 0 additions & 9 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Bug report
about: Create a bug report for a plotly.py issue
title: "[BUG]: "
labels: bug

---

### Instructions (remove this section before submitting report)

Thanks for your interest in plotly.py!

- Before submitting a new bug report, please search for existing and closed issues. If your bug is not addressed yet, fill out the sections below and submit a new issue.
- Implementation questions ("How do I do ...?") should be asked on our [Community Forum](https://community.plotly.com/c/plotly-python/5) or on [Stack Overflow](https://stackoverflow.com/questions/tagged/plotly) (tagged 'plotly').
- Comments should add content to the discussions. Approbation comments such as *+1* or *I would like this feature to be implemented as well* will be deleted by the maintainers. Please use [GitHub reactions](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments) instead.

### Description

_Add a clear description of the issue that you're having._

### Screenshots/Video

_Add screenshots or a video of the issue._

### Steps to reproduce

_Reports **must** include steps to reproduce the issue. Please use the [latest version](https://github.com/plotly/plotly.py/releases) of plotly.py in your report unless not applicable._

- Go to '...'
- Click on X
- Note the issue with Y

### Notes

_Add info here that doesn't fit in the other sections._
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Feature request
about: Submit a new feature request for plotly.py
title: "[FEATURE]: "
labels: feature

---

### Instructions (remove this section before submitting an issue)

Thanks for your interest in plotly.py!

- Before submitting a new feature request, please search for existing and closed requests. If your request is novel, fill out the sections below and submit a new request.
- Comments should add content to the discussions. Approbation comments such as *+1* or *I would like this feature to be implemented as well* will be deleted by the maintainers. Please use [GitHub reactions](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments) instead.

### Description

_Add a clear description of the feature that you're requesting._


### Why should this feature be added?

_Provide an argument for why this feature should be added. We can't add everything, so this will help us determine what gets worked on. Please also consider creating a PR and adding the feature yourself. Help is always appreciated._

### Mocks/Designs

_Please add any mocks or designs you might have for the feature._

### Notes

_Add info here that doesn't fit in the other sections._
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,35 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## Unreleased

## [6.6.0] - 2026-03-02

### Fixed
- Remove unneeded `type="text/javascript"` attribute from `<style>` tag [[#5454](https://github.com/plotly/plotly.py/pull/5454)], with thanks to @hannob for the contribution!
- Remove global warning format side effect [[#5481](https://github.com/plotly/plotly.py/pull/5481)], with thanks to @emmanuel-ferdman for the contribution!
- Fix spurious engine deprecation warning in write_image [[#5517](https://github.com/plotly/plotly.py/pull/5517)], with thanks to @mosh3eb for the contribution!

### Updated
- Update plotly.js from version 3.3.1 to version 3.4.0. See the plotly.js [release notes](https://github.com/plotly/plotly.js/releases/tag/v3.4.0) for more information. [[#5527](https://github.com/plotly/plotly.py/pull/5527)]. Notable changes include:
- Add support for clicking legend titles to toggle visibility of all traces in legend [[#7698](https://github.com/plotly/plotly.js/pull/7698)]
- Add support for shapes to reference multiple axes [[#7666](https://github.com/plotly/plotly.js/pull/7666)]
- Add support for dashed marker lines in scatter plots [[#7673](https://github.com/plotly/plotly.js/pull/7673)]
- Increase axis autorange when bar charts have outside text labels, to avoid labels being clipped [[#7675](https://github.com/plotly/plotly.js/pull/7675)]

## [6.5.2] - 2026-01-14

### Fixed
- Fix issue where pie trace `legend`, `showlegend` attributes don't accept array values [[#5464](https://github.com/plotly/plotly.py/pull/5464) and [#5465](https://github.com/plotly/plotly.py/pull/5465)], with thanks to @my-tien for the contribution!

## [6.5.1] - 2026-01-07

### Fixed
- Fix issue where Plotly Express ignored trace-specific color sequences defined in templates via `template.data.<trace_type>` [[#5437](https://github.com/plotly/plotly.py/pull/5437)], with thanks to @antonymilne for the contribution!

### Updated
- Speed up `validate_gantt` function [[#5386](https://github.com/plotly/plotly.py/pull/5386)], with thanks to @misrasaurabh1 for the contribution!
- Update plotly.js from version 3.3.0 to version 3.3.1. See the plotly.js [release notes](https://github.com/plotly/plotly.js/releases/tag/v3.3.1) for more information. [[#5456](https://github.com/plotly/plotly.py/pull/5456)]. Notable changes include:
- Add support for arrays for the pie properties `showlegend` and `legend`, so that these can be configured per slice. [[#7580](https://github.com/plotly/plotly.js/pull/7580)]

## [6.5.0] - 2025-11-17

### Updated
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ authors:
- family-names: "Parmer"
given-names: "Chris"
title: "An interactive, open-source, and browser-based graphing library for Python"
version: 6.5.0
version: 6.6.0
doi: 10.5281/zenodo.14503524
date-released: 2025-11-17
date-released: 2026-03-02
url: "https://github.com/plotly/plotly.py"
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ npm run build
These commands also create an *editable install* of plotly.py
so that you can test your changes iteratively without having to rebuild the plotly.py package explicitly;
for more information please see
[the `pip` documentation on editable installs](https://pip.pypa.io/en/stable/reference/pip_install/#install-editable)
[the `pip` documentation on editable installs](https://pip.pypa.io/en/stable/topics/local-project-installs/#editable-installs)
Please note that the single quotes are needed to escape the `[]` characters.

### Formatting
Expand Down
79 changes: 54 additions & 25 deletions _plotly_utils/basevalidators.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,24 +632,35 @@ class BooleanValidator(BaseValidator):
"description": "A boolean (true/false) value.",
"requiredOpts": [],
"otherOpts": [
"arrayOk",
"dflt"
]
},
"""

def __init__(self, plotly_name, parent_name, **kwargs):
def __init__(self, plotly_name, parent_name, array_ok=False, **kwargs):
super(BooleanValidator, self).__init__(
plotly_name=plotly_name, parent_name=parent_name, **kwargs
)
self.array_ok = array_ok

def description(self):
return """\
The '{plotly_name}' property must be specified as a bool
(either True, or False)""".format(plotly_name=self.plotly_name)
desc = """\
The '{plotly_name}' property is a boolean and must be specified as:
- A boolean value: True or False""".format(plotly_name=self.plotly_name)
if self.array_ok:
desc += """
- A tuple or list of the above"""
return desc

def validate_coerce(self, v):
if is_none_or_typed_array_spec(v):
pass
elif self.array_ok and is_simple_array(v):
invalid_els = [e for e in v if not isinstance(e, bool)]
if invalid_els:
self.raise_invalid_elements(invalid_els[:10])
v = to_scalar_or_list(v)
elif not isinstance(v, bool):
self.raise_invalid_val(v)

Expand Down Expand Up @@ -1735,12 +1746,15 @@ class SubplotidValidator(BaseValidator):
"dflt"
],
"otherOpts": [
"arrayOk",
"regex"
]
}
"""

def __init__(self, plotly_name, parent_name, dflt=None, regex=None, **kwargs):
def __init__(
self, plotly_name, parent_name, dflt=None, regex=None, array_ok=False, **kwargs
):
if dflt is None and regex is None:
raise ValueError("One or both of regex and deflt must be specified")

Expand All @@ -1755,40 +1769,55 @@ def __init__(self, plotly_name, parent_name, dflt=None, regex=None, **kwargs):
self.base = re.match(r"/\^(\w+)", regex).group(1)

self.regex = self.base + r"(\d*)"
self.array_ok = array_ok

def description(self):
desc = """\
The '{plotly_name}' property is an identifier of a particular
subplot, of type '{base}', that may be specified as the string '{base}'
optionally followed by an integer >= 1
(e.g. '{base}', '{base}1', '{base}2', '{base}3', etc.)
""".format(plotly_name=self.plotly_name, base=self.base)
subplot, of type '{base}', that may be specified as:
- the string '{base}' optionally followed by an integer >= 1
(e.g. '{base}', '{base}1', '{base}2', '{base}3', etc.)""".format(
plotly_name=self.plotly_name, base=self.base
)
if self.array_ok:
desc += """
- A tuple or list of the above"""
return desc

def validate_coerce(self, v):
if v is None:
pass
elif not isinstance(v, str):
self.raise_invalid_val(v)
else:
# match = re.fullmatch(self.regex, v)
match = fullmatch(self.regex, v)
def coerce(value):
if not isinstance(value, str):
return value, False
match = fullmatch(self.regex, value)
if not match:
is_valid = False
return value, False
else:
digit_str = match.group(1)
if len(digit_str) > 0 and int(digit_str) == 0:
is_valid = False
return value, False
elif len(digit_str) > 0 and int(digit_str) == 1:
# Remove 1 suffix (e.g. x1 -> x)
v = self.base
is_valid = True
return self.base, True
else:
is_valid = True
return value, True

if not is_valid:
self.raise_invalid_val(v)
return v
if v is None:
pass
elif self.array_ok and is_simple_array(v):
values = []
invalid_els = []
for e in v:
coerced_e, success = coerce(e)
values.append(coerced_e)
if not success:
invalid_els.append(coerced_e)
if len(invalid_els) > 0:
self.raise_invalid_elements(invalid_els[:10])
return values
else:
v, success = coerce(v)
if not success:
self.raise_invalid_val(self.base)
return v


class FlaglistValidator(BaseValidator):
Expand Down
6 changes: 3 additions & 3 deletions _plotly_utils/colors/_swatches.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def _swatches(module_names, module_contents, template=None):
from plotly.express._core import apply_default_cascade

args = dict(template=template)
apply_default_cascade(args)
apply_default_cascade(args, constructor=None)

sequences = [
(k, v)
Expand Down Expand Up @@ -66,7 +66,7 @@ def _swatches_continuous(module_names, module_contents, template=None):
from plotly.express._core import apply_default_cascade

args = dict(template=template)
apply_default_cascade(args)
apply_default_cascade(args, constructor=None)

sequences = [
(k, v)
Expand Down Expand Up @@ -122,7 +122,7 @@ def _swatches_cyclical(module_names, module_contents, template=None):
from plotly.express._core import apply_default_cascade

args = dict(template=template)
apply_default_cascade(args)
apply_default_cascade(args, constructor=None)

rows = 2
cols = 4
Expand Down
Loading