Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indicate which version of a schema was used to create metadata instances #9

Open
ehennestad opened this issue Oct 6, 2023 · 4 comments

Comments

@ehennestad
Copy link

When saving a metadata instance it might be good to also specify which version of schema was used to create the instance.

For example: I create an instance using the Person schema from the latest version of openMINDS and save it to a JSON-LD file. If I (or someone else) loads it at a later time,, it might be good to know which version was used to create it in order to re-create the metadata instance in its original form?

@ehennestad
Copy link
Author

Two suggestions (when saving instances to jsonld):

  1. add the version to the @type:
"@type": "https://openminds.ebrains.eu/core/v3/Person"
  1. add a "custom" @Version property
"@type": "https://openminds.ebrains.eu/core/Person",
"@version": "v3"

@lzehl
Copy link
Member

lzehl commented Oct 14, 2024

Not sure how to solve this correctly. Instances can be valid for types from multiple versions. Potentially the second one could be adjusted by providing a list? Still not sure. @openMetadataInitiative/openminds-developers your thoughts?

@olinux
Copy link
Member

olinux commented Oct 21, 2024

My 2 cents about this:

  • Adding it to the type is imho not the right place because the type doesn't specify the structure of the instance but "just" its type. This means that a person remains a person even if you change the representation of it.

  • I would argue that it is irrelevant with which version an instance has been created - the only important information is with which versions it is compatible (remember that schemes can stay the same across versions or might be backwards compatible). You could either add a property called "compatibleWith", ask to dynamically cross-validate against the corresponding JSON schemes or by storing the compatibility information externally. I would recommend not to add this information to the instance because it could cause a change of the instance information solely because a non-related event (the creation of a new version) has taken place. (Which could create confusion e.g. if you have scripts checking if the payload has changed). Keeping track of compatibility externally (e.g. via a central lookup map/index or a side-car file) on the other hand would make sense.

@lzehl
Copy link
Member

lzehl commented Oct 22, 2024

@olinux that means we would rather provide a convenience function (e.g. in the Python, Matlab packages) that could tell for an instance which openMINDS versions it can be used for?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants