From 79420f77dd8a07131c4a9be1c1b9906a9408f852 Mon Sep 17 00:00:00 2001 From: Joltras Date: Fri, 11 Sep 2026 22:19:06 +0200 Subject: [PATCH 1/3] fix: fix path to project root --- test/globals_test.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/globals_test.py b/test/globals_test.py index a65d56e..383cf6c 100644 --- a/test/globals_test.py +++ b/test/globals_test.py @@ -92,10 +92,8 @@ def test_json_suffix(self): self.assertEqual(".json", globals.JSON_SUFFIX) def test_path(self): - self.assertEqual( - os.path.realpath(os.path.dirname(__file__).replace("\\test", "")), - globals.APPLICATION_PATH, - ) + project_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + self.assertEqual(project_root, globals.APPLICATION_PATH) if __name__ == "__main__": From 07c06e1f8a3bc4bcec51c7b48028d61057510f84 Mon Sep 17 00:00:00 2001 From: Joltras Date: Fri, 11 Sep 2026 22:19:32 +0200 Subject: [PATCH 2/3] fix: fix path to project root --- src/utils/globals.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/utils/globals.py b/src/utils/globals.py index 33a7388..f14beb9 100644 --- a/src/utils/globals.py +++ b/src/utils/globals.py @@ -52,9 +52,8 @@ class Color(Enum): # Json BASE_INDENT = " " JSON_SUFFIX = ".json" -APPLICATION_PATH = os.path.realpath( - os.path.dirname(__file__).replace("\\src", "").replace("\\utils", "") -) +_CURRENT_DIR = os.path.dirname(os.path.abspath(__file__)) +APPLICATION_PATH = os.path.dirname(os.path.dirname(_CURRENT_DIR)) DEFAULT_FLOOR_NAME = "floor" DEFAULT_FLOOR_DIRECTORY = "generation" From 6f785c1f95e78328b46e6a9783d970cb1109683c Mon Sep 17 00:00:00 2001 From: Joltras Date: Fri, 11 Sep 2026 22:20:14 +0200 Subject: [PATCH 3/3] feat: ignore generated json files --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index bda025b..2ab8488 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ .idea /generation -src/utils/generation/ __pycache__/ .python-version