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.
When transforming data using
map-data,dynamic_object.pyfails to correctly handle classes that usekey: trueattributes (as opposed toidentifier: true).This affects transformation of LinkML-Map's own datamodel classes like
ClassDerivation,SlotDerivation,EnumDerivation, etc., which all usekey: trueon theirnameattribute rather thanidentifier: true.How to reproduce
The
tests/input/examples/fair_mappings_metadata/data/sample-linkmlmap-spec.yamlexample hasclass_derivationsandenum_derivationscommented out because of this bug — uncommenting them and running the linkml-map-to-fair transformation triggers the issue.Expected behavior
dynamic_object.pyshould handle bothkey-based andidentifier-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.