From 75312598b76b5f8c8c85ceca2e191be98207f4c0 Mon Sep 17 00:00:00 2001 From: jrudz Date: Thu, 31 Oct 2024 12:39:20 +0100 Subject: [PATCH] remove old archive_path --- .../utils/workflows.py | 67 ------------------- 1 file changed, 67 deletions(-) diff --git a/src/nomad_utility_workflows/utils/workflows.py b/src/nomad_utility_workflows/utils/workflows.py index 59b5cbd..9acf762 100644 --- a/src/nomad_utility_workflows/utils/workflows.py +++ b/src/nomad_utility_workflows/utils/workflows.py @@ -74,73 +74,6 @@ def __init__(self, **data): super().__init__(**data) self.path_info = {**default_path_info, **self.path_info} - # @property - # def archive_path(self) -> str: - # archive_path = '' - # if not self.path_info: - # logger.warning( - # f'No path info provided for {self.type}-{self.name}.' - # ' Section reference will be missing.' - # ) - # return archive_path - - # if self.path_info.get('archive_path'): - # archive_path = self.path_info['archive_path'] - # elif self.type == 'workflow': - # archive_path = 'workflow2' - # else: - # # SUPERSECTION - # if self.path_info[ - # 'supersection_path' - # ]: # case 1 - supersection path is given - # archive_path = self.path_info['supersection_path'] - # if self.path_info.get('supersection_index') is not None: - # # add supersection index when given, else supersection is assumed - # # to be nonrepeating - # archive_path += f"/{self.path_info.get('supersection_index')}" - # elif self.path_info.get('section_type'): - # if self.path_info.get('section_type') in [ - # 'system', - # 'calculation', - # 'method', - # ]: # case 2 - no supersection path, but section type is in run - # run_index = self.path_info.get('supersection_index') - # run_index = ( - # run_index if run_index is not None else 0 - # ) #! -1 notation currently not functional for supersection! - # # add run index when given, else use last run section - # archive_path = f'run/{run_index}' - # elif self.path_info.get('section_type') in ['results']: - # archive_path = 'workflow2' - # else: - # archive_path += f"/{self.path_info.get('section_type')}" - # if self.path_info.get('section_index') is not None: - # # add section index when given, else supersection is assumed - # # to be nonrepeating - # archive_path += f"/{self.path_info.get('section_index')}" - # else: - # logger.warning( - # ( - # 'No supersection path or section type provided for ' - # f'{self.type}-{self.name}. Section reference may be incorrect.' - # ), - # ) - - # # SECTION - # if self.path_info.get('section_type') is not None: - # archive_path += f"/{self.path_info['section_type']}" - # if self.path_info.get('section_index') is not None: - # archive_path += f"/{self.path_info['section_index']}" - # else: - # logger.warning( - # ( - # f'No section type provided for {self.type}-{self.name}. ' - # 'Section reference may be incorrect.' - # ), - # ) - - # return archive_path - @property def archive_path(self) -> str: if not self.path_info: