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

Add --prepare-only option for xfel-calibrate

parent 38f265e2
No related merge requests found
......@@ -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')
......@@ -1170,6 +1173,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