From 3bd0755761810c41cad45eb7f513f4ee52eff45b Mon Sep 17 00:00:00 2001
From: Lars Bilke <lars.bilke@ufz.de>
Date: Wed, 10 Jan 2024 15:04:12 +0100
Subject: [PATCH] [ruff] Fixes in convert_notebooks.

---
 web/scripts/convert_notebooks.py | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/web/scripts/convert_notebooks.py b/web/scripts/convert_notebooks.py
index 2663be46ec3..6a11415e61d 100644
--- a/web/scripts/convert_notebooks.py
+++ b/web/scripts/convert_notebooks.py
@@ -3,8 +3,8 @@ import subprocess
 import sys
 from pathlib import Path
 
-content_dir = Path(__file__).resolve().parent.parent / "content"
-os.chdir(content_dir)
+root_dir = Path(__file__).resolve().parent.parent.parent
+os.chdir(root_dir / "web" / "content")
 notebooks = Path().glob("**/*.ipynb")
 exit_code = 0
 
@@ -16,10 +16,7 @@ for notebook in notebooks:
         )
         exit_code = 1
         continue
-    template = os.path.join(
-        os.path.dirname(os.path.abspath(__file__)),
-        "../../Tests/Data/Notebooks/nbconvert_templates/collapsed.md.j2",
-    )
+    template = root_dir / "Tests/Data/Notebooks/nbconvert_templates/collapsed.md.j2"
     subprocess.run(
         [
             "jupyter",
-- 
GitLab