Skip to content

Duplicate outputs in workflow2 due to Link object identity comparison #57

Description

@ndaelman-hu

Issue

Duplicate Link objects appear in workflow2.outputs when the same section is referenced multiple times.

Location

simulationworkflowschema/general.py:237

The line if output not in self.outputs uses object identity comparison. Since Link doesn't implement __eq__, two Link objects with identical properties are not considered equal, allowing duplicates.

Example

Observed in VASP SinglePoint workflow:

workflow2.outputs = [
    Link(name="Output calculation", section="#/run/0/calculation/0"),
    Link(name="Output calculation", section="#/run/0/calculation/0"),  # duplicate
    Link(name="Output system", section="#/run/0/system/0")
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions