Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 ranged properties #452
Add ranged properties #452
Changes from 27 commits
c18cf0c
7dc50f2
6afcf9c
1a55c2a
b597a67
37db878
a832751
16aba07
b1d69a8
edbfc25
14de45d
906db81
1feb4a9
a96dffe
15f599c
73905dc
c6834f3
b0cc94c
0cee1e6
d7c8a9c
d1e8d74
139c70e
916d6f2
ee3651e
1f794b6
169a1f4
f513596
65b8ad1
94db38c
033ea11
3762d30
8332567
a87b301
7e9b4f4
4b298c5
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Should "contains_null" not be a more generic metadata property that could also apply to other non-ranged fields ?
Ps. This would also allow querying on whether a property contains_null, now that I have placed in the description that support for queries on the fields under "range" is optional.
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.
We've had this trouble elsewhere in the specification and keep running into it. The reference to a JSON API links object in a section that is meant to be data-format agnostic doesn't really work. If someone is trying to represent the output data in HDF5 (apparently someone already implemented that...), what does a "JSON API links object" mean inside HDF5?
So, the easy solution (suggested below) is to skip the extra degrees of freedom provided by JSON API links objects when we have links appearing in data-agnostic output, and just say that it is a string with a URL. However, given how often we are running into this issue, I'm starting to wonder if we rather should extend the base OPTIMADE data types with URL, so that the JSON API output format section generally can say that when the OPTIMADE specification says that something is "a link", you are meant to put a JSON API links object there.
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 think we define URLs in many places as a
JSON API links object
, like the home page field for providers in the meta field, for example. So it seems logical to do it here as well. I will change the description a bit, so it is more like the others.I however do think that the values we assign are often not JSON API links objects. But instead, values that would qualify as members for JSON API links objects. The value of such a member can also be a string, so it should not be any more problematic to store as the dictionaries we currently have.
Should I make a separate PR to change
JSON API links objects
to something likea valid member for a JSON API links object
elsewhere in the specification ?Ps. I have written code which outputs the response in the hdf5 format. You can test it with https://optimade-trajectory-demo.matcloud.xyz/v1/structures?response_format=hdf5. Unfortunately, h5py does not support storing a list of dicts, so I have to convert this to a dict of dicts.
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.