You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a schema has default_range: string and slots without explicit range:, the linkml generate linkml output preserves this implicit inheritance - slots still lack explicit ranges.
Example input:
default_range: stringslots:
my_slot:
description: A slot without explicit range
Output from linkml generate linkml:
default_range: stringslots:
my_slot:
description: A slot without explicit range# still no explicit range
Problem
This causes issues for downstream consumers who transform the schema. For example, a yq transformation like:
# Convert all string ranges to TextValue(.. | select(. == "string")) |= "TextValue"
Only affects slots with explicit range: string, not slots that inherit from default_range.
Real-world example: GSC MIxS v6.2.2 has 177 slots (out of 1059) without explicit range that rely on default_range: string. See GenomicsStandardsConsortium/mixs#1091
Proposal
Add an option to linkml generate linkml (and possibly other generators) to materialize default_range into explicit range values on slots that lack them:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Context
When a schema has
default_range: stringand slots without explicitrange:, thelinkml generate linkmloutput preserves this implicit inheritance - slots still lack explicit ranges.Example input:
Output from
linkml generate linkml:Problem
This causes issues for downstream consumers who transform the schema. For example, a yq transformation like:
Only affects slots with explicit
range: string, not slots that inherit fromdefault_range.Real-world example: GSC MIxS v6.2.2 has 177 slots (out of 1059) without explicit range that rely on
default_range: string. See GenomicsStandardsConsortium/mixs#1091Proposal
Add an option to
linkml generate linkml(and possibly other generators) to materializedefault_rangeinto explicitrangevalues on slots that lack them:This would be similar to how
--materialize-patternsworks for structured patterns.Related Issues
Questions
Beta Was this translation helpful? Give feedback.
All reactions