From 5da5f0b1e5a827c8c9dffcde84f2ac05967f27df Mon Sep 17 00:00:00 2001 From: Calum Macdonald Date: Mon, 8 Jan 2024 15:44:35 +0000 Subject: [PATCH] include removal of accrualPeriodicity --- hdr_schemata/models/HDRUK/2.1.3/schema.json | 9 --------- .../models/HDRUK/{test.py => create_json_schema.py} | 0 hdr_schemata/models/HDRUK/latest/dev/schema.json | 9 --------- hdr_schemata/models/HDRUK/v2_1_3/Temporal.py | 4 ++++ 4 files changed, 4 insertions(+), 18 deletions(-) rename hdr_schemata/models/HDRUK/{test.py => create_json_schema.py} (100%) diff --git a/hdr_schemata/models/HDRUK/2.1.3/schema.json b/hdr_schemata/models/HDRUK/2.1.3/schema.json index 1d629d0..23a49a1 100644 --- a/hdr_schemata/models/HDRUK/2.1.3/schema.json +++ b/hdr_schemata/models/HDRUK/2.1.3/schema.json @@ -1607,14 +1607,6 @@ "Temporal": { "additionalProperties": false, "properties": { - "accrualPeriodicity": { - "allOf": [ - { - "$ref": "#/$defs/Periodicity" - } - ], - "description": "Please indicate the frequency of distribution release. If a dataset is distributed regularly please choose a distribution release periodicity from the constrained list and indicate the next release date. When the release date becomes historical, a new release date will be calculated based on the publishing periodicity. If a dataset has been published and will remain static please indicate that it is static and indicated when it was released. If a dataset is released on an irregular basis or \u201con-demand\u201d please indicate that it is Irregular and leave release date as null. If a dataset can be published in real-time or near-real-time please indicate that it is continuous and leave release date as null. Notes: see https://www.dublincore.org/specifications/dublin-core/collection-description/frequency/" - }, "distributionReleaseDate": { "anyOf": [ { @@ -1691,7 +1683,6 @@ } }, "required": [ - "accrualPeriodicity", "startDate", "timeLag", "publishingFrequency" diff --git a/hdr_schemata/models/HDRUK/test.py b/hdr_schemata/models/HDRUK/create_json_schema.py similarity index 100% rename from hdr_schemata/models/HDRUK/test.py rename to hdr_schemata/models/HDRUK/create_json_schema.py diff --git a/hdr_schemata/models/HDRUK/latest/dev/schema.json b/hdr_schemata/models/HDRUK/latest/dev/schema.json index 1d629d0..23a49a1 100644 --- a/hdr_schemata/models/HDRUK/latest/dev/schema.json +++ b/hdr_schemata/models/HDRUK/latest/dev/schema.json @@ -1607,14 +1607,6 @@ "Temporal": { "additionalProperties": false, "properties": { - "accrualPeriodicity": { - "allOf": [ - { - "$ref": "#/$defs/Periodicity" - } - ], - "description": "Please indicate the frequency of distribution release. If a dataset is distributed regularly please choose a distribution release periodicity from the constrained list and indicate the next release date. When the release date becomes historical, a new release date will be calculated based on the publishing periodicity. If a dataset has been published and will remain static please indicate that it is static and indicated when it was released. If a dataset is released on an irregular basis or \u201con-demand\u201d please indicate that it is Irregular and leave release date as null. If a dataset can be published in real-time or near-real-time please indicate that it is continuous and leave release date as null. Notes: see https://www.dublincore.org/specifications/dublin-core/collection-description/frequency/" - }, "distributionReleaseDate": { "anyOf": [ { @@ -1691,7 +1683,6 @@ } }, "required": [ - "accrualPeriodicity", "startDate", "timeLag", "publishingFrequency" diff --git a/hdr_schemata/models/HDRUK/v2_1_3/Temporal.py b/hdr_schemata/models/HDRUK/v2_1_3/Temporal.py index 9abc6a5..1b0aee5 100644 --- a/hdr_schemata/models/HDRUK/v2_1_3/Temporal.py +++ b/hdr_schemata/models/HDRUK/v2_1_3/Temporal.py @@ -2,6 +2,7 @@ from hdr_schemata.definitions.HDRUK import Periodicity from hdr_schemata.models.HDRUK.base.Temporal import Temporal as BaseTemporal from pydantic import BaseModel, Field +from hdr_schemata.models import remove_fields_from_cls class Temporal(BaseTemporal): @@ -10,3 +11,6 @@ class Temporal(BaseTemporal): title="Publishing Frequency", description="Please indicate the frequency of distribution release. If a dataset is distributed regularly please choose a distribution release periodicity from the constrained list and indicate the next release date. When the release date becomes historical, a new release date will be calculated based on the publishing periodicity. If a dataset has been published and will remain static please indicate that it is static and indicated when it was released. If a dataset is released on an irregular basis or “on-demand” please indicate that it is Irregular and leave release date as null. If a dataset can be published in real-time or near-real-time please indicate that it is continuous and leave release date as null. Notes: see https://www.dublincore.org/specifications/dublin-core/collection-description/frequency/", ) + + +remove_fields_from_cls(Temporal, ["accrualPeriodicity"])