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

Bump spec version to 1.0.0-rc.2 #367

Merged
merged 10 commits into from
Jun 25, 2020
14 changes: 0 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,3 @@ repos:
entry: invoke check-openapi-diff
pass_filenames: false
language: system

- id: optimade-shield-version
name: Update OPTIMADE shield
description: If needed, the JSON for the OPTIMADE shield will be updated with new config version
entry: invoke update-api-shield
pass_filenames: false
files:
(?x)^(
optimade/__init__.py|
README.md|
INSTALL.md|
optimade-version.json
)$
language: system
5 changes: 3 additions & 2 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ For any configuration parameters not set by the above two, the defaults in built
There is a built-in index meta-database set up to populate a `mongomock` in-memory database with resources from a static `json` file containing the `child` resources you, as a database provider, want to serve under this index meta-database. The location of that `json` file is controllable using the `index_links_path` property of the configuration or setting via the environment variable `optimade_index_links_path`.

Running the index meta-database is then as simple as writing `./run.sh index` in a terminal from the root of this package.
You can find it at the base URL: <http://localhost:5001/v0.10.1>.
You can find it at the base URL: <http://localhost:5001/v1>.

Here is an example of how it may look to start your server:

```shell
:~$ export OPTIMADE_CONFIG_FILE=/home/optimade_server/config.json
:~$ ./path/to/optimade/run.sh index
Expand Down Expand Up @@ -75,4 +76,4 @@ Running the following:
uvicorn optimade.server.main_index:app --reload --port 5001
```

