-
Notifications
You must be signed in to change notification settings - Fork 37
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
Add type
key to properties (simple)
#282
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks useful to me - only doubt I have now is about the units being just a string, especially when you e.g. have composite units: is speed "m/s" or "m s^-1" something else? I'll move this to a different issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy with this as is, but do you think there should be a discussion of the type
field in the section about provider-specific types? i.e. "Providers MUST/SHOULD provide the type of custom fields at the info/entry endpoint", or some such? Otherwise I don't see what value is gained from this PR alone for clients trying to display custom fields (as probably no-one will implement this field).
That would be great, but considering so many of the properties are already not a MUST, I think it's hard to justify this point. However, we could always add a RECOMMENDED? |
When we later upgrade this field to be a more complete type description; will we have to consider this a backwards-breaking change (i.e., new major version number) or a minor version? How about we write in this text to that if the value isn't a simple OPTIMADE Datatype, the client should ignore the field? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, I'll make my suggestion a concrete edit.
Add new :type: rst code for OPTIMADE data types. Require database-provider-specific properties to be listed in the introspective entry listing info endpoints.
In the latest commit I've added the following:
|
This addresses #269, but does not close it. That will be up to #270.
The
type
key will hold the value of the outermost type of the property it describes, i.e., forspecies
, which is described as a "list of dictionaries", thetype
will be"list"
.The value of
type
MUST be one of the OPTIMADE data types described here in the specification.