Skip to content

custom annotation dropped after calling copy() on toplevel objects #191

@tramyn

Description

@tramyn

When I perform copy() on a Strateos ProtocolInterface, the custom annotations needed for specifying dotnames are dropped. Here is reproducible code:

sg = opil.StrateosOpilGenerator()
opil_doc = sg.parse_strateos_json(ip_constants.STRATEOS_NAMESPACE,
                                  protocol_name,
                                  protocol['id'],
                                  protocol['inputs'])

# dotname is present before copy
protocol_interfaces = [top_level for top_level in opil_doc.objects if isinstance(top_level, opil.ProtocolInterface)]
for parameter in protocol_interfaces[0].has_parameter:
   if parameter.dotname:
       print(parameter.dotname)

# dotname is dropped after copy
protocol_interface_copy = protocol_interfaces[0].copy()
for parameter in protocol_interface_copy.has_parameter:
   if parameter.dotname:
       print(parameter.dotname)

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