will run the index meta-database server at <http://localhost:5001/v0.10.1>.
will run the index meta-database server at <http://localhost:5001/v1>.
24 changes: 13 additions & 11 deletions openapi/index_openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@
"openapi": "3.0.2",
"info": {
"title": "OPTIMADE API - Index meta-database",
"description": "The [Open Databases Integration for Materials Design (OPTIMADE) consortium](https://www.optimade.org/) aims to make materials databases interoperational by developing a common REST API.\nThis is the \"special\" index meta-database.\n\nThis specification is generated using [`optimade-python-tools`](https://github.com/Materials-Consortia/optimade-python-tools/tree/v0.8.1) v0.8.1.",
"version": "0.10.1"
"description": "The [Open Databases Integration for Materials Design (OPTIMADE) consortium](https://www.optimade.org/) aims to make materials databases interoperational by developing a common REST API.\nThis is the \"special\" index meta-database.\n\nThis specification is generated using [`optimade-python-tools`](https://github.com/Materials-Consortia/optimade-python-tools/tree/v0.9.1) v0.9.1.",
"version": "1.0.0-rc.2"
},
"paths": {
"/v0/info": {
"/v1/info": {
"get": {
"tags": [
"Info"
],
"summary": "Get Info",
"operationId": "get_info_v0_info_get",
"operationId": "get_info_v1_info_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"title": "Response Get Info V0 Info Get",
"title": "Response Get Info V1 Info Get",
"anyOf": [
{
"$ref": "#/components/schemas/IndexInfoResponse"
Expand All @@ -35,13 +35,13 @@
}
}
},
"/v0/links": {
"/v1/links": {
"get": {
"tags": [
"Links"
],
"summary": "Get Links",
"operationId": "get_links_v0_links_get",
"operationId": "get_links_v1_links_get",
"parameters": [
{
"description": "A filter string, in the format described in section API Filtering Format Specification of the specification.",
Expand Down Expand Up @@ -203,7 +203,7 @@
"content": {
"application/json": {
"schema": {
"title": "Response Get Links V0 Links Get",
"title": "Response Get Links V1 Links Get",
"anyOf": [
{
"$ref": "#/components/schemas/LinksResponse"
Expand Down Expand Up @@ -252,14 +252,14 @@
"minLength": 1,
"pattern": ".+/v[0-1](\\.[0-9]+)*/?$",
"type": "string",
"description": "a string specifying a versioned base URL that MUST adhere to the rules in section Base URL",
"description": "A string specifying a versioned base URL that MUST adhere to the rules in section Base URL",
"format": "uri"
},
"version": {
"title": "Version",
"pattern": "^[0-9]+(\\.[0-9]+){,2}$",
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
"type": "string",
"description": "a string containing the full version number of the API served at that versioned base URL. The version number string MUST NOT be prefixed by, e.g., 'v'."
"description": "A string containing the full version number of the API served at that versioned base URL. The version number string MUST NOT be prefixed by, e.g., 'v'."
}
},
"description": "A JSON object containing information about an available API version"
Expand Down Expand Up @@ -665,6 +665,7 @@
"properties": {
"api_version": {
"title": "Api Version",
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
"type": "string",
"description": "Presently used version of the OPTIMADE API"
},
Expand Down Expand Up @@ -1476,6 +1477,7 @@
},
"api_version": {
"title": "Api Version",
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
"type": "string",
"description": "A string containing the version of the API implementation."
},
Expand Down
54 changes: 28 additions & 26 deletions openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@
"openapi": "3.0.2",
"info": {
"title": "OPTIMADE API",
"description": "The [Open Databases Integration for Materials Design (OPTIMADE) consortium](https://www.optimade.org/) aims to make materials databases interoperational by developing a common REST API.\n\nThis specification is generated using [`optimade-python-tools`](https://github.com/Materials-Consortia/optimade-python-tools/tree/v0.8.1) v0.8.1.",
"version": "0.10.1"
"description": "The [Open Databases Integration for Materials Design (OPTIMADE) consortium](https://www.optimade.org/) aims to make materials databases interoperational by developing a common REST API.\n\nThis specification is generated using [`optimade-python-tools`](https://github.com/Materials-Consortia/optimade-python-tools/tree/v0.9.1) v0.9.1.",
"version": "1.0.0-rc.2"
},
"paths": {
"/v0/info": {
"/v1/info": {
"get": {
"tags": [
"Info"
],
"summary": "Get Info",
"operationId": "get_info_v0_info_get",
"operationId": "get_info_v1_info_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"title": "Response Get Info V0 Info Get",
"title": "Response Get Info V1 Info Get",
"anyOf": [
{
"$ref": "#/components/schemas/InfoResponse"
Expand All @@ -35,13 +35,13 @@
}
}
},
"/v0/info/{entry}": {
"/v1/info/{entry}": {
"get": {
"tags": [
"Info"
],
"summary": "Get Entry Info",
"operationId": "get_entry_info_v0_info__entry__get",
"operationId": "get_entry_info_v1_info__entry__get",
"parameters": [
{
"required": true,
Expand All @@ -59,7 +59,7 @@
"content": {
"application/json": {
"schema": {
"title": "Response Get Entry Info V0 Info Entry Get",
"title": "Response Get Entry Info V1 Info Entry Get",
"anyOf": [
{
"$ref": "#/components/schemas/EntryInfoResponse"
Expand All @@ -85,13 +85,13 @@
}
}
},
"/v0/links": {
"/v1/links": {
"get": {
"tags": [
"Links"
],
"summary": "Get Links",
"operationId": "get_links_v0_links_get",
"operationId": "get_links_v1_links_get",
"parameters": [
{
"description": "A filter string, in the format described in section API Filtering Format Specification of the specification.",
Expand Down Expand Up @@ -253,7 +253,7 @@
"content": {
"application/json": {
"schema": {
"title": "Response Get Links V0 Links Get",
"title": "Response Get Links V1 Links Get",
"anyOf": [
{
"$ref": "#/components/schemas/LinksResponse"
Expand All @@ -279,13 +279,13 @@
}
}
},
"/v0/references": {
"/v1/references": {
"get": {
"tags": [
"References"
],
"summary": "Get References",
"operationId": "get_references_v0_references_get",
"operationId": "get_references_v1_references_get",
"parameters": [
{
"description": "A filter string, in the format described in section API Filtering Format Specification of the specification.",
Expand Down Expand Up @@ -447,7 +447,7 @@
"content": {
"application/json": {
"schema": {
"title": "Response Get References V0 References Get",
"title": "Response Get References V1 References Get",
"anyOf": [
{
"$ref": "#/components/schemas/ReferenceResponseMany"
Expand All @@ -473,13 +473,13 @@
}
}
},
"/v0/references/{entry_id}": {
"/v1/references/{entry_id}": {
"get": {
"tags": [
"References"
],
"summary": "Get Single Reference",
"operationId": "get_single_reference_v0_references__entry_id__get",
"operationId": "get_single_reference_v1_references__entry_id__get",
"parameters": [
{
"required": true,
Expand Down Expand Up @@ -547,7 +547,7 @@
"content": {
"application/json": {
"schema": {
"title": "Response Get Single Reference V0 References Entry Id Get",
"title": "Response Get Single Reference V1 References Entry Id Get",
"anyOf": [
{
"$ref": "#/components/schemas/ReferenceResponseOne"
Expand All @@ -573,13 +573,13 @@
}
}
},
"/v0/structures": {
"/v1/structures": {
"get": {
"tags": [
"Structures"
],
"summary": "Get Structures",
"operationId": "get_structures_v0_structures_get",
"operationId": "get_structures_v1_structures_get",
"parameters": [
{
"description": "A filter string, in the format described in section API Filtering Format Specification of the specification.",
Expand Down Expand Up @@ -741,7 +741,7 @@
"content": {
"application/json": {
"schema": {
"title": "Response Get Structures V0 Structures Get",
"title": "Response Get Structures V1 Structures Get",
"anyOf": [
{
"$ref": "#/components/schemas/StructureResponseMany"
Expand All @@ -767,13 +767,13 @@
}
}
},
"/v0/structures/{entry_id}": {
"/v1/structures/{entry_id}": {
"get": {
"tags": [
"Structures"
],
"summary": "Get Single Structure",
"operationId": "get_single_structure_v0_structures__entry_id__get",
"operationId": "get_single_structure_v1_structures__entry_id__get",
"parameters": [
{
"required": true,
Expand Down Expand Up @@ -841,7 +841,7 @@
"content": {
"application/json": {
"schema": {
"title": "Response Get Single Structure V0 Structures Entry Id Get",
"title": "Response Get Single Structure V1 Structures Entry Id Get",
"anyOf": [
{
"$ref": "#/components/schemas/StructureResponseOne"
Expand Down Expand Up @@ -920,14 +920,14 @@
"minLength": 1,
"pattern": ".+/v[0-1](\\.[0-9]+)*/?$",
"type": "string",
"description": "a string specifying a versioned base URL that MUST adhere to the rules in section Base URL",
"description": "A string specifying a versioned base URL that MUST adhere to the rules in section Base URL",
"format": "uri"
},
"version": {
"title": "Version",
"pattern": "^[0-9]+(\\.[0-9]+){,2}$",
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
"type": "string",
"description": "a string containing the full version number of the API served at that versioned base URL. The version number string MUST NOT be prefixed by, e.g., 'v'."
"description": "A string containing the full version number of the API served at that versioned base URL. The version number string MUST NOT be prefixed by, e.g., 'v'."
}
},
"description": "A JSON object containing information about an available API version"
Expand All @@ -944,6 +944,7 @@
"properties": {
"api_version": {
"title": "Api Version",
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
"type": "string",
"description": "Presently used version of the OPTIMADE API"
},
Expand Down Expand Up @@ -2650,6 +2651,7 @@
},
"api_version": {
"title": "Api Version",
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
"type": "string",
"description": "A string containing the version of the API implementation."
},
Expand Down
2 changes: 1 addition & 1 deletion optimade-version.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"label": "OPTIMADE",
"message": "v0.10.1",
"message": "v1.0.0-rc.2",
"color": "yellowgreen",
"logoSvg": "<svg version='1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 55 55'><line x1='27' y1='14.5' x2='38.0' y2='7.94744111674' stroke='#9ed700' stroke-width='1.15' /><line x1='37.8253175473' y1='33.25' x2='38.0' y2='46.0525588833' stroke='#00acd9' stroke-width='1.15' /><line x1='16.1746824527' y1='33.25' x2='5' y2='27' stroke='#7a2dd0' stroke-width='1.15' /><line x1='49' y1='27' x2='38.0' y2='46.0525588833' stroke='#00acd9' stroke-width='1.15' /><line x1='38.0' y1='46.0525588833' x2='16.0' y2='46.0525588833' stroke='#e8e8e8' stroke-width='2' /><line x1='16.0' y1='46.0525588833' x2='5' y2='27' stroke='#7a2dd0' stroke-width='1.15' /><line x1='5' y1='27' x2='16.0' y2='7.94744111674' stroke='#e8e8e8' stroke-width='2' /><line x1='16.0' y1='7.94744111674' x2='38.0' y2='7.94744111674' stroke='#9ed700' stroke-width='1.15' /><line x1='38.0' y1='7.94744111674' x2='49' y2='27' stroke='#e8e8e8' stroke-width='2' /><circle cx='49' cy='27' r='3.5' fill='#00acd9' /><circle cx='38.0' cy='46.0525588833' r='3.5' fill='#00acd9' /><circle cx='16.0' cy='46.0525588833' r='3.5' fill='#7a2dd0' /><circle cx='5' cy='27' r='3.5' fill='#7a2dd0' /><circle cx='16.0' cy='7.94744111674' r='3.5' fill='#9ed700' /><circle cx='38.0' cy='7.94744111674' r='3.5' fill='#9ed700' /><line x1='27' y1='39.5' x2='16.1746824527' y2='33.25' stroke='#ff414d' stroke-width='1' /><line x1='16.1746824527' y1='33.25' x2='16.1746824527' y2='20.75' stroke='#ff414d' stroke-width='1' /><line x1='16.1746824527' y1='20.75' x2='27' y2='14.5' stroke='#ff414d' stroke-width='1' /><line x1='27' y1='14.5' x2='37.8253175473' y2='20.75' stroke='#ff414d' stroke-width='1' /><line x1='37.8253175473' y1='20.75' x2='37.8253175473' y2='33.25' stroke='#ff414d' stroke-width='1' /><line x1='37.8253175473' y1='33.25' x2='27' y2='39.5' stroke='#ff414d' stroke-width='1' /><circle cx='27' cy='39.5' r='2.5' fill='#ff414d' /><circle cx='16.1746824527' cy='33.25' r='2.5' fill='#ff414d' /><circle cx='16.1746824527' cy='20.75' r='2.5' fill='#ff414d' /><circle cx='27' cy='14.5' r='2.5' fill='#ff414d' /><circle cx='37.8253175473' cy='20.75' r='2.5' fill='#ff414d' /><circle cx='37.8253175473' cy='33.25' r='2.5' fill='#ff414d' /></svg>"
}
11 changes: 2 additions & 9 deletions optimade/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
from pkg_resources import DistributionNotFound, get_distribution

try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
# package is not installed
pass

__api_version__ = "0.10.1"
__version__ = "0.9.1"
__api_version__ = "1.0.0-rc.2"