Skip to content

dynamic_object.py does not handle key-based (vs identifier-based) classes #169

@matentzn

Description

@matentzn

When transforming data using map-data, dynamic_object.py fails to correctly handle classes that use key: true attributes (as opposed to identifier: true).

This affects transformation of LinkML-Map's own datamodel classes like ClassDerivation, SlotDerivation, EnumDerivation, etc., which all use key: true on their name attribute rather than identifier: true.

How to reproduce

The tests/input/examples/fair_mappings_metadata/data/sample-linkmlmap-spec.yaml example has class_derivations and enum_derivations commented out because of this bug — uncommenting them and running the linkml-map-to-fair transformation triggers the issue.

Expected behavior

dynamic_object.py should handle both key-based and identifier-based classes when constructing dynamic objects for transformation.

Context

Discovered during work on PR #81 (enhanced mapping metadata). See comment in sample-linkmlmap-spec.yaml.

Warning

I have not tested this again with the latest version of LinkML-map - this surfaced in a version from 4 months ago.. Sorry if this has been fixed since.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions