Skip to content

Commit b2a5d79

Browse files
committed
Add submodules to __all__
1 parent 5ab0da4 commit b2a5d79

File tree

127 files changed

+492
-135
lines changed

Some content is hidden

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

127 files changed

+492
-135
lines changed

packages/python/plotly/codegen/__init__.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -193,13 +193,6 @@ def perform_codegen():
193193
alls.setdefault((), [])
194194
alls[node.parent_path_parts].append(node.name_datatype_class)
195195

196-
# ### __all__ ###
197-
for path_parts, class_names in alls.items():
198-
if path_parts and class_names:
199-
filepath = opath.join(outdir, "graph_objects", *path_parts, "__init__.py")
200-
with open(filepath, "at") as f:
201-
f.write(f"\n__all__ = {class_names}")
202-
203196
# ### Deprecated ###
204197
# These are deprecated legacy datatypes like graph_objects.Marker
205198
write_deprecated_datatypes(outdir)
@@ -232,6 +225,7 @@ def perform_codegen():
232225
path_to_datatype_import_info.setdefault(key, []).append(
233226
(f"plotly.graph_objects{node.parent_dotpath_str}", node.name_undercase)
234227
)
228+
alls[node.parent_path_parts].append(node.name_undercase)
235229

236230
# ### Write plotly/graph_objects/graph_objects.py ###
237231
# This if for backward compatibility. It just imports everything from
@@ -243,6 +237,11 @@ def perform_codegen():
243237
root_datatype_imports.append(("._figure", "Figure"))
244238
alls[()].append("Figure")
245239

240+
# ### Add deprecations ###
241+
root_datatype_imports.append(
242+
("._deprecations", DEPRECATED_DATATYPES.keys()))
243+
alls[()].extend(DEPRECATED_DATATYPES.keys())
244+
246245
optional_figure_widget_import = f"""
247246
__all__ = {alls[()]}
248247
try:
@@ -258,8 +257,12 @@ def perform_codegen():
258257
"""
259258
root_datatype_imports.append(optional_figure_widget_import)
260259

261-
# ### Add deprecations ###
262-
root_datatype_imports.append(("._deprecations", DEPRECATED_DATATYPES.keys()))
260+
# ### __all__ ###
261+
for path_parts, class_names in alls.items():
262+
if path_parts and class_names:
263+
filepath = opath.join(outdir, "graph_objects", *path_parts, "__init__.py")
264+
with open(filepath, "at") as f:
265+
f.write(f"\n__all__ = {class_names}")
263266

264267
# ### Output datatype __init__.py files ###
265268
graph_objs_pkg = opath.join(outdir, "graph_objects")

packages/python/plotly/plotly/graph_objects/__init__.py

Lines changed: 98 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -92701,6 +92701,33 @@ def __init__(
9270192701
from plotly.graph_objects import area
9270292702
from plotly.graph_objects import layout
9270392703
from ._figure import Figure
92704+
from ._deprecations import (
92705+
Data,
92706+
Annotations,
92707+
Frames,
92708+
AngularAxis,
92709+
Annotation,
92710+
ColorBar,
92711+
Contours,
92712+
ErrorX,
92713+
ErrorY,
92714+
ErrorZ,
92715+
Font,
92716+
Legend,
92717+
Line,
92718+
Margin,
92719+
Marker,
92720+
RadialAxis,
92721+
Scene,
92722+
Stream,
92723+
XAxis,
92724+
YAxis,
92725+
ZAxis,
92726+
XBins,
92727+
YBins,
92728+
Trace,
92729+
Histogram2dcontour,
92730+
)
9270492731

9270592732
__all__ = [
9270692733
"Waterfall",
@@ -92750,7 +92777,78 @@ def __init__(
9275092777
"Area",
9275192778
"Layout",
9275292779
"Frame",
92780+
"waterfall",
92781+
"volume",
92782+
"violin",
92783+
"table",
92784+
"surface",
92785+
"sunburst",
92786+
"streamtube",
92787+
"splom",
92788+
"scatterternary",
92789+
"scatterpolargl",
92790+
"scatterpolar",
92791+
"scattermapbox",
92792+
"scattergl",
92793+
"scattergeo",
92794+
"scattercarpet",
92795+
"scatter3d",
92796+
"scatter",
92797+
"sankey",
92798+
"pointcloud",
92799+
"pie",
92800+
"parcoords",
92801+
"parcats",
92802+
"ohlc",
92803+
"mesh3d",
92804+
"isosurface",
92805+
"indicator",
92806+
"histogram2dcontour",
92807+
"histogram2d",
92808+
"histogram",
92809+
"heatmapgl",
92810+
"heatmap",
92811+
"funnelarea",
92812+
"funnel",
92813+
"densitymapbox",
92814+
"contourcarpet",
92815+
"contour",
92816+
"cone",
92817+
"choroplethmapbox",
92818+
"choropleth",
92819+
"carpet",
92820+
"candlestick",
92821+
"box",
92822+
"barpolar",
92823+
"bar",
92824+
"area",
92825+
"layout",
9275392826
"Figure",
92827+
"Data",
92828+
"Annotations",
92829+
"Frames",
92830+
"AngularAxis",
92831+
"Annotation",
92832+
"ColorBar",
92833+
"Contours",
92834+
"ErrorX",
92835+
"ErrorY",
92836+
"ErrorZ",
92837+
"Font",
92838+
"Legend",
92839+
"Line",
92840+
"Margin",
92841+
"Marker",
92842+
"RadialAxis",
92843+
"Scene",
92844+
"Stream",
92845+
"XAxis",
92846+
"YAxis",
92847+
"ZAxis",
92848+
"XBins",
92849+
"YBins",
92850+
"Trace",
92851+
"Histogram2dcontour",
9275492852
]
9275592853
try:
9275692854
import ipywidgets
@@ -92763,30 +92861,3 @@ def __init__(
9276392861
__all__.append("FigureWidget")
9276492862
except ImportError:
9276592863
pass
92766-
from ._deprecations import (
92767-
Data,
92768-
Annotations,
92769-
Frames,
92770-
AngularAxis,
92771-
Annotation,
92772-
ColorBar,
92773-
Contours,
92774-
ErrorX,
92775-
ErrorY,
92776-
ErrorZ,
92777-
Font,
92778-
Legend,
92779-
Line,
92780-
Margin,
92781-
Marker,
92782-
RadialAxis,
92783-
Scene,
92784-
Stream,
92785-
XAxis,
92786-
YAxis,
92787-
ZAxis,
92788-
XBins,
92789-
YBins,
92790-
Trace,
92791-
Histogram2dcontour,
92792-
)

packages/python/plotly/plotly/graph_objects/area/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1056,6 +1056,6 @@ def __init__(
10561056
self._skip_invalid = False
10571057

10581058

1059-
__all__ = ["Hoverlabel", "Marker", "Stream"]
1059+
__all__ = ["Hoverlabel", "Marker", "Stream", "hoverlabel"]
10601060

10611061
from plotly.graph_objects.area import hoverlabel

packages/python/plotly/plotly/graph_objects/bar/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4071,6 +4071,10 @@ def __init__(
40714071
"Stream",
40724072
"Textfont",
40734073
"Unselected",
4074+
"unselected",
4075+
"selected",
4076+
"marker",
4077+
"hoverlabel",
40744078
]
40754079

40764080
from plotly.graph_objects.bar import unselected

packages/python/plotly/plotly/graph_objects/bar/marker/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2488,6 +2488,6 @@ def __init__(
24882488
self._skip_invalid = False
24892489

24902490

2491-
__all__ = ["ColorBar", "Line"]
2491+
__all__ = ["ColorBar", "Line", "colorbar"]
24922492

24932493
from plotly.graph_objects.bar.marker import colorbar

packages/python/plotly/plotly/graph_objects/bar/marker/colorbar/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs):
718718
self._skip_invalid = False
719719

720720

721-
__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title"]
721+
__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"]
722722

723723
from plotly.graph_objects.bar.marker.colorbar import title

packages/python/plotly/plotly/graph_objects/barpolar/__init__.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1931,7 +1931,17 @@ def __init__(
19311931
self._skip_invalid = False
19321932

19331933

1934-
__all__ = ["Hoverlabel", "Marker", "Selected", "Stream", "Unselected"]
1934+
__all__ = [
1935+
"Hoverlabel",
1936+
"Marker",
1937+
"Selected",
1938+
"Stream",
1939+
"Unselected",
1940+
"unselected",
1941+
"selected",
1942+
"marker",
1943+
"hoverlabel",
1944+
]
19351945

19361946
from plotly.graph_objects.barpolar import unselected
19371947
from plotly.graph_objects.barpolar import selected

packages/python/plotly/plotly/graph_objects/barpolar/marker/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2492,6 +2492,6 @@ def __init__(
24922492
self._skip_invalid = False
24932493

24942494

2495-
__all__ = ["ColorBar", "Line"]
2495+
__all__ = ["ColorBar", "Line", "colorbar"]
24962496

24972497
from plotly.graph_objects.barpolar.marker import colorbar

packages/python/plotly/plotly/graph_objects/barpolar/marker/colorbar/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs):
718718
self._skip_invalid = False
719719

720720

721-
__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title"]
721+
__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"]
722722

723723
from plotly.graph_objects.barpolar.marker.colorbar import title

packages/python/plotly/plotly/graph_objects/box/__init__.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1440,7 +1440,18 @@ def __init__(
14401440
self._skip_invalid = False
14411441

14421442

1443-
__all__ = ["Hoverlabel", "Line", "Marker", "Selected", "Stream", "Unselected"]
1443+
__all__ = [
1444+
"Hoverlabel",
1445+
"Line",
1446+
"Marker",
1447+
"Selected",
1448+
"Stream",
1449+
"Unselected",
1450+
"unselected",
1451+
"selected",
1452+
"marker",
1453+
"hoverlabel",
1454+
]
14441455

14451456
from plotly.graph_objects.box import unselected
14461457
from plotly.graph_objects.box import selected

packages/python/plotly/plotly/graph_objects/candlestick/__init__.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,16 @@ def __init__(self, arg=None, fillcolor=None, line=None, **kwargs):
11261126
self._skip_invalid = False
11271127

11281128

1129-
__all__ = ["Decreasing", "Hoverlabel", "Increasing", "Line", "Stream"]
1129+
__all__ = [
1130+
"Decreasing",
1131+
"Hoverlabel",
1132+
"Increasing",
1133+
"Line",
1134+
"Stream",
1135+
"increasing",
1136+
"hoverlabel",
1137+
"decreasing",
1138+
]
11301139

11311140
from plotly.graph_objects.candlestick import increasing
11321141
from plotly.graph_objects.candlestick import hoverlabel

packages/python/plotly/plotly/graph_objects/carpet/__init__.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5308,7 +5308,16 @@ def __init__(
53085308
self._skip_invalid = False
53095309

53105310

5311-
__all__ = ["Aaxis", "Baxis", "Font", "Hoverlabel", "Stream"]
5311+
__all__ = [
5312+
"Aaxis",
5313+
"Baxis",
5314+
"Font",
5315+
"Hoverlabel",
5316+
"Stream",
5317+
"hoverlabel",
5318+
"baxis",
5319+
"aaxis",
5320+
]
53125321

53135322
from plotly.graph_objects.carpet import hoverlabel
53145323
from plotly.graph_objects.carpet import baxis

packages/python/plotly/plotly/graph_objects/carpet/aaxis/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs):
714714
self._skip_invalid = False
715715

716716

717-
__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title"]
717+
__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"]
718718

719719
from plotly.graph_objects.carpet.aaxis import title

packages/python/plotly/plotly/graph_objects/carpet/baxis/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs):
714714
self._skip_invalid = False
715715

716716

717-
__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title"]
717+
__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"]
718718

719719
from plotly.graph_objects.carpet.baxis import title

packages/python/plotly/plotly/graph_objects/choropleth/__init__.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2872,7 +2872,19 @@ def __init__(
28722872
self._skip_invalid = False
28732873

28742874

2875-
__all__ = ["ColorBar", "Hoverlabel", "Marker", "Selected", "Stream", "Unselected"]
2875+
__all__ = [
2876+
"ColorBar",
2877+
"Hoverlabel",
2878+
"Marker",
2879+
"Selected",
2880+
"Stream",
2881+
"Unselected",
2882+
"unselected",
2883+
"selected",
2884+
"marker",
2885+
"hoverlabel",
2886+
"colorbar",
2887+
]
28762888

28772889
from plotly.graph_objects.choropleth import unselected
28782890
from plotly.graph_objects.choropleth import selected

packages/python/plotly/plotly/graph_objects/choropleth/colorbar/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs):
718718
self._skip_invalid = False
719719

720720

721-
__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title"]
721+
__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"]
722722

723723
from plotly.graph_objects.choropleth.colorbar import title

packages/python/plotly/plotly/graph_objects/choroplethmapbox/__init__.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2880,7 +2880,19 @@ def __init__(
28802880
self._skip_invalid = False
28812881

28822882

2883-
__all__ = ["ColorBar", "Hoverlabel", "Marker", "Selected", "Stream", "Unselected"]
2883+
__all__ = [
2884+
"ColorBar",
2885+
"Hoverlabel",
2886+
"Marker",
2887+
"Selected",
2888+
"Stream",
2889+
"Unselected",
2890+
"unselected",
2891+
"selected",
2892+
"marker",
2893+
"hoverlabel",
2894+
"colorbar",
2895+
]
28842896

28852897
from plotly.graph_objects.choroplethmapbox import unselected
28862898
from plotly.graph_objects.choroplethmapbox import selected

packages/python/plotly/plotly/graph_objects/choroplethmapbox/colorbar/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,6 @@ def __init__(self, arg=None, color=None, family=None, size=None, **kwargs):
718718
self._skip_invalid = False
719719

720720

721-
__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title"]
721+
__all__ = ["Tickfont", "Tickformatstop", "Tickformatstop", "Title", "title"]
722722

723723
from plotly.graph_objects.choroplethmapbox.colorbar import title

0 commit comments

Comments
 (0)