From 8cb1a7570cd1bfea18d1616ff4c01e6a23f77633 Mon Sep 17 00:00:00 2001
From: ahmedk <karim.ahmed@xfel.eu>
Date: Mon, 8 May 2023 09:29:28 +0200
Subject: [PATCH] replace / in new notebooks names

---
 src/xfel_calibrate/calibrate.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/xfel_calibrate/calibrate.py b/src/xfel_calibrate/calibrate.py
index 53f0cba19..655bc6cad 100755
--- a/src/xfel_calibrate/calibrate.py
+++ b/src/xfel_calibrate/calibrate.py
@@ -351,7 +351,9 @@ def prepare_job(
         if title_cell is not None:
             title_cell.source = ''
     set_figure_format(new_nb, args["vector_figs"])
-    new_name = f"{nb_path.stem}__{cparm}__{suffix}.ipynb"
+    # In some cases a suffix for example can have `/`. e.g. LPDMini and GH2
+    # have karabo_da with a `/`.
+    new_name = f"{nb_path.stem}__{cparm}__{suffix}.ipynb".replace("/", "-")
 
     nbformat.write(new_nb, cal_work_dir / new_name)
 
-- 
GitLab