Skip to content

Commit 2ac6c71

Browse files
committed
Added default parameters without description
1 parent 8fc55d6 commit 2ac6c71

2 files changed

Lines changed: 1437 additions & 0 deletions

File tree

setup.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040

4141
mp = Model(add_pack=p_list)
4242

43+
# with description
4344
nb = mp.script_model2nb(use_yapf=False)
4445
ipynb_buff = io.StringIO(nbformat.writes(nb))
4546
s = nbconvert.export(nbconvert.get_exporter('markdown'), ipynb_buff)[0]
@@ -58,6 +59,25 @@
5859

5960
ipynb_buff.close()
6061

62+
# without discription
63+
nb = mp.script_model2nb(print_descr=False, use_yapf=False)
64+
ipynb_buff = io.StringIO(nbformat.writes(nb))
65+
s = nbconvert.export(nbconvert.get_exporter('markdown'), ipynb_buff)[0]
66+
67+
s = s.replace('\n\n```', '\n\n```python')
68+
69+
p_list_order = list(mp.packages.keys())
70+
toc = [
71+
'* [' + i + '](#' + i.replace('.', '') + ')\n' for i in p_list_order
72+
]
73+
toc = ''.join(toc)
74+
75+
with open('wiki_default_parameters_without_description.md', 'w') as f:
76+
f.write(toc)
77+
f.write(s)
78+
79+
ipynb_buff.close()
80+
6181
except OSError as e:
6282
print('unable to update wiki_default_parameters.md')
6383

0 commit comments

Comments
 (0)