Skip to content
Snippets Groups Projects
Commit cfa9e8ab authored by Thomas Kluyver's avatar Thomas Kluyver
Browse files

Add --prepare-only option for xfel-calibrate

parent f9c00f3e
No related branches found
No related tags found
1 merge request!544Reproducibility, step 1
......@@ -74,6 +74,9 @@ def make_initial_parser(**kwargs):
default=False,
help="Do not run as a cluster job")
parser.add_argument('--prepare-only', action="store_true",
help="Prepare notebooks but don't run them")
parser.add_argument('--report-to', type=str,
help='Filename (and optionally path) for output'
' report')
......@@ -1166,6 +1169,15 @@ def run():
# Save information about jobs for reproducibility
job_group.save()
if args['prepare_only']:
print("Files prepared, not executing now (--prepare-only option).")
print("To execute the notebooks, run:")
rpt_opts = ''
if user_venv is not None:
rpt_opts = f'--python {python_exe}'
print(f" python -m xfel_calibrate.repeat {run_tmp_path} {rpt_opts}")
return
submission_time = datetime.now().strftime('%Y-%m-%dT%H:%M:%S')
# Launch the calibration work
......
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