Closed sneakers-the-rat closed 3 months ago
I think this needs to be left in for safety just now, to avoid non-monotonicity. The best fix here is in gen-python
which isn't yet on a par with gen-pydantic for generating unions
Not sure what you mean here, is it valid syntax to have
range: integer
any_of:
- range: Anything
I would have figured that the syntax would be
any_of:
- range: integer
- range: Anything
in any case i'm not sure why dict
is showing up there. I could take a look the dataclass generator, so if that's the correct syntax, then i could rename this issue to something like "dataclass generator incorrectly handling range and any_of: range"
Should be fixed in pythongen: https://github.com/linkml/linkml/issues/1813
Resolved in @linkml/ndarray-wg discussion:
range: Anything
is overly general on purpose but the any_of
ranges will restrict the range of maximum_number_dimensions
. range: Anything
is useful for monotonicity.
The python dataclass generator should be fixed.
Noticed that
ArrayExpression.maximum_number_dimensions
had the wrong type: https://github.com/linkml/linkml-runtime/blob/c6943e41b67c9eb24f056c6ebaea2c78a0bdf4af/linkml_runtime/linkml_model/meta.py#L2730should be
looks like a
range: Anything
was left in, I'm not sure if that resolves the range generation, but it also seems like something that should be validated in the metamodel schema:range
shouldn't be specified by itself and in anany_of
expression