linkml / linkml-arrays

Support for loading and dumping N-dimensional arrays in LinkML.
https://linkml.github.io/linkml-arrays
BSD 3-Clause "New" or "Revised" License
5 stars 1 forks source link

implicit axis order? #8

Open sneakers-the-rat opened 8 months ago

sneakers-the-rat commented 8 months ago

Small question - I like the ability to explicitly declare axis order with axis_index!!! is it also the case that the order of the axis declaration is meaningful in the absence of an explicit axis_index?

rly commented 8 months ago

I'm not sure. I would assume that the list of slots and dictionary of attributes in a class definition are ordered and we can take advantage of that, but I would want @cmungall or someone else from linkml to confirm...

cmungall commented 8 months ago

Ordering is preserved, but it's good to be explicit. The ordering could be lost for example in serializing a schema to OWL

sneakers-the-rat commented 7 months ago

That's fair. Maybe outside the scope of this issue, but is there some kind of schema for different generators? I am only really familiar with the pydantic generator & i think a decent amount of schemaview, but if not it might be nice to start doing that so that we can keep track of which target formats need to have array order explicitly encoded vs those that encode it naturally so we could do ergonomic things like allow axis to be implicit in the source definition, but then know to automatically generate explicit indices when generating OWL. low priority tho. feel free to close this