File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 ]
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+
6181except OSError as e :
6282 print ('unable to update wiki_default_parameters.md' )
6383
You can’t perform that action at this time.
0 commit comments