Skip to content

Commit e7ad710

Browse files
authored
Makefile: modify docstrings to use temporarily graph_objs (#2406)
* Makefile: modify docstrings to use temporarily graph_objs * changed order of import to respect alphabetical order * graph_obs / graph_objects in template
1 parent a92e963 commit e7ad710

File tree

163 files changed

+1375
-1369
lines changed

Some content is hidden

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

163 files changed

+1375
-1369
lines changed

Diff for: doc/apidoc/Makefile

+6
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,15 @@ help:
1818
# For sphinx-apidoc the first positional path is the module to document
1919
# then all the other ones are paths to exclude for the doc generation
2020
%: Makefile
21+
sed -i 's/:class:`plotly.graph_objects/:class:`plotly.graph_objs/g' ../../packages/python/plotly/plotly/graph_objs/*.py
22+
sed -i 's/:class:`plotly.graph_objects/:class:`plotly.graph_objs/g' ../../packages/python/plotly/plotly/graph_objs/*/*.py
23+
sed -i 's/:class:`plotly.graph_objects/:class:`plotly.graph_objs/g' ../../packages/python/plotly/plotly/graph_objs/*/*/*.py
24+
sed -i 's/:class:`plotly.graph_objects/:class:`plotly.graph_objs/g' ../../packages/python/plotly/plotly/graph_objs/*/*/*/*.py
2125
sphinx-apidoc -o generated ../../packages/python/plotly/plotly ../../packages/python/plotly/plotly/validators ../../packages/python/plotly/plotly/tests ../../packages/python/plotly/plotly/matplotlylib/ ../../packages/python/plotly/plotly/offline ../../packages/python/plotly/plotly/api
2226
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
27+
git checkout -- ../../packages/python/plotly/plotly/graph_objs
2328
rename 's/graph_objs/graph_objects/' _build/html/*.html _build/html/generated/*.html
29+
mv _build/html/generated/plotly.graph_objs.html _build/html/generated/plotly.graph_objects.html
2430
sed -i 's/graph_objs/graph_objects/g' _build/html/*.html
2531
sed -i 's/graph_objs/graph_objects/g' _build/html/*.inv
2632
sed -i 's/graph_objs/graph_objects/g' _build/html/*.js

Diff for: doc/apidoc/_templates/trace.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515

1616
.. autosummary::
1717

18-
plotly.graph_objects.{{ objname.lower() }}
18+
plotly.graph_objs.{{ objname.lower() }}
1919

20-
.. automodule:: plotly.graph_objects.{{ objname.lower() }}
20+
.. automodule:: plotly.graph_objs.{{ objname.lower() }}
2121
:members:
2222
:undoc-members:
2323

Diff for: packages/python/plotly/codegen/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,8 @@ def __getattr__(import_name):
303303
# ### Output datatype __init__.py files ###
304304
graph_objs_pkg = opath.join(outdir, "graph_objs")
305305
for path_parts in datatype_rel_class_imports:
306-
rel_classes = datatype_rel_class_imports[path_parts]
307-
rel_modules = datatype_rel_module_imports.get(path_parts, [])
306+
rel_classes = sorted(datatype_rel_class_imports[path_parts])
307+
rel_modules = sorted(datatype_rel_module_imports.get(path_parts, []))
308308
if path_parts == ():
309309
init_extra = optional_figure_widget_import
310310
else:

0 commit comments

Comments
 (0)