Skip to content

Commit

Permalink
Merge pull request #30 from ecmwf/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
awarde96 authored Nov 5, 2024
2 parents b2661b9 + d3d8827 commit 46dcd09
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
13 changes: 8 additions & 5 deletions polytope_mars/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -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()
Expand All @@ -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
Expand Down
2 changes: 0 additions & 2 deletions polytope_mars/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@


class DatacubeConfig(ConfigModel):

type: str = "gribjump"
config: str = "config.yaml"
uri: str = "http://localhost:8000"
Expand All @@ -23,7 +22,6 @@ class PolygonRulesConfig(ConfigModel):


class PolytopeMarsConfig(ConfigModel):

datacube: DatacubeConfig = DatacubeConfig()
options: Config = Config()
coverageconfig: CovjsonKitConfig = CovjsonKitConfig()
Expand Down
2 changes: 1 addition & 1 deletion polytope_mars/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.0"
__version__ = "0.1.1"

0 comments on commit 46dcd09

Please sign in to comment.