From 328192834fe6a4fa1119f24909a1362123de5108 Mon Sep 17 00:00:00 2001 From: Sara Damiano Date: Tue, 13 Aug 2024 10:09:44 -0400 Subject: [PATCH] Fix directory depth Signed-off-by: Sara Damiano --- docs/documentExamples.py | 8 +++++--- docs/fixFunctionsInGroups.py | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/documentExamples.py b/docs/documentExamples.py index 800ac2f..dfcae7d 100644 --- a/docs/documentExamples.py +++ b/docs/documentExamples.py @@ -11,22 +11,24 @@ if "GITHUB_WORKSPACE" in os.environ.keys() and "DOC_ROOT" in os.environ.keys(): docbuild_dir = os.environ.get("DOC_ROOT") repo_name = os.environ.get("GITHUB_REPOSITORY").split("/")[1] + relative_dir = f"../../../../{repo_name}/" else: docbuild_dir = os.getcwd() repo_name = docbuild_dir.replace("\\\\", "/").replace("\\", "/").split("/")[-2] + relative_dir = f"../../{repo_name}/" # where to write the file -output_file = "../docs/examples.dox" +output_file = relative_dir + "docs/examples.dox" output_file = os.path.join(docbuild_dir, output_file) output_file = os.path.abspath(os.path.realpath(output_file)) # The examples directory -examples_dir = "../examples/" +examples_dir = relative_dir + "examples/" examples_path = os.path.join(docbuild_dir, examples_dir) examples_path = os.path.abspath(os.path.realpath(examples_path)) # The extras directory -extras_dir = "../extras/" +extras_dir = relative_dir + "extras/" extras_path = os.path.join(docbuild_dir, extras_dir) extras_path = os.path.abspath(os.path.realpath(extras_path)) diff --git a/docs/fixFunctionsInGroups.py b/docs/fixFunctionsInGroups.py index 39f8a0f..01282f2 100644 --- a/docs/fixFunctionsInGroups.py +++ b/docs/fixFunctionsInGroups.py @@ -7,6 +7,8 @@ import xml.etree.ElementTree as ET # %% +# Some working directories + # The workspace directory if "GITHUB_WORKSPACE" in os.environ.keys() and "DOC_ROOT" in os.environ.keys(): docbuild_dir = os.environ.get("DOC_ROOT")