Skip to content

Commit

Permalink
remove old archive_path
Browse files Browse the repository at this point in the history
  • Loading branch information
jrudz committed Oct 31, 2024
1 parent e9d72db commit 7531259
Showing 1 changed file with 0 additions and 67 deletions.
67 changes: 0 additions & 67 deletions src/nomad_utility_workflows/utils/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 7531259

Please sign in to comment.