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

Introduce grammar v0.10.1 #112

Merged
merged 15 commits into from
Jan 14, 2020
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci/optimade-version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"schemaVersion": 1,
"label": "OPTiMaDe",
"message": "v0.10.0",
"message": "v0.10.1",
"color": "yellowgreen"
}
14 changes: 7 additions & 7 deletions openapi/index_openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"info": {
"title": "OPTiMaDe API - Index meta-database",
"description": "The [Open Databases Integration for Materials Design (OPTiMaDe) consortium](http://http://www.optimade.org/) aims to make materials databases interoperational by developing a common REST API.\nThis is the \"special\" index meta-database.",
"version": "0.10.0"
"version": "0.10.1"
},
"paths": {
"/index/optimade/info": {
Expand Down Expand Up @@ -195,20 +195,20 @@
}
}
},
"/index/optimade/v0.10.0/info": {
"/index/optimade/v0.10.1/info": {
"get": {
"tags": [
"Info"
],
"summary": "Get Info",
"operationId": "get_info_index_optimade_v0_10_0_info_get",
"operationId": "get_info_index_optimade_v0_10_1_info_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"title": "Response Get Info Index Optimade V0 10 0 Info Get",
"title": "Response Get Info Index Optimade V0 10 1 Info Get",
"anyOf": [
{
"$ref": "#/components/schemas/IndexInfoResponse"
Expand All @@ -224,13 +224,13 @@
}
}
},
"/index/optimade/v0.10.0/links": {
"/index/optimade/v0.10.1/links": {
"get": {
"tags": [
"Links"
],
"summary": "Get Links",
"operationId": "get_links_index_optimade_v0_10_0_links_get",
"operationId": "get_links_index_optimade_v0_10_1_links_get",
"parameters": [
{
"description": "See [the full and latest OPTiMaDe spec](https://github.com/Materials-Consortia/OPTiMaDe/blob/develop/optimade.rst) for filter query syntax.\n\nExample: `chemical_formula = \"Al\" OR (prototype_formula = \"AB\" AND elements HAS Si, Al, O)`.\n",
Expand Down Expand Up @@ -358,7 +358,7 @@
"content": {
"application/json": {
"schema": {
"title": "Response Get Links Index Optimade V0 10 0 Links Get",
"title": "Response Get Links Index Optimade V0 10 1 Links Get",
"anyOf": [
{
"$ref": "#/components/schemas/LinksResponse"
Expand Down
44 changes: 22 additions & 22 deletions openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"info": {
"title": "OPTiMaDe API",
"description": "The [Open Databases Integration for Materials Design (OPTiMaDe) consortium](http://http://www.optimade.org/) aims to make materials databases interoperational by developing a common REST API.",
"version": "0.10.0"
"version": "0.10.1"
},
"paths": {
"/optimade/info": {
Expand Down Expand Up @@ -727,20 +727,20 @@
}
}
},
"/optimade/v0.10.0/info": {
"/optimade/v0.10.1/info": {
"get": {
"tags": [
"Info"
],
"summary": "Get Info",
"operationId": "get_info_optimade_v0_10_0_info_get",
"operationId": "get_info_optimade_v0_10_1_info_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"title": "Response Get Info Optimade V0 10 0 Info Get",
"title": "Response Get Info Optimade V0 10 1 Info Get",
"anyOf": [
{
"$ref": "#/components/schemas/InfoResponse"
Expand All @@ -756,13 +756,13 @@
}
}
},
"/optimade/v0.10.0/info/{entry}": {
"/optimade/v0.10.1/info/{entry}": {
"get": {
"tags": [
"Info"
],
"summary": "Get Entry Info",
"operationId": "get_entry_info_optimade_v0_10_0_info__entry__get",
"operationId": "get_entry_info_optimade_v0_10_1_info__entry__get",
"parameters": [
{
"required": true,
Expand All @@ -780,7 +780,7 @@
"content": {
"application/json": {
"schema": {
"title": "Response Get Entry Info Optimade V0 10 0 Info Entry Get",
"title": "Response Get Entry Info Optimade V0 10 1 Info Entry Get",
"anyOf": [
{
"$ref": "#/components/schemas/EntryInfoResponse"
Expand All @@ -806,13 +806,13 @@
}
}
},
"/optimade/v0.10.0/links": {
"/optimade/v0.10.1/links": {
"get": {
"tags": [
"Links"
],
"summary": "Get Links",
"operationId": "get_links_optimade_v0_10_0_links_get",
"operationId": "get_links_optimade_v0_10_1_links_get",
"parameters": [
{
"description": "See [the full and latest OPTiMaDe spec](https://github.com/Materials-Consortia/OPTiMaDe/blob/develop/optimade.rst) for filter query syntax.\n\nExample: `chemical_formula = \"Al\" OR (prototype_formula = \"AB\" AND elements HAS Si, Al, O)`.\n",
Expand Down Expand Up @@ -940,7 +940,7 @@
"content": {
"application/json": {
"schema": {
"title": "Response Get Links Optimade V0 10 0 Links Get",
"title": "Response Get Links Optimade V0 10 1 Links Get",
"anyOf": [
{
"$ref": "#/components/schemas/LinksResponse"
Expand All @@ -966,13 +966,13 @@
}
}
},
"/optimade/v0.10.0/references": {
"/optimade/v0.10.1/references": {
"get": {
"tags": [
"References"
],
"summary": "Get References",
"operationId": "get_references_optimade_v0_10_0_references_get",
"operationId": "get_references_optimade_v0_10_1_references_get",
"parameters": [
{
"description": "See [the full and latest OPTiMaDe spec](https://github.com/Materials-Consortia/OPTiMaDe/blob/develop/optimade.rst) for filter query syntax.\n\nExample: `chemical_formula = \"Al\" OR (prototype_formula = \"AB\" AND elements HAS Si, Al, O)`.\n",
Expand Down Expand Up @@ -1100,7 +1100,7 @@
"content": {
"application/json": {
"schema": {
"title": "Response Get References Optimade V0 10 0 References Get",
"title": "Response Get References Optimade V0 10 1 References Get",
"anyOf": [
{
"$ref": "#/components/schemas/ReferenceResponseMany"
Expand All @@ -1126,13 +1126,13 @@
}
}
},
"/optimade/v0.10.0/references/{entry_id}": {
"/optimade/v0.10.1/references/{entry_id}": {
"get": {
"tags": [
"References"
],
"summary": "Get Single Reference",
"operationId": "get_single_reference_optimade_v0_10_0_references__entry_id__get",
"operationId": "get_single_reference_optimade_v0_10_1_references__entry_id__get",
"parameters": [
{
"required": true,
Expand Down Expand Up @@ -1181,7 +1181,7 @@
"content": {
"application/json": {
"schema": {
"title": "Response Get Single Reference Optimade V0 10 0 References Entry Id Get",
"title": "Response Get Single Reference Optimade V0 10 1 References Entry Id Get",
"anyOf": [
{
"$ref": "#/components/schemas/ReferenceResponseOne"
Expand All @@ -1207,13 +1207,13 @@
}
}
},
"/optimade/v0.10.0/structures": {
"/optimade/v0.10.1/structures": {
"get": {
"tags": [
"Structures"
],
"summary": "Get Structures",
"operationId": "get_structures_optimade_v0_10_0_structures_get",
"operationId": "get_structures_optimade_v0_10_1_structures_get",
"parameters": [
{
"description": "See [the full and latest OPTiMaDe spec](https://github.com/Materials-Consortia/OPTiMaDe/blob/develop/optimade.rst) for filter query syntax.\n\nExample: `chemical_formula = \"Al\" OR (prototype_formula = \"AB\" AND elements HAS Si, Al, O)`.\n",
Expand Down Expand Up @@ -1341,7 +1341,7 @@
"content": {
"application/json": {
"schema": {
"title": "Response Get Structures Optimade V0 10 0 Structures Get",
"title": "Response Get Structures Optimade V0 10 1 Structures Get",
"anyOf": [
{
"$ref": "#/components/schemas/StructureResponseMany"
Expand All @@ -1367,13 +1367,13 @@
}
}
},
"/optimade/v0.10.0/structures/{entry_id}": {
"/optimade/v0.10.1/structures/{entry_id}": {
"get": {
"tags": [
"Structures"
],
"summary": "Get Single Structure",
"operationId": "get_single_structure_optimade_v0_10_0_structures__entry_id__get",
"operationId": "get_single_structure_optimade_v0_10_1_structures__entry_id__get",
"parameters": [
{
"required": true,
Expand Down Expand Up @@ -1422,7 +1422,7 @@
"content": {
"application/json": {
"schema": {
"title": "Response Get Single Structure Optimade V0 10 0 Structures Entry Id Get",
"title": "Response Get Single Structure Optimade V0 10 1 Structures Entry Id Get",
"anyOf": [
{
"$ref": "#/components/schemas/StructureResponseOne"
Expand Down
4 changes: 2 additions & 2 deletions optimade/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = "0.2.0"
__api_version__ = "0.10.0"
__version__ = "0.3.0"
__api_version__ = "0.10.1"
2 changes: 1 addition & 1 deletion optimade/filterparser/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from .lark_parser import LarkParser, ParserError

__all__ = [LarkParser, ParserError]
__all__ = ("LarkParser", "ParserError")
3 changes: 1 addition & 2 deletions optimade/filterparser/lark_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,4 @@ def parse(self, filter_):
def __repr__(self):
if isinstance(self.tree, Tree):
return self.tree.pretty()
else:
return repr(self.lark)
return repr(self.lark)