Skip to content

Commit

Permalink
Merge pull request #250 from ecmwf/develop
Browse files Browse the repository at this point in the history
v1.0.13
  • Loading branch information
mathleur authored Nov 13, 2024
2 parents 9a02d2b + 1eb041e commit b7c05df
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 8 deletions.
7 changes: 2 additions & 5 deletions polytope_feature/options.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import argparse
from abc import ABC
from typing import Dict, List, Literal, Optional, Union

from conflator import ConfigModel, Conflator
from conflator import ConfigModel
from pydantic import ConfigDict


Expand Down Expand Up @@ -68,9 +67,7 @@ class Config(ConfigModel):
class PolytopeOptions(ABC):
@staticmethod
def get_polytope_options(options):
parser = argparse.ArgumentParser(allow_abbrev=False)
conflator = Conflator(app_name="polytope", model=Config, cli=False, argparser=parser, **options)
config_options = conflator.load()
config_options = Config.model_validate(options)

axis_config = config_options.axis_config
compressed_axes_config = config_options.compressed_axes_config
Expand Down
2 changes: 1 addition & 1 deletion polytope_feature/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.0.12"
__version__ = "1.0.13"
1 change: 1 addition & 0 deletions tests/test_local_grid_cyclic.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def setup_method(self, method):
"axes": ["latitude", "longitude"],
"local": [-40, 40, -20, 60],
"axis_reversed": {"latitude": True, "longitude": False},
"md5_hash": "47ee1554a9aebbc4f8197f19449bdc0c",
}
],
},
Expand Down
1 change: 1 addition & 0 deletions tests/test_local_regular_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def setup_method(self, method):
"axes": ["latitude", "longitude"],
"local": [-40, 40, -20, 60],
"axis_reversed": {"latitude": True, "longitude": False},
"md5_hash": "47ee1554a9aebbc4f8197f19449bdc0c",
}
],
},
Expand Down
1 change: 1 addition & 0 deletions tests/test_regular_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def setup_method(self, method):
"resolution": 30,
"axes": ["latitude", "longitude"],
"axis_reversed": {"latitude": True, "longitude": False},
"md5_hash": "15372eaafa9d744000df708d63f69284",
}
],
},
Expand Down
8 changes: 7 additions & 1 deletion tests/test_shapes.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,13 @@ def test_all_mapper_cyclic(self):
{
"axis_name": "values",
"transformations": [
{"name": "mapper", "type": "octahedral", "resolution": 1280, "axes": ["latitude", "longitude"]}
{
"name": "mapper",
"type": "octahedral",
"resolution": 1280,
"axes": ["latitude", "longitude"],
"md5_hash": "5ea6378bf5e2904f565ef7221da63a09",
}
],
},
{"axis_name": "latitude", "transformations": [{"name": "reverse", "is_reverse": True}]},
Expand Down
2 changes: 1 addition & 1 deletion tests/test_slice_fdb_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def setup_method(self, method):
}

# Testing different shapes
# @pytest.mark.skip(reason="optimisation test")
@pytest.mark.skip(reason="optimisation test")
@pytest.mark.fdb
def test_fdb_datacube(self):
import pygribjump as gj
Expand Down

0 comments on commit b7c05df

Please sign in to comment.