polytope-python 2.1.9__py3-none-any.whl → 2.1.12__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
1
  # Do not change! Do not track in version control!
2
- __version__ = "2.1.9"
2
+ __version__ = "2.1.12"
@@ -1,12 +1,11 @@
1
1
  import argparse
2
+ import logging
2
3
  from abc import ABC
3
4
  from typing import Dict, List, Literal, Optional, Tuple, Union
4
5
 
5
6
  from conflator import ConfigModel, Conflator
6
7
  from pydantic import ConfigDict
7
8
 
8
- from polytope_feature.datacube.switching_grid_helper import lookup_grid_config
9
-
10
9
 
11
10
  class TransformationConfig(ConfigModel):
12
11
  model_config = ConfigDict(extra="forbid")
@@ -111,9 +110,12 @@ class PolytopeOptions(ABC):
111
110
  replaced = replace_grid_config_in_options(config_options, pre_path)
112
111
  if replaced:
113
112
  axis_config = config_options.axis_config
114
- except Exception:
115
- # Fail silently and continue with original config
116
- pass
113
+ except Exception as e:
114
+ logging.warning(
115
+ "Dynamic grid replacement failed for georef '%s': %s. Using static grid config.",
116
+ pre_path.get("georef", "unknown"),
117
+ e,
118
+ )
117
119
  return (
118
120
  axis_config,
119
121
  compressed_axes_config,
@@ -151,6 +153,8 @@ def gridspec_to_grid_config(gridspec, md5hash):
151
153
 
152
154
 
153
155
  def replace_grid_config_in_options(options, req):
156
+ from polytope_feature.datacube.switching_grid_helper import lookup_grid_config
157
+
154
158
  gridspec, md5hash = lookup_grid_config(req)
155
159
  grid_config = gridspec_to_grid_config(gridspec, md5hash)
156
160
  if grid_config is not None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: polytope-python
3
- Version: 2.1.9
3
+ Version: 2.1.12
4
4
  Summary: Polytope datacube feature extraction library
5
5
  Author-email: "European Centre for Medium-Range Weather Forecasts (ECMWF)" <software.support@ecmwf.int>
6
6
  Maintainer-email: James Hawkes <James.Hawkes@ecmwf.int>, Mathilde Leuridan <Mathilde.Leuridan@ecmwf.int>
@@ -1,6 +1,6 @@
1
1
  polytope_feature/__init__.py,sha256=1OP0y5Ubza4LaBUhegJvJe24u-8zZGrEzAgwPJVqZlk,58
2
- polytope_feature/_version.py,sha256=oEFCtI2Y8HquU2YgkNAeLFzT2xVV775Uhu-w52G-qTA,72
3
- polytope_feature/options.py,sha256=sL-LURTJKEE649O4Y15SHqClCxZxwrVJLwjVsy5ZGX8,5467
2
+ polytope_feature/_version.py,sha256=sXzVbNV7WQ-k4G9ldU9AhhlIvQjZzrSqpojAfIrk8Kc,73
3
+ polytope_feature/options.py,sha256=_dBIRLpNAuwxhTO5I18SQ4csjOpOgH9LqdgFLaTyJGE,5635
4
4
  polytope_feature/polytope.py,sha256=TM4X4nxAio0fgLC8vjhzXcJjylZRVS5nRTv4LdbPziM,9805
5
5
  polytope_feature/shapes.py,sha256=ZhMrHTNEqEgnpMTDU1Rd5zjJeyRBQMYNDRoKqDd2Ejs,16473
6
6
  polytope_feature/datacube/__init__.py,sha256=jfDehbaWSfhOPDHkxaj4UA33sTh-W6n6_B5BLTKRgAo,33
@@ -58,8 +58,8 @@ polytope_feature/utility/exceptions.py,sha256=cIgX7YiARpfPsjxax0dGQmkg9vfinEUVj2
58
58
  polytope_feature/utility/geometry.py,sha256=DHCYFKJWC7BBbMwnCQlcQVzYp8T_e-RZVuSbKPo7-60,1063
59
59
  polytope_feature/utility/list_tools.py,sha256=0WeWCRzm8jHdcM_1BPu1s-yr5D0UUmtQIVe4HHGfRJk,760
60
60
  polytope_feature/utility/profiling.py,sha256=PS8z7u6xyiBMlbcddOO5LS6ua8E1CJOzi3CtDaDv7p4,322
61
- polytope_python-2.1.9.dist-info/licenses/LICENSE,sha256=VtcDVlw8N6T2GAxlk6b-8OvqAG_V751y269wWcv_lEU,11379
62
- polytope_python-2.1.9.dist-info/METADATA,sha256=fqblureXojtRio2jLLmNR2mLGr7u-jW3B5YOVOs2pA8,11616
63
- polytope_python-2.1.9.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
64
- polytope_python-2.1.9.dist-info/top_level.txt,sha256=4I919dNk-eQpuqcYHdiBpwAZcNrWeMPYuROzfpqmGRk,17
65
- polytope_python-2.1.9.dist-info/RECORD,,
61
+ polytope_python-2.1.12.dist-info/licenses/LICENSE,sha256=VtcDVlw8N6T2GAxlk6b-8OvqAG_V751y269wWcv_lEU,11379
62
+ polytope_python-2.1.12.dist-info/METADATA,sha256=UECF_TZFW5VIMqj5nVRj6YAVc0jJhZ2ZpEJsNMyf8JA,11617
63
+ polytope_python-2.1.12.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
64
+ polytope_python-2.1.12.dist-info/top_level.txt,sha256=4I919dNk-eQpuqcYHdiBpwAZcNrWeMPYuROzfpqmGRk,17
65
+ polytope_python-2.1.12.dist-info/RECORD,,