From 51e95e79516b043a0de43c734e7ba917245c8306 Mon Sep 17 00:00:00 2001 From: Yuxuan Hu Date: Fri, 24 Jan 2025 11:23:20 +1100 Subject: [PATCH] remove 'tests' in base path in main function --- ARGO/oceancurrent/oceancurrent_file_server_api.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ARGO/oceancurrent/oceancurrent_file_server_api.py b/ARGO/oceancurrent/oceancurrent_file_server_api.py index e144f0d6..6cb4233d 100644 --- a/ARGO/oceancurrent/oceancurrent_file_server_api.py +++ b/ARGO/oceancurrent/oceancurrent_file_server_api.py @@ -18,8 +18,8 @@ 2. Elements in FILE_PATH_CONFIG is formatted as key-value pairs: - key: string, the product name. - value: dict, the root paths (file forlder name) of the products and the subproducts. - 3. The rootpath is a list of strings, which are the corresponding file folder name of each product. - 4. The subproduct is a list of strings, which are the corresponding file folder name of each subproduct. + 3. The rootpath is a list of strings, which are the corresponding path (file folder name) of each product. + 4. The subproduct is a list of strings, which are the corresponding path (file folder name) of each subproduct. """ FILE_PATH_CONFIG = { @@ -273,5 +273,8 @@ def pipeline(self, base_path: str): if __name__ == '__main__': file_structure = FileStructureExplorer() - file_structure.pipeline(os.path.join(os.path.dirname(__file__), 'tests')) + try: + file_structure.pipeline(os.path.join(os.path.dirname(__file__))) + except Exception as e: + logger.error(f"Failed to explore file system structure: {e}") logger.info("File structure exploration completed.")