diff --git a/xfel_calibrate/calibrate.py b/xfel_calibrate/calibrate.py index ceb838657f5c6e51fd7d2fe3e8a350f57de469a3..db8123a60c097a02d0fb7835fb8c05ec48a5a00c 100755 --- a/xfel_calibrate/calibrate.py +++ b/xfel_calibrate/calibrate.py @@ -682,13 +682,12 @@ def concurrent_run(temp_path, nb, nbname, args, cparm=None, cval=None, return jobid -def make_par_table(parms, temp_path, run_uuid): +def make_par_table(parms, run_temp_path): """ Create a table with input parameters if the notebook :param parms: parameters of the notebook - :param temp_path: path to temporary directory for job outputs - :param run_uuid: inset of folder name containing timestamp(fmt: YMD_HMS). + :param run_temp_path: path to temporary directory for running job outputs """ # Add space in long strings without line breakers ` ,-/` to @@ -744,7 +743,7 @@ def make_par_table(parms, temp_path, run_uuid): \end{longtable} ''') - f_name = "{}/slurm_tmp_{}/InputParameters.rst".format(temp_path, run_uuid) + f_name = "{}/InputParameters.rst".format(run_temp_path) with open(f_name, "w") as finfile: finfile.write(textwrap.dedent(tmpl.render(p=col_type, lines=l_parms))) @@ -831,7 +830,7 @@ def run(): cluster_profile = "slurm_prof_{}".format(run_uuid) # create a temporary output directory to work in - run_tmp_path = "{}/slurm_tmp_{}".format(temp_path, run_uuid) + run_tmp_path = "{}/slurm_out_{}_{}_{}".format(temp_path, detector, caltype, run_uuid) os.makedirs(run_tmp_path) # Write all input parameters to rst file to be included to final report diff --git a/xfel_calibrate/finalize.py b/xfel_calibrate/finalize.py index ff0a872b117c219a94c88d6a80d882fbce41c9b6..4a912bc61e9742b7ca256b62bb13007bb7363ff5 100644 --- a/xfel_calibrate/finalize.py +++ b/xfel_calibrate/finalize.py @@ -281,11 +281,11 @@ def make_report(run_path, tmp_path, out_path, project, author, version, [rmtree(f'{dtmp}/') for dtmp in temp_dirs] # Moving temporary files to out-folder after successful execution - # This helps in keeping elements needed for reproducability. + # This helps in keeping elements needed for re-producibility. print(f"Moving temporary files to final location" - f": {out_path}/{os.path.basename(tmp_path)}") - move(tmp_path, f"{out_path}/{os.path.basename(tmp_path)}") - + f": {out_path}/{os.path.basename(tmp_path)} with name: " + f"slurm_out_{report_name}") + move(tmp_path, f"{out_path}/slurm_out_{report_name}") def make_titlepage(sphinx_path, project, data_path, version):