diff options
author | Rémi Flamary <remi.flamary@gmail.com> | 2017-09-01 18:42:52 +0200 |
---|---|---|
committer | Rémi Flamary <remi.flamary@gmail.com> | 2017-09-01 18:42:52 +0200 |
commit | e70313cb2eef5d889532eb004de0eb7361d616e6 (patch) | |
tree | 671e891ab385f028fdc9ac445f9a2fbc341a7097 /docs/nb_run_conv | |
parent | 98ae0808417d0f82e761f85265e8dcfa9ebe7e5f (diff) |
add converted notebooks
Diffstat (limited to 'docs/nb_run_conv')
-rwxr-xr-x | docs/nb_run_conv | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/docs/nb_run_conv b/docs/nb_run_conv index 99dbbce..ad5e432 100755 --- a/docs/nb_run_conv +++ b/docs/nb_run_conv @@ -20,7 +20,7 @@ import os cache_file='cache_nbrun' path_doc='source/auto_examples/' -path_nb='../../../notebooks/' +path_nb='../notebooks/' def load_json(fname): try: @@ -58,8 +58,9 @@ def to_update(fname,cache): def update(fname,cache): # jupyter nbconvert --to notebook --execute mynotebook.ipynb --output targte - print(' '.join(['jupyter','nbconvert','--to','notebook','--execute',path_doc+fname,'--output',path_nb+fname])) - subprocess.check_call(['jupyter','nbconvert','--to','notebook','--execute',path_doc+fname,'--output',path_nb+fname]) + subprocess.check_call(['cp',path_doc+fname,path_nb]) + print(' '.join(['jupyter','nbconvert','--to','notebook','--ExecutePreprocessor.timeout=600','--execute',path_nb+fname,'--inplace'])) + subprocess.check_call(['jupyter','nbconvert','--to','notebook','--ExecutePreprocessor.timeout=600','--execute',path_nb+fname,'--inplace']) cache[fname]=md5(path_doc+fname) @@ -74,11 +75,8 @@ for fname in lst_file: if to_update(fname,cache): print('Updating file: {}'.format(fname)) update(fname,cache) + save_json(cache_file,cache) -update(lst_file[0],cache) - - -save_json(cache_file,cache) |