From 7e3840283b0d02150677847d2bb38f17356db613 Mon Sep 17 00:00:00 2001 From: Rickard Armiento Date: Thu, 22 Dec 2022 16:36:19 +0100 Subject: [PATCH 1/3] Clarify encoding of OPTIMADE timestamp in property definitions. --- optimade.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/optimade.rst b/optimade.rst index 8a19baf0f..975a3d27e 100644 --- a/optimade.rst +++ b/optimade.rst @@ -1925,6 +1925,13 @@ The format described in this subsection forms a subset of the `JSON Schema Valid - One of the strings :val:`"boolean"`, :val:`"object"` (refers to an OPTIMADE dictionary), :val:`"array"` (refers to an OPTIMADE list), :val:`"number"` (refers to an OPTIMADE float), :val:`"string"`, or :val:`"integer"`. - A list where the first item MUST be one of the strings above, and the second item MUST be the string :val:`"null"`. + For OPTIMADE data types not covered above: + + - timestamps are represented by setting the field :field:`type` to :val:`"string"` and :field:`format` to :val:`"date-time"`. + In this case it is MANDATORY to include the field :field:`format`. + + Output formats that represent these OPTIMADE data types in other ways have to recognize them and reinterprete the definition accordingly. + .. Implementation notes: From 16baa944908b8590ca70ce8d7da29a59a4124d09 Mon Sep 17 00:00:00 2001 From: Rickard Armiento Date: Thu, 22 Dec 2022 16:38:19 +0100 Subject: [PATCH 2/3] Improve language --- optimade.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/optimade.rst b/optimade.rst index 975a3d27e..23ffc2728 100644 --- a/optimade.rst +++ b/optimade.rst @@ -1927,7 +1927,7 @@ The format described in this subsection forms a subset of the `JSON Schema Valid For OPTIMADE data types not covered above: - - timestamps are represented by setting the field :field:`type` to :val:`"string"` and :field:`format` to :val:`"date-time"`. + - timestamps are represented by setting the fields :field:`type` to :val:`"string"` and :field:`format` to :val:`"date-time"`. In this case it is MANDATORY to include the field :field:`format`. Output formats that represent these OPTIMADE data types in other ways have to recognize them and reinterprete the definition accordingly. From deec0c5470a7094772cdd8c7dfadd9a8d41133b8 Mon Sep 17 00:00:00 2001 From: Rickard Armiento Date: Thu, 22 Dec 2022 17:01:18 +0100 Subject: [PATCH 3/3] Fix spelling errors found in review Co-authored-by: Antanas Vaitkus --- optimade.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/optimade.rst b/optimade.rst index 23ffc2728..11ba9a932 100644 --- a/optimade.rst +++ b/optimade.rst @@ -1927,10 +1927,10 @@ The format described in this subsection forms a subset of the `JSON Schema Valid For OPTIMADE data types not covered above: - - timestamps are represented by setting the fields :field:`type` to :val:`"string"` and :field:`format` to :val:`"date-time"`. + - timestamps are represented by setting the :field:`type` field to :val:`"string"` and the :field:`format` field to :val:`"date-time"`. In this case it is MANDATORY to include the field :field:`format`. - Output formats that represent these OPTIMADE data types in other ways have to recognize them and reinterprete the definition accordingly. + Output formats that represent these OPTIMADE data types in other ways have to recognize them and reinterpret the definition accordingly. ..