Open kappe-c opened 10 months ago
@kappe-c a workaround, for the moment, for us, looks like
enums: EnumBenchlingCellLineExtension: description: >- Cell Lines for benchling extension permissible_values: foo:
EnumBenchlingCellLine: inherits: EnumBenchlingCellLineExtension description: >- Cell Lines for benchling dynamic pv_formula: LABEL reachable_from: source_ontology: obo:clo source_nodes:
operating vskit expand on EnumBenchlingCellLine will yield permissible values containing the extension and the dynamic. so, essentially, the enumeration that is dynamic must inherit the extension. Inheriting something that is dynamic does not seem to work.
Describe the bug
Several tools (all but linkml-validate?) do not implement enum inheritance. If I made no mistake.
E.g., when running
linkml-sqldb dump -s schema.yaml -D schema.db -C MyClass data.yaml
I get the error
ValueError: Unknown MyEnumB enumeration code: B
schema:
Data:
I know it is said that "tooling support for dynamic enums is maturing" but also that "default behavior will be too permissive" 1; while here it is not permissive at all.
Reluctantly (because installing OAK seemed overkill) I also tried the given suggestion
This has no effect (except for changing the indention a little)!
I also found that, e.g, gen-doc does not know what to do with inherits and includes.
To reproduce
Steps to reproduce the behavior:
Expected behavior
There are no complaints about A or B as a value for range MyEnumB.
To me this seems like the simplest case of a "dynamic enum". Just like the set of slots is extended from a parent to a child class, I would expect the set of permissible values to be extended in the enum example given above (actually the first thing I tried was using is_a). In particular I think it should not be a problem for database tools to materialize/expand such enums.
About your computer (if applicable, please complete the following information):