Skip to content

Commit

Permalink
allows handling transforms in polytope datasource which don't match t…
Browse files Browse the repository at this point in the history
…he request
  • Loading branch information
jameshawkes committed Sep 24, 2024
1 parent 1a881ec commit 7d20cf2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions polytope_server/common/datasource/polytope.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,18 @@ def retrieve(self, request):
polytope_mars_config = copy.deepcopy(self.config)
polytope_mars_config["options"]["pre_path"] = pre_path

transforms = []
for transform in polytope_mars_config["options"]["axis_config"]:
if transform["axis_name"] in r.keys():
logging.info("Found axis {} in request".format(transform["axis_name"]))
transforms.append(transform)
if transform["axis_name"] in ("latitude", "longitude", "values"):
transforms.append(transform)


polytope_mars_config["options"]["axis_config"] = transforms



polytope_mars = PolytopeMars(
polytope_mars_config,
Expand Down

0 comments on commit 7d20cf2

Please sign in to comment.