From 281ca780881d9529d7d247e5075eddf08152a362 Mon Sep 17 00:00:00 2001 From: OPTIMADE Developers Date: Sun, 29 May 2022 22:41:12 +0000 Subject: [PATCH] Release v0.18.0 - Changelog --- CHANGELOG.md | 30 ++++++++++++++++++++++++++++++ docs/static/default_config.json | 2 +- openapi/index_openapi.json | 2 +- openapi/openapi.json | 14 +++++++------- optimade/__init__.py | 2 +- 5 files changed, 40 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb8bcc8aa..f97908044 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,39 @@ # Changelog +## [v0.18.0](https://github.com/Materials-Consortia/optimade-python-tools/tree/v0.18.0) (2022-05-29) + +[Full Changelog](https://github.com/Materials-Consortia/optimade-python-tools/compare/v0.17.2...v0.18.0) + +This is a feature release that includes the new `optimade.client.OptimadeClient` class, a client capable asynchronously querying multiple OPTIMADE APIs simultaneously. +It also contains a patch for the OPTIMADE models that allows them to be used with more recent FastAPI versions without breaking OpenAPI 3.0 compatibility. +Other changes can be found below. +This release includes improvements to the validator to catch more cases where OPTIMADE APIs are only partially implemented. +Previously, APIs that did not support filtering, pagination or limiting response fields at all (i.e., the query parameter is simply ignored) would pass most validation tests erroneously in some unlucky situations (#1180). + +**Implemented enhancements:** + +- The validator should use a custom `User-Agent` header [\#1187](https://github.com/Materials-Consortia/optimade-python-tools/issues/1187) +- Suggestion to include an OPTIMADE python API client [\#932](https://github.com/Materials-Consortia/optimade-python-tools/issues/932) +- Implementation of an OPTIMADE client [\#1154](https://github.com/Materials-Consortia/optimade-python-tools/pull/1154) ([ml-evs](https://github.com/ml-evs)) + +**Fixed bugs:** + +- `OptimadeClient` crashes if an index meta-database is down [\#1196](https://github.com/Materials-Consortia/optimade-python-tools/issues/1196) +- Catch connection errors when populating client database list [\#1197](https://github.com/Materials-Consortia/optimade-python-tools/pull/1197) ([ml-evs](https://github.com/ml-evs)) + +**Merged pull requests:** + +- Add a clearer error message on when trying to use client with missing deps [\#1200](https://github.com/Materials-Consortia/optimade-python-tools/pull/1200) ([ml-evs](https://github.com/ml-evs)) +- Use a custom `User-Agent` with validator [\#1189](https://github.com/Materials-Consortia/optimade-python-tools/pull/1189) ([ml-evs](https://github.com/ml-evs)) +- Syntactic tweaks to models and schemas for compatibility with `fastapi>0.66` [\#1131](https://github.com/Materials-Consortia/optimade-python-tools/pull/1131) ([ml-evs](https://github.com/ml-evs)) + ## [v0.17.2](https://github.com/Materials-Consortia/optimade-python-tools/tree/v0.17.2) (2022-05-21) [Full Changelog](https://github.com/Materials-Consortia/optimade-python-tools/compare/v0.17.1...v0.17.2) +This release includes improvements to the validator to catch more cases where OPTIMADE APIs are only partially implemented. +Previously, APIs that did not support filtering, pagination or limiting response fields at all (i.e., the query parameter is simply ignored) would pass most validation tests erroneously in some unlucky situations (#1180). + **Fixed bugs:** - Server validation incorrectly passes with various unimplemented features [\#1180](https://github.com/Materials-Consortia/optimade-python-tools/issues/1180) diff --git a/docs/static/default_config.json b/docs/static/default_config.json index b2ee296f3..13daaafa9 100644 --- a/docs/static/default_config.json +++ b/docs/static/default_config.json @@ -13,7 +13,7 @@ "base_url": null, "implementation": { "name": "OPTIMADE Python Tools", - "version": "0.17.2", + "version": "0.18.0", "source_url": "https://github.com/Materials-Consortia/optimade-python-tools", "maintainer": {"email": "dev@optimade.org"} }, diff --git a/openapi/index_openapi.json b/openapi/index_openapi.json index 4488c14b6..619d22c8f 100644 --- a/openapi/index_openapi.json +++ b/openapi/index_openapi.json @@ -2,7 +2,7 @@ "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.17.2) v0.17.2.", + "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.18.0) v0.18.0.", "version": "1.1.0" }, "paths": { diff --git a/openapi/openapi.json b/openapi/openapi.json index 55c13c5a7..776cb8747 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -2,7 +2,7 @@ "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.17.2) v0.17.2.", + "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.18.0) v0.18.0.", "version": "1.1.0" }, "paths": { @@ -3365,9 +3365,9 @@ "type": "number" }, "description": "If present MUST be a list of floats expressed in a.m.u.\nElements denoting vacancies MUST have masses equal to 0.", + "x-optimade-unit": "a.m.u.", "x-optimade-support": "optional", - "x-optimade-queryable": "optional", - "x-optimade-unit": "a.m.u." + "x-optimade-queryable": "optional" }, "original_name": { "title": "Original Name", @@ -3645,9 +3645,9 @@ }, "description": "The three lattice vectors in Cartesian coordinates, in \u00e5ngstr\u00f6m (\u00c5).\n\n- **Type**: list of list of floats or unknown values.\n\n- **Requirements/Conventions**:\n - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`.\n - **Query**: Support for queries on this property is OPTIONAL.\n If supported, filters MAY support only a subset of comparison operators.\n - MUST be a list of three vectors *a*, *b*, and *c*, where each of the vectors MUST BE a list of the vector's coordinates along the x, y, and z Cartesian coordinates.\n (Therefore, the first index runs over the three lattice vectors and the second index runs over the x, y, z Cartesian coordinates).\n - For databases that do not define an absolute Cartesian system (e.g., only defining the length and angles between vectors), the first lattice vector SHOULD be set along *x* and the second on the *xy*-plane.\n - MUST always contain three vectors of three coordinates each, independently of the elements of property `dimension_types`.\n The vectors SHOULD by convention be chosen so the determinant of the `lattice_vectors` matrix is different from zero.\n The vectors in the non-periodic directions have no significance beyond fulfilling these requirements.\n - The coordinates of the lattice vectors of non-periodic dimensions (i.e., those dimensions for which `dimension_types` is `0`) MAY be given as a list of all `null` values.\n If a lattice vector contains the value `null`, all coordinates of that lattice vector MUST be `null`.\n\n- **Examples**:\n - `[[4.0,0.0,0.0],[0.0,4.0,0.0],[0.0,1.0,4.0]]` represents a cell, where the first vector is `(4, 0, 0)`, i.e., a vector aligned along the `x` axis of length 4 \u00c5; the second vector is `(0, 4, 0)`; and the third vector is `(0, 1, 4)`.", "nullable": true, + "x-optimade-unit": "\u00c5", "x-optimade-support": "should", - "x-optimade-queryable": "optional", - "x-optimade-unit": "\u00c5" + "x-optimade-queryable": "optional" }, "cartesian_site_positions": { "title": "Cartesian Site Positions", @@ -3662,9 +3662,9 @@ }, "description": "Cartesian positions of each site in the structure.\nA site is usually used to describe positions of atoms; what atoms can be encountered at a given site is conveyed by the `species_at_sites` property, and the species themselves are described in the `species` property.\n\n- **Type**: list of list of floats\n\n- **Requirements/Conventions**:\n - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`.\n - **Query**: Support for queries on this property is OPTIONAL.\n If supported, filters MAY support only a subset of comparison operators.\n - It MUST be a list of length equal to the number of sites in the structure, where every element is a list of the three Cartesian coordinates of a site expressed as float values in the unit angstrom (\u00c5).\n - An entry MAY have multiple sites at the same Cartesian position (for a relevant use of this, see e.g., the property `assemblies`).\n\n- **Examples**:\n - `[[0,0,0],[0,0,2]]` indicates a structure with two sites, one sitting at the origin and one along the (positive) *z*-axis, 2 \u00c5 away from the origin.", "nullable": true, + "x-optimade-unit": "\u00c5", "x-optimade-support": "should", - "x-optimade-queryable": "optional", - "x-optimade-unit": "\u00c5" + "x-optimade-queryable": "optional" }, "nsites": { "title": "Nsites", diff --git a/optimade/__init__.py b/optimade/__init__.py index 8c581017d..884fbfea6 100644 --- a/optimade/__init__.py +++ b/optimade/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.17.2" +__version__ = "0.18.0" __api_version__ = "1.1.0" import sys