Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
Split visual graph into multiple pages (too many)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdpython committed Jan 24, 2020
1 parent 144a1a7 commit f19ec0c
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions _doc/sphinxdoc/source/_exts/generate_visual_graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,16 @@ def generate_dot_converters(app):
print("[mlprodict] graph for subfolder '{}'.".format(sub))
models = sklearn_operators(sub)
if len(models) > 0:
rows = []
for row in enumerate_visual_onnx_representation_into_rst(sub):
rows.append(row)
rows = [".. _l-skl2onnx-%s:" % sub, "", "=" * len(sub),
sub, "=" * len(sub), "", ".. toctree::", ""]
for irow, text in enumerate(enumerate_visual_onnx_representation_into_rst(sub)):
subname = "visual-%s-%03d.rst" % (sub, irow)
pagename = os.path.join(whe, subname)
with open(pagename, 'w', encoding='utf-8') as f:
f.write(text)
rows.append(" " + subname)
if len(rows) == 0:
continue
rows = [".. _l-skl2onnx-%s:" % sub, "", "=" * len(sub),
sub, "=" * len(sub), "", ".. contents::",
" :local:", ""] + rows
rows.append('')
dest = os.path.join(whe, "skl2onnx_%s.rst" % sub)
with open(dest, "w", encoding="utf-8") as f:
Expand Down

0 comments on commit f19ec0c

Please sign in to comment.