Skip to content
Snippets Groups Projects
Commit d546505c authored by Karim Ahmed's avatar Karim Ahmed
Browse files

MR comments

parent 3c023ba1
No related branches found
No related tags found
2 merge requests!298Feat/dss cimprove master rebasing,!265keep, rename and move temp folder with report
...@@ -682,12 +682,12 @@ def concurrent_run(temp_path, nb, nbname, args, cparm=None, cval=None, ...@@ -682,12 +682,12 @@ def concurrent_run(temp_path, nb, nbname, args, cparm=None, cval=None,
return jobid return jobid
def make_par_table(parms, run_temp_path): def make_par_table(parms, run_tmp_path):
""" """
Create a table with input parameters if the notebook Create a table with input parameters of the notebook
:param parms: parameters of the notebook :param parms: parameters of the notebook
:param run_temp_path: path to temporary directory for running job outputs :param run_tmp_path: path to temporary directory for running job outputs
""" """
# Add space in long strings without line breakers ` ,-/` to # Add space in long strings without line breakers ` ,-/` to
...@@ -743,7 +743,7 @@ def make_par_table(parms, run_temp_path): ...@@ -743,7 +743,7 @@ def make_par_table(parms, run_temp_path):
\end{longtable} \end{longtable}
''') ''')
f_name = "{}/InputParameters.rst".format(run_temp_path) f_name = "{}/InputParameters.rst".format(run_tmp_path)
with open(f_name, "w") as finfile: with open(f_name, "w") as finfile:
finfile.write(textwrap.dedent(tmpl.render(p=col_type, lines=l_parms))) finfile.write(textwrap.dedent(tmpl.render(p=col_type, lines=l_parms)))
...@@ -835,7 +835,7 @@ def run(): ...@@ -835,7 +835,7 @@ def run():
# Write all input parameters to rst file to be included to final report # Write all input parameters to rst file to be included to final report
parms = parameter_values(parms, **args) parms = parameter_values(parms, **args)
make_par_table(parms, temp_path, run_uuid) make_par_table(parms, run_tmp_path)
save_executed_command(run_tmp_path, version) save_executed_command(run_tmp_path, version)
# wait on all jobs to run and then finalize the run by creating a report from the notebooks # wait on all jobs to run and then finalize the run by creating a report from the notebooks
......
...@@ -277,8 +277,8 @@ def make_report(run_path, tmp_path, out_path, project, author, version, ...@@ -277,8 +277,8 @@ def make_report(run_path, tmp_path, out_path, project, author, version,
temp_dirs = glob(f'{tmp_path}/*/') temp_dirs = glob(f'{tmp_path}/*/')
# Remove folders with figures and sphinx files. # Remove folders with figures and sphinx files.
print(f"Removing directories [{temp_dirs}] in temp folder: {tmp_path}") print(f"Removing directories [{temp_dirs}] in temp folder: {tmp_path}")
for dtmp in temp_dirs:
[rmtree(f'{dtmp}/') for dtmp in temp_dirs] rmtree(f'{dtmp}/')
# Moving temporary files to out-folder after successful execution # Moving temporary files to out-folder after successful execution
# This helps in keeping elements needed for re-producibility. # This helps in keeping elements needed for re-producibility.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment