Skip to content

Commit

Permalink
Merge branch 'main' into improve-config-data
Browse files Browse the repository at this point in the history
  • Loading branch information
DropD committed Jan 21, 2025
2 parents 1931b5a + 2c0ee10 commit b9b55cb
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/sirocco/parsing/_yaml_data_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -674,17 +674,17 @@ def task_dict(self) -> dict[str, ConfigTask]:
return {task.name: task for task in self.tasks}


def canonicalize_workflow(value: ConfigWorkflow, rootdir: Path) -> CanonicalWorkflow:
if not value.name:
def canonicalize_workflow(config_workflow: ConfigWorkflow, rootdir: Path) -> CanonicalWorkflow:
if not config_workflow.name:
msg = "Workflow name required for canonicalization."
raise ValueError(msg)
return CanonicalWorkflow(
name=value.name,
name=config_workflow.name,
rootdir=rootdir,
cycles=value.cycles,
tasks=value.tasks,
data=value.data,
parameters=value.parameters,
cycles=config_workflow.cycles,
tasks=config_workflow.tasks,
data=config_workflow.data,
parameters=config_workflow.parameters,
)


Expand All @@ -708,5 +708,4 @@ def load_workflow_config(workflow_config: str) -> CanonicalWorkflow:

rootdir = config_path.resolve().parent

return canonicalize_workflow(value=parsed_workflow, rootdir=rootdir)
# return parsed_workflow
return canonicalize_workflow(config_workflow=parsed_workflow, rootdir=rootdir)

0 comments on commit b9b55cb

Please sign in to comment.