-
Notifications
You must be signed in to change notification settings - Fork 39
Collections endpoint #386
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
base: develop
Are you sure you want to change the base?
Collections endpoint #386
Changes from 4 commits
120cf12
4adae80
d9312fe
abccba0
8308a50
9172374
38c46de
c7a00dd
e817790
614bc76
5e3dc8a
ad271ed
a60c4a7
8c2c7c8
f449350
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -149,7 +149,7 @@ The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SH | |
| For example, a :entry:`structures` entry is comprised by data that pertain to a single structure. | ||
|
|
||
| **Entry type** | ||
| Entries are categorized into types, e.g., :entry:`structures`, :entry:`calculations`, :entry:`references`. | ||
| Entries are categorized into types, e.g., :entry:`structures`, :entry:`calculations`, :entry:`references`, :entry:`collections`. | ||
| Entry types MUST be named according to the rules for identifiers. | ||
|
|
||
| **Entry property** | ||
|
|
@@ -195,6 +195,9 @@ The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SH | |
| The key used in response formats that return data in associative-array-type data structures. | ||
| This is particularly relevant for the default JSON-based response format. | ||
| In this case, **field** refers to the name part of the name-value pairs of JSON objects. | ||
|
|
||
| **Collection** | ||
| A Collection defines a relationship between a group of Entry resources. A Collection can be used to store metadata that applies to all of the entries in the group, and to aggregate metadata from each entry in the group. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure I would define collections here, as the list is primarily external defintions of terminology that we are going to use in OPTIMADE, not terminology we are really defining ourselves (e.g. structure is not in this list) |
||
|
|
||
| Data types | ||
| ---------- | ||
|
|
@@ -323,7 +326,7 @@ Index Meta-Database | |
| A database provider MAY publish a special Index Meta-Database base URL. The main purpose of this base URL is to allow for automatic discoverability of all databases of the provider. Thus, it acts as a meta-database for the database provider's implementation(s). | ||
|
|
||
| The index meta-database MUST only provide the :endpoint:`info` and :endpoint:`links` endpoints, see sections `Info Endpoints`_ and `Links Endpoint`_. | ||
| It MUST NOT expose any entry listing endpoints (e.g., :endpoint:`structures`). | ||
| It MUST NOT expose any entry listing endpoints (e.g., :endpoint:`structures` and :endpoint:`collections`). | ||
|
merkys marked this conversation as resolved.
Outdated
|
||
|
|
||
| These endpoints do not need to be queryable, i.e., they MAY be provided as static JSON files. | ||
| However, they MUST return the correct and updated information on all currently provided implementations. | ||
|
|
@@ -1075,6 +1078,7 @@ Example: | |
| }, | ||
| "available_endpoints": [ | ||
| "structures", | ||
| "collections", | ||
| "calculations", | ||
| "info", | ||
| "links" | ||
|
|
@@ -2317,6 +2321,33 @@ structure\_features | |
| - **Examples**: | ||
|
|
||
| - A structure having implicit atoms and using assemblies: :val:`["assemblies", "implicit_atoms"]` | ||
|
|
||
| Collections Entries | ||
| ------------------- | ||
| A Collection is used to define groups of Entry resources. It can be used to store metadata that applies to all of the entries in the group, or metadata that is generated by aggregating fields from each of the entries in the group. The group of entries is defined using :field:`relationships` as described in the `Relationships`_ section. | ||
|
|
||
| An example use case would be to define a relationship between a collection of Structure entries that are all conceptually related (e.g., "A collection of FCC Al structures containing a single vacancy defect"). | ||
|
|
||
| :entry:`collections` entries have the properties described in the section `Properties Used by Multiple Entry Types`_ as well as the following properties: `additional_metadata`_ and `aggregated_fields`_. | ||
|
|
||
| additional_metadata | ||
| ~~~~~~~~~~~~~~~~~~~ | ||
| - **Description**: Additional metadata that applies to all of the entries in `relationships`. | ||
| - **Type**: a dictionary of string-string pairs | ||
|
jvita marked this conversation as resolved.
Outdated
|
||
| - **Requirements/Conventions**: | ||
| - **Support**: OPTIONAL support in implementations, i.e., MAY be :val:`null`. | ||
| - **Query**: support for queries on this property is OPTIONAL. If supported, only a subset of the filter features MAY be supported. | ||
| - The keys should be short strings describing the type of metadata being supplied. | ||
| - The values can be any string, which may be human-readable. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would prefer to go down the route of some defined (optional) fields for e.g. |
||
|
|
||
| aggregated_fields | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I need an example to see what this field is used for, this just aggregates field/property names but not values? Does every entry have to have a value of each field listed here?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had only said "fields" (or "properties" seems fine too) instead of also including values because:
A basic example of this, which we've been using for the OpenKIM/ColabFit project, is to have a "StructuresCollection" that aggregates all of the
Though it's a bit restrictive, I think that I'd say yes, every entry should have a value for each of the aggregated fields. I think that a collection should be assumed to be homogenous, but perhaps that could use some discussion.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you should update the collection every time one of the entries gets updated. Perhaps you could make a dictionary for each Optimade property. When making the properties for these collections I think it would be good to think about how you would search for collections. The number of entries in your collection would probably also be a good property to include. There is also the info endpoint where you can specify which properties are shared for each endpoint
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have difficulty seeing the utility of aggregated_fields being an OPTIMADE standardized property. There is of course no problem for OpenKIM serving, e.g., an |
||
| ~~~~~~~~~~~~~~~~~~~~~~ | ||
| - **Description**: Names of fields that were generated by aggregating over the corresponding fields in each of the entries specified in `relationships`. | ||
| - **Type**: a list of strings | ||
| - **Requirements/Conventions**: | ||
| - **Support**: OPTIONAL support in implementations, i.e., MAY be :val:`null`. | ||
| - **Query**: support for queries on this property is OPTIONAL. If supported, only a subset of the filter features MAY be supported. | ||
| - Strings provided in this list should correspond to other queryable fields within the `collections` entry. | ||
|
|
||
| Calculations Entries | ||
| -------------------- | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.