From 47b3faad1168014249dc9a77432182b4c7fcfb66 Mon Sep 17 00:00:00 2001 From: Tonio Fincke Date: Fri, 3 Feb 2023 16:13:25 +0100 Subject: [PATCH 1/2] updated docker file to include xcube-cmems --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c1c1bb46b..f9a833a0b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,8 +5,9 @@ FROM continuumio/miniconda3:${MINICONDA_VERSION} ARG INSTALL_PLUGINS=1 ARG XCUBE_USER_NAME=xcube ENV XCUBE_SH_VERSION=latest -ENV XCUBE_CCI_VERSION=0.9.8.dev1 +ENV XCUBE_CCI_VERSION=latest ENV XCUBE_CDS_VERSION=latest +ENV XCUBE_CMEMS_VERSION=latest # Metadata LABEL maintainer="xcube-team@brockmann-consult.de" @@ -54,6 +55,7 @@ ADD scripts/install_xcube.sh ./ RUN if [[ ${INSTALL_PLUGINS} == '1' ]]; then bash install_xcube.sh xcube-sh ${XCUBE_SH_VERSION} release; fi; RUN if [[ ${INSTALL_PLUGINS} == '1' ]]; then bash install_xcube.sh xcube-cci ${XCUBE_CCI_VERSION} release; fi; RUN if [[ ${INSTALL_PLUGINS} == '1' ]]; then bash install_xcube.sh xcube-cds ${XCUBE_CDS_VERSION} release; fi; +RUN if [[ ${INSTALL_PLUGINS} == '1' ]]; then bash install_xcube.sh xcube-cmems ${XCUBE_CMEMS_VERSION} release; fi; # Export web server port EXPOSE 8080 From 9a82e2c5191bd365e34d910561bdd92ea6b28511 Mon Sep 17 00:00:00 2001 From: Norman Fomferra Date: Fri, 3 Feb 2023 19:09:29 +0100 Subject: [PATCH 2/2] JsonObjectSchema.required is a list, not a set (otherwise comparisons of schema-to_dict() are invalid) --- xcube/core/gen2/remote/response.py | 2 +- xcube/server/server.py | 6 +++--- xcube/util/jsonschema.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/xcube/core/gen2/remote/response.py b/xcube/core/gen2/remote/response.py index 3cbf99e67..de8ec7158 100644 --- a/xcube/core/gen2/remote/response.py +++ b/xcube/core/gen2/remote/response.py @@ -235,7 +235,7 @@ def __init__(self, cost_estimation: CostEstimation, **kwargs): def get_schema(cls) -> JsonObjectSchema: schema = super().get_schema() schema.properties.update(cost_estimation=CostEstimation.get_schema()) - schema.required.add('cost_estimation') + schema.required.append('cost_estimation') schema.factory = cls return schema diff --git a/xcube/server/server.py b/xcube/server/server.py index 7e754da06..b801f853a 100644 --- a/xcube/server/server.py +++ b/xcube/server/server.py @@ -334,9 +334,9 @@ def _update_config_schema(cls, f' is already defined.') config_schema.properties[k] = v if config_schema_update.required: - config_schema.required.update( - config_schema_update.required - ) + for r in config_schema_update.required: + if r not in config_schema.required: + config_schema.required.append(r) def get_open_api_doc(self, include_all: bool = False) -> Dict[str, Any]: """Get the OpenAPI JSON document for this server.""" diff --git a/xcube/util/jsonschema.py b/xcube/util/jsonschema.py index 48cd829c6..d4d406bc5 100644 --- a/xcube/util/jsonschema.py +++ b/xcube/util/jsonschema.py @@ -463,7 +463,7 @@ def __init__(self, self.additional_properties = additional_properties self.min_properties = min_properties self.max_properties = max_properties - self.required = set(required) if required else set() + self.required = list(required) if required else [] self.dependencies = dict(dependencies) if dependencies else None def to_dict(self) -> Dict[str, Any]: