diff --git a/polytope_mars/api.py b/polytope_mars/api.py index 76e75d9..00ea509 100644 --- a/polytope_mars/api.py +++ b/polytope_mars/api.py @@ -96,8 +96,12 @@ def extract(self, request): feature.validate(request) + logging.debug("Unparsed request: %s", request) + request = feature.parse(request, feature_config_copy) + logging.debug("Parsed request: %s", request) + shapes = self._create_base_shapes(request) shapes.extend(feature.get_shapes()) @@ -114,10 +118,13 @@ def extract(self, request): f"Datacube type '{self.conf.datacube.type}' not found" ) # noqa: E501 slicer = HullSlicer() + + logging.debug(f"Send log_context to polytope: {self.log_context}") self.api = Polytope( datacube=fdbdatacube, engine=slicer, options=self.conf.options.model_dump(), + context=self.log_context, ) end = time.time() @@ -131,11 +138,7 @@ def extract(self, request): start = time.time() logging.info(f"{self.id}: Polytope time start: {start}") # noqa: E501 - if self.log_context: - logging.debug(f"Send log_context to polytope: {self.log_context}") - result = self.api.retrieve(preq, context=self.log_context) - else: - result = self.api.retrieve(preq) + result = self.api.retrieve(preq) end = time.time() delta = end - start diff --git a/polytope_mars/config.py b/polytope_mars/config.py index 059daf8..3bb8ea7 100644 --- a/polytope_mars/config.py +++ b/polytope_mars/config.py @@ -3,7 +3,6 @@ class DatacubeConfig(ConfigModel): - type: str = "gribjump" config: str = "config.yaml" uri: str = "http://localhost:8000" @@ -23,7 +22,6 @@ class PolygonRulesConfig(ConfigModel): class PolytopeMarsConfig(ConfigModel): - datacube: DatacubeConfig = DatacubeConfig() options: Config = Config() coverageconfig: CovjsonKitConfig = CovjsonKitConfig() diff --git a/polytope_mars/version.py b/polytope_mars/version.py index 3dc1f76..485f44a 100644 --- a/polytope_mars/version.py +++ b/polytope_mars/version.py @@ -1 +1 @@ -__version__ = "0.1.0" +__version__ = "0.1.1"