From cea83396d29130fc0fba74d6cdf6151d178665d7 Mon Sep 17 00:00:00 2001 From: Florez Ospina Juan Felipe Date: Fri, 11 Apr 2025 11:05:41 +0200 Subject: [PATCH] Add function to estimate project directory path --- pipelines/steps/utils.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pipelines/steps/utils.py b/pipelines/steps/utils.py index bd59fbb..0120ba4 100644 --- a/pipelines/steps/utils.py +++ b/pipelines/steps/utils.py @@ -146,6 +146,12 @@ def metadata_dict_to_dataframe(metadata: dict, shape: tuple): return df +def resolve_project_path(): + try: + thisFilePath = os.path.abspath(__file__) + except NameError: + thisFilePath = os.getcwd() + return os.path.normpath(os.path.join(thisFilePath, "..", "..", "..")) def load_project_yaml_files(projectPath : str, filename : str):