Skip to content
Snippets Groups Projects
Commit a0d6507d authored by Mikhail Karnevskiy's avatar Mikhail Karnevskiy
Browse files

Add input parameters as a chapter to report

parent 2bea8aca
No related branches found
No related tags found
1 merge request!21Beautify report
......@@ -467,7 +467,20 @@ def run():
# create a temporary output directory to work in
run_tmp_path = "{}/slurm_tmp_{}".format(temp_path, run_uuid)
os.makedirs(run_tmp_path)
# Write all input parameters to rst file to be included to final report
parms = parameter_values(parms, **args)
with open("{}/slurm_tmp_{}/InputParameters.rst".format(temp_path, run_uuid), "w") as finfile:
finfile.write("Input Parameters \n")
finfile.write("================ \n")
for p in parms:
finfile.write("{} \n\n".format(p.comment))
finfile.write(".. parsed-literal::\n")
if p.type is str:
finfile.write(" {} = '{}' \n\n".format(p.name, p.value))
else:
finfile.write(" {} = {} \n\n".format(p.name, p.value))
# wait on all jobs to run and then finalize the run by creating a report from the notebooks
out_path = "{}/{}/{}/{}".format(report_path, detector.upper(), caltype.upper(), datetime.now().isoformat())
if try_report_to_output:
......
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