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

Save command line to execute xfel_calibrate

parent 4e1e229b
No related branches found
No related tags found
2 merge requests!298Feat/dss cimprove master rebasing,!283Feat: Save command line to execute xfel_calibrate
......@@ -543,6 +543,20 @@ def create_finalize_script(fmt_args, temp_path, job_list):
os.chmod(f_name, all_stats)
def save_executed_command(run_tmp_path, version):
"""
Create a file with string used to execute `xfel_calibrate`
:param run_tmp_path: path to temporary directory for running job outputs
:parm version: git version of the pycalibration package
"""
f_name = "{}/run_calibrate.sh".format(run_tmp_path)
with open(f_name, "w") as finfile:
finfile.write(f'# pycalibration version: {version}\n')
finfile.write(' '.join(sys.argv))
def get_launcher_command(args, temp_path, dependent, job_list):
"""
Return a slurm launcher command
......@@ -826,6 +840,7 @@ def run():
# Write all input parameters to rst file to be included to final report
parms = parameter_values(parms, **args)
make_par_table(parms, temp_path, run_uuid)
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
out_path = "{}/{}/{}/{}".format(report_path, detector.upper(),
......
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