Skip to content
Snippets Groups Projects

Feat: Save command line to execute xfel_calibrate

Merged Mikhail Karnevskiy requested to merge feat/save_cmd_line into master
All threads resolved!
1 file
+ 15
0
Compare changes
  • Side-by-side
  • Inline
@@ -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(),
Loading