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

Trajectory Endpoint #1845

Draft
wants to merge 123 commits into
base: 0.25.x
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
eecc878
Addded meta field to entry model
JPBergsma Jul 6, 2023
6ed4a5d
Added validator for meta field.
JPBergsma Jul 19, 2023
5e0ace4
Merge branch 'master' into JPBergsma/add_metadata
JPBergsma Jul 19, 2023
ef1ca3c
Update pyyaml version in requirements.txt
JPBergsma Jul 20, 2023
89ac0fe
Update requirements.txt
JPBergsma Jul 20, 2023
f229be1
Update requirements.txt
JPBergsma Jul 20, 2023
fcc501c
Merge branch 'master' into JPBergsma/add_metadata
JPBergsma Jul 20, 2023
a195fb5
Remove test structures to get an idea of what triggers yaml import er…
JPBergsma Jul 20, 2023
07d77fe
Readding meta field to test_good_structures.
JPBergsma Jul 20, 2023
2848dd3
Readding meta field to test_structures.json.
JPBergsma Jul 20, 2023
80c4dc4
Added handling None for property_metadata to validator + small correc…
JPBergsma Jul 21, 2023
d55abec
Added test for validator per entry meta field.
JPBergsma Jul 21, 2023
ff545bb
Added test for presence metadata field in test_structures.py.
JPBergsma Jul 21, 2023
e0d6ff3
Remove metadata fields when the fields that they belong to are not re…
JPBergsma Jul 21, 2023
191fbba
add extra test for bad prefix.
JPBergsma Jul 21, 2023
8764e34
Merge branch 'master' into JPBergsma/add_metadata
JPBergsma Jul 25, 2023
6251e48
Test if dependancy conflict causes error.
JPBergsma Jul 25, 2023
c6be5ca
Merge branch 'master' into JPBergsma/add_metadata
JPBergsma Jul 25, 2023
bf9692a
Revert "Test if dependancy conflict causes error."
JPBergsma Jul 25, 2023
0864911
Revert "Revert "Test if dependancy conflict causes error.""
JPBergsma Jul 25, 2023
03f91f1
Merge branch 'JPBergsma/add_metadata' of https://github.com/JPBergsma…
JPBergsma Jul 25, 2023
eb953ad
correct version httpx.
JPBergsma Jul 26, 2023
2879fac
commenting out validator to see if this resolves issue github.
JPBergsma Jul 26, 2023
18e2ef1
Slowly reassembling validator to see if this resolves issue github.
JPBergsma Jul 26, 2023
7fc1906
Slowly reassembling validator to see if this resolves issue github.
JPBergsma Jul 26, 2023
b622414
Slowly reassembling validator to see if this resolves issue github.
JPBergsma Jul 26, 2023
95bf11b
Slowly reassembling validator to see if this resolves issue github.
JPBergsma Jul 26, 2023
7c02f38
Slowly reassembling validator to see if this resolves issue github.
JPBergsma Jul 26, 2023
2b52248
Slowly reassembling validator to see if this resolves issue github.
JPBergsma Jul 26, 2023
20e228d
Slowly reassembling validator to see if this resolves issue github.
JPBergsma Jul 26, 2023
7be2a0f
Slowly reassembling validator to see if this resolves issue github.
JPBergsma Jul 26, 2023
bffb5d1
Slowly reassembling validator to see if this resolves issue github.
JPBergsma Jul 26, 2023
1f0bbb9
Slowly reassembling validator to see if this resolves issue github.
JPBergsma Jul 26, 2023
7c0a8be
Slowly reassembling validator to see if this resolves issue github.
JPBergsma Jul 26, 2023
456f34f
Slowly reassembling validator to see if this resolves issue github.
JPBergsma Jul 26, 2023
9603277
Slowly reassembling validator to see if this resolves issue Github.
JPBergsma Jul 26, 2023
c621412
Slowly reassembling validator to see if this resolves issue Github.
JPBergsma Jul 26, 2023
ed44736
Slowly reassembling validator to see if this resolves issue Github..
JPBergsma Jul 26, 2023
4f28acc
Slowly reassembling validator to see if this resolves issue Github..
JPBergsma Jul 26, 2023
63af8dc
Placed yaml import in try except block.
JPBergsma Jul 26, 2023
5b41b71
Added more cases to test data and added bugfix for removing associate…
JPBergsma Aug 2, 2023
f694d15
Removed seemingly unneccesary mypy ignore exception statement.
JPBergsma Aug 2, 2023
5bac762
Merge branch 'master' into JPBergsma/add_metadata
JPBergsma Aug 2, 2023
40ff136
remove change in version pyyaml in requirements.txt.
JPBergsma Aug 2, 2023
8f7ca29
correct spelling mistake
JPBergsma Aug 2, 2023
6a20ef9
moved starts_with_supported_prefix and check_starts_with_supported_pr…
JPBergsma Aug 2, 2023
e95c9b4
Expanded docstring check_starts_with_supported_prefix
JPBergsma Aug 3, 2023
bcd7971
Expanded docstring check_starts_with_supported_prefix
JPBergsma Aug 3, 2023
748bacc
Added return type for starts_with_supported_prefix and check_starts_…
JPBergsma Aug 3, 2023
8430ddd
Added return type for starts_with_supported_prefix and check_starts_…
JPBergsma Aug 3, 2023
ac26f09
Adjusted validators baseed on suggestion Matthew.
JPBergsma Aug 3, 2023
e1c4901
small corrections validators.
JPBergsma Aug 3, 2023
7dab3a7
small correction in removing unrequested metadata.
JPBergsma Aug 3, 2023
da8a026
Added spaces before values 'exmpl_originates_from _project'.
JPBergsma Aug 3, 2023
92da84e
First draft version of model of jsonlines response.
JPBergsma Aug 4, 2023
f39c734
renamed files to partialdata.
JPBergsma Aug 8, 2023
8c889c6
First draft version of model of jsonlines response.
JPBergsma Aug 10, 2023
75669c8
added metadata fields for partial data protocal to entry models.
JPBergsma Aug 14, 2023
9657ff3
Added descriptions for fields partial data links.
JPBergsma Aug 14, 2023
281551e
Storing intermediate code on the way to implement partial data to get…
JPBergsma Aug 22, 2023
115ca61
Merge with master.
JPBergsma Aug 22, 2023
e8bbfe1
First somewhat working version of partial_data endpoint.
JPBergsma Sep 4, 2023
9c0985a
Merge branch 'master' into JPBergsma/Partial_data
JPBergsma Sep 5, 2023
f67555e
Move _check_aliases to it's own subclass so it can be used for both g…
JPBergsma Sep 5, 2023
b7907c9
Merge branch 'master' into optimade_python_tools_trajectory_0.1
JPBergsma Sep 5, 2023
07defa5
Extra todo's and comments after trying to add validator for format fi…
JPBergsma Sep 5, 2023
64b97bd
Fixed validator for format field.
JPBergsma Sep 5, 2023
c908d3f
first minimal version partial data.
JPBergsma Sep 12, 2023
88e4eb9
merge with master
JPBergsma Sep 13, 2023
944d374
merge with master
JPBergsma Sep 13, 2023
04e9ff6
update openapijson
JPBergsma Sep 13, 2023
5368934
update openapijson
JPBergsma Sep 13, 2023
bccbe73
update openapijson
JPBergsma Sep 13, 2023
7a75366
changed 'regex' to 'pattern'.
JPBergsma Sep 14, 2023
c87d436
Moved generate_links_partial_data function to routers/utils.py and ma…
JPBergsma Sep 14, 2023
60b102e
Added relevant code from original trajectory proposal.
JPBergsma Sep 15, 2023
6822fef
Made some adjustment to be more compatible with export to traj mongo …
JPBergsma Sep 23, 2023
9799842
Expanded model partial_data.
JPBergsma Sep 24, 2023
6746969
Expanded model partial_data.
JPBergsma Sep 24, 2023
8a98896
Added some validators for the trajectory specific fields.
JPBergsma Sep 24, 2023
7f7c383
Clarified why field is named describedby and not described_by.
JPBergsma Sep 24, 2023
d65ac4c
Added instructions for setting up a trajectory database.
JPBergsma Sep 26, 2023
2b552c5
Various bug fixes
JPBergsma Sep 27, 2023
d700b92
Fix whitespace for code snippets to allow copying through GH UI
ml-evs Sep 28, 2023
4a3f426
Add note about MongoDB install
ml-evs Sep 28, 2023
fdc7490
Suggest Python 3.10 instead of 11
ml-evs Sep 28, 2023
95bda33
Merge pull request #6 from ml-evs/patch-1
JPBergsma Sep 29, 2023
221e163
Merge branch 'JPBergsma/trajectory_endpoint' into JPBergsma/trajector…
JPBergsma Sep 29, 2023
e4606cc
Merge pull request #8 from ml-evs/JPBergsma/trajectory_endpoint
JPBergsma Sep 29, 2023
d080fbf
Merge pull request #7 from ml-evs/patch-2
JPBergsma Sep 29, 2023
3996049
updated optimade_config.json for trajectories.
JPBergsma Sep 29, 2023
63651f1
use lstrip instead of manually removing / one at a time.
JPBergsma Sep 30, 2023
389e679
Update optimade/models/entries.py
JPBergsma Oct 2, 2023
4ec23c9
Update description per entry meta datafield.
JPBergsma Oct 2, 2023
05b2906
Merge branch 'master' into JPBergsma/add_metadata
JPBergsma Oct 3, 2023
1cd73e3
Merge branch 'master' into JPBergsma/add_metadata
JPBergsma Oct 3, 2023
d3b8b22
update openapijson.
JPBergsma Oct 3, 2023
8ae4081
trying to merge with remote.
JPBergsma Oct 3, 2023
68f14d3
try to see if moving yaml is still necessary.
JPBergsma Oct 3, 2023
1d46e1b
Revert "try to see if moving yaml is still necessary."
JPBergsma Oct 3, 2023
774be72
Added supported_prefixes field to config.py
JPBergsma Oct 11, 2023
fac9b9b
Merge branch 'master' of https://github.com/JPBergsma/optimade-python…
JPBergsma Oct 11, 2023
7d790b2
Merge branch 'master' into JPBergsma/add_metadata
JPBergsma Oct 11, 2023
6c85877
Merged latest version metadata branch with partial data branch.
JPBergsma Oct 11, 2023
11bdbe7
Merged JPBergsma/Partial_data in trajectory branch.
JPBergsma Oct 11, 2023
a0e6f8b
changing Priocfile to see if this fixes problem with uvicorn complain…
JPBergsma Oct 12, 2023
a4f1242
Add numpy to requirements.
JPBergsma Oct 12, 2023
3ccad18
Made a correction in the testdata for trajectories.
JPBergsma Oct 12, 2023
13fcdc0
Add numpy to requirements.
JPBergsma Oct 12, 2023
3be7d54
Added jsonlines dependancy.
JPBergsma Oct 13, 2023
075ef06
Made changes to make mypy happy.
JPBergsma Oct 13, 2023
ca2a0f2
Trying to determine why jsonlines is not impoeted properly on github.
JPBergsma Oct 13, 2023
cf45488
Update requirements-client.txt (#1813)
JPBergsma Oct 13, 2023
2466fb1
Merge branch 'master' of https://github.com/JPBergsma/optimade-python…
JPBergsma Oct 13, 2023
ff25f14
Merge branch 'master' into JPBergsma/add_metadata
JPBergsma Oct 13, 2023
1dbd07a
Merge branch 'JPBergsma/add_metadata' into JPBergsma/Partial_data
JPBergsma Oct 13, 2023
8510ffa
Modernize all Python 3.8 annotations (#1815)
ml-evs Oct 15, 2023
44d8789
Merging with master.
JPBergsma Oct 17, 2023
563948e
merging with metadata branch
JPBergsma Oct 17, 2023
7b89608
merging with partial data branch
JPBergsma Oct 17, 2023
ca87650
Corrected wrong name validator in trajectory model.
JPBergsma Oct 18, 2023
e1ad997
removed importing List from typing.
JPBergsma Oct 19, 2023
8f03cca
Merge branch '0.25.x' into JPBergsma/trajectory_endpoint
ml-evs Nov 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web: uvicorn optimade.server.main:app --host 0.0.0.0 --port $PORT
web: --host 0.0.0.0 --port $PORT
3 changes: 3 additions & 0 deletions docs/api_reference/adapters/jsonl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# jsonl

::: optimade.adapters.jsonl
5 changes: 5 additions & 0 deletions docs/api_reference/models/partial_data.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# partial_data

::: optimade.models.partial_data
options:
show_if_no_docstring: true
5 changes: 5 additions & 0 deletions docs/api_reference/models/trajectories.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# trajectories

::: optimade.models.trajectories
options:
show_if_no_docstring: true
3 changes: 3 additions & 0 deletions docs/api_reference/server/mappers/partial_data.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# partial_data

::: optimade.server.mappers.partial_data
3 changes: 3 additions & 0 deletions docs/api_reference/server/mappers/trajectories.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# trajectories

::: optimade.server.mappers.trajectories
3 changes: 3 additions & 0 deletions docs/api_reference/server/routers/partial_data.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# partial_data

::: optimade.server.routers.partial_data
3 changes: 3 additions & 0 deletions docs/api_reference/server/routers/trajectories.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# trajectories

::: optimade.server.routers.trajectories
302 changes: 302 additions & 0 deletions docs/getting_started/tutorial_trajectories.md

Large diffs are not rendered by default.

104 changes: 100 additions & 4 deletions openapi/index_openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,29 @@
"title": "BaseRelationshipResource",
"description": "Minimum requirements to represent a relationship resource"
},
"EntryMetadata": {
"properties": {
"property_metadata": {
"type": "object",
"title": "Property Metadata",
"description": "An object containing per-entry and per-property metadata. The keys are the names of the fields in attributes for which metadata is available. The values belonging to these keys are dictionaries containing the relevant metadata fields. See also [Metadata properties](https://github.com/Materials-Consortia/OPTIMADE/blob/develop/optimade.rst#metadata-properties)"
},
"partial_data_links": {
"additionalProperties": {
"items": {
"$ref": "#/components/schemas/PartialDataLink"
},
"type": "array"
},
"type": "object",
"title": "Partial Data Links",
"description": "A dictionary, where the keys are the names of the properties in the attributes field for which the value is too large to be shared by default.\n For each property one or more links are provided from which the value of the attribute can be retrieved."
}
},
"type": "object",
"title": "EntryMetadata",
"description": "Contains the metadata for the attributes of an entry"
},
"EntryRelationships": {
"properties": {
"references": {
Expand All @@ -486,6 +509,15 @@
],
"title": "Structures",
"description": "Object containing links to relationships with entries of the `structures` type."
},
"trajectories": {
"allOf": [
{
"$ref": "#/components/schemas/TrajectoryRelationship"
}
],
"title": "Trajectories",
"description": "Object containing links to relationships with entries of the `trajectories` type."
}
},
"type": "object",
Expand Down Expand Up @@ -520,11 +552,11 @@
"meta": {
"allOf": [
{
"$ref": "#/components/schemas/Meta"
"$ref": "#/components/schemas/EntryMetadata"
}
],
"title": "Meta",
"description": "a meta object containing non-standard meta-information about a resource that can not be represented as an attribute or relationship."
"description": "A [JSON API meta object](https://jsonapi.org/format/1.1/#document-meta) that is used to communicate metadata."
},
"attributes": {
"allOf": [
Expand Down Expand Up @@ -1129,11 +1161,11 @@
"meta": {
"allOf": [
{
"$ref": "#/components/schemas/Meta"
"$ref": "#/components/schemas/EntryMetadata"
}
],
"title": "Meta",
"description": "a meta object containing non-standard meta-information about a resource that can not be represented as an attribute or relationship."
"description": "A [JSON API meta object](https://jsonapi.org/format/1.1/#document-meta) that is used to communicate metadata."
},
"attributes": {
"allOf": [
Expand Down Expand Up @@ -1393,6 +1425,29 @@
"title": "OptimadeError",
"description": "detail MUST be present"
},
"PartialDataLink": {
"properties": {
"link": {
"type": "string",
"maxLength": 65536,
"minLength": 1,
"format": "uri",
"title": "Link",
"description": "String. A JSON API link that points to a location from which the omitted data can be fetched. There is no requirement on the syntax or format for the link URL."
},
"format": {
"type": "string",
"title": "Format",
"description": "String. The name of the format provided via this link. For one of the objects this format field SHOULD have the value \"jsonlines\", which refers to the format in OPTIMADE JSON lines partial data format."
}
},
"type": "object",
"required": [
"link",
"format"
],
"title": "PartialDataLink"
},
"Provider": {
"properties": {
"name": {
Expand Down Expand Up @@ -1880,6 +1935,47 @@
"title": "ToplevelLinks",
"description": "A set of Links objects, possibly including pagination"
},
"TrajectoryRelationship": {
"properties": {
"links": {
"allOf": [
{
"$ref": "#/components/schemas/RelationshipLinks"
}
],
"title": "Links",
"description": "a links object containing at least one of the following: self, related"
},
"data": {
"anyOf": [
{
"$ref": "#/components/schemas/BaseRelationshipResource"
},
{
"items": {
"$ref": "#/components/schemas/BaseRelationshipResource"
},
"type": "array"
}
],
"uniqueItems": true,
"title": "Data",
"description": "Resource linkage"
},
"meta": {
"allOf": [
{
"$ref": "#/components/schemas/Meta"
}
],
"title": "Meta",
"description": "a meta object that contains non-standard meta-information about the relationship."
}
},
"type": "object",
"title": "TrajectoryRelationship",
"description": "Similar to normal JSON API relationship, but with addition of OPTIONAL meta field for a resource."
},
"Warnings": {
"properties": {
"id": {
Expand Down
Loading
Loading