diff --git a/polytope_feature/options.py b/polytope_feature/options.py index a63bce7bd..2e88c9679 100644 --- a/polytope_feature/options.py +++ b/polytope_feature/options.py @@ -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 @@ -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 diff --git a/polytope_feature/version.py b/polytope_feature/version.py index bd538f76e..66c607f6d 100644 --- a/polytope_feature/version.py +++ b/polytope_feature/version.py @@ -1 +1 @@ -__version__ = "1.0.12" +__version__ = "1.0.13" diff --git a/tests/test_local_grid_cyclic.py b/tests/test_local_grid_cyclic.py index 376f1e4a5..3f4bfd36c 100644 --- a/tests/test_local_grid_cyclic.py +++ b/tests/test_local_grid_cyclic.py @@ -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", } ], }, diff --git a/tests/test_local_regular_grid.py b/tests/test_local_regular_grid.py index 023c2dbdc..3f8f2d402 100644 --- a/tests/test_local_regular_grid.py +++ b/tests/test_local_regular_grid.py @@ -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", } ], }, diff --git a/tests/test_regular_grid.py b/tests/test_regular_grid.py index 4fbb13856..7eaaeccb5 100644 --- a/tests/test_regular_grid.py +++ b/tests/test_regular_grid.py @@ -31,6 +31,7 @@ def setup_method(self, method): "resolution": 30, "axes": ["latitude", "longitude"], "axis_reversed": {"latitude": True, "longitude": False}, + "md5_hash": "15372eaafa9d744000df708d63f69284", } ], }, diff --git a/tests/test_shapes.py b/tests/test_shapes.py index 3013be3f0..ac730905a 100644 --- a/tests/test_shapes.py +++ b/tests/test_shapes.py @@ -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}]}, diff --git a/tests/test_slice_fdb_box.py b/tests/test_slice_fdb_box.py index f9daa128e..a21910dfd 100644 --- a/tests/test_slice_fdb_box.py +++ b/tests/test_slice_fdb_box.py @@ -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