diff --git a/plate_simulation-assets/__init__.py b/plate_simulation-assets/__init__.py index ff14e25..83935c2 100644 --- a/plate_simulation-assets/__init__.py +++ b/plate_simulation-assets/__init__.py @@ -1,5 +1,5 @@ # '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -# Copyright (c) 2024 Mira Geoscience Ltd. ' +# Copyright (c) 2024-2025 Mira Geoscience Ltd. ' # ' # This file is part of plate-simulation package. ' # ' diff --git a/plate_simulation/__init__.py b/plate_simulation/__init__.py index 7767b4d..e8958d4 100644 --- a/plate_simulation/__init__.py +++ b/plate_simulation/__init__.py @@ -1,5 +1,5 @@ # '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -# Copyright (c) 2022-2024 Mira Geoscience Ltd. ' +# Copyright (c) 2022-2025 Mira Geoscience Ltd. ' # ' # This file is part of plate-simulation package. ' # ' diff --git a/plate_simulation/driver.py b/plate_simulation/driver.py index 06c75b3..b90b33f 100644 --- a/plate_simulation/driver.py +++ b/plate_simulation/driver.py @@ -1,5 +1,5 @@ # '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -# Copyright (c) 2024 Mira Geoscience Ltd. ' +# Copyright (c) 2024-2025 Mira Geoscience Ltd. ' # ' # This file is part of plate-simulation package. ' # ' diff --git a/plate_simulation/logger.py b/plate_simulation/logger.py index a63df8f..f5ece43 100644 --- a/plate_simulation/logger.py +++ b/plate_simulation/logger.py @@ -1,5 +1,5 @@ # '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -# Copyright (c) 2024 Mira Geoscience Ltd. ' +# Copyright (c) 2024-2025 Mira Geoscience Ltd. ' # ' # This file is part of plate-simulation package. ' # ' diff --git a/plate_simulation/mesh/__init__.py b/plate_simulation/mesh/__init__.py index ff14e25..83935c2 100644 --- a/plate_simulation/mesh/__init__.py +++ b/plate_simulation/mesh/__init__.py @@ -1,5 +1,5 @@ # '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -# Copyright (c) 2024 Mira Geoscience Ltd. ' +# Copyright (c) 2024-2025 Mira Geoscience Ltd. ' # ' # This file is part of plate-simulation package. ' # ' diff --git a/plate_simulation/mesh/params.py b/plate_simulation/mesh/params.py index 680b5ec..6fb97d7 100644 --- a/plate_simulation/mesh/params.py +++ b/plate_simulation/mesh/params.py @@ -1,5 +1,5 @@ # '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -# Copyright (c) 2024 Mira Geoscience Ltd. ' +# Copyright (c) 2024-2025 Mira Geoscience Ltd. ' # ' # This file is part of plate-simulation package. ' # ' diff --git a/plate_simulation/models/__init__.py b/plate_simulation/models/__init__.py index ff14e25..83935c2 100644 --- a/plate_simulation/models/__init__.py +++ b/plate_simulation/models/__init__.py @@ -1,5 +1,5 @@ # '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -# Copyright (c) 2024 Mira Geoscience Ltd. ' +# Copyright (c) 2024-2025 Mira Geoscience Ltd. ' # ' # This file is part of plate-simulation package. ' # ' diff --git a/plate_simulation/models/events.py b/plate_simulation/models/events.py index d7d12f2..04d748f 100644 --- a/plate_simulation/models/events.py +++ b/plate_simulation/models/events.py @@ -1,5 +1,5 @@ # '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -# Copyright (c) 2024 Mira Geoscience Ltd. ' +# Copyright (c) 2024-2025 Mira Geoscience Ltd. ' # ' # This file is part of plate-simulation package. ' # ' diff --git a/plate_simulation/models/params.py b/plate_simulation/models/params.py index 6da971e..3126c75 100644 --- a/plate_simulation/models/params.py +++ b/plate_simulation/models/params.py @@ -1,5 +1,5 @@ # '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -# Copyright (c) 2024 Mira Geoscience Ltd. ' +# Copyright (c) 2024-2025 Mira Geoscience Ltd. ' # ' # This file is part of plate-simulation package. ' # ' @@ -10,7 +10,7 @@ from typing import TypeVar import numpy as np -from geoh5py.objects import ObjectBase, Surface +from geoh5py.objects import Points, Surface from pydantic import ( BaseModel, ConfigDict, @@ -87,7 +87,7 @@ def halfplate(self): def center( self, - survey: ObjectBase, + survey: Points, surface: Surface, depth_offset: float = 0.0, ) -> list[float]: @@ -100,7 +100,7 @@ def center( """ return [*self._get_xy(survey), self._get_z(surface, depth_offset)] - def _get_xy(self, survey: ObjectBase) -> list[float]: + def _get_xy(self, survey: Points) -> list[float]: """Return true or relative locations in x and y.""" if self.relative_locations: xy = [ diff --git a/plate_simulation/models/plates.py b/plate_simulation/models/plates.py index b65a2e5..e3cbafe 100644 --- a/plate_simulation/models/plates.py +++ b/plate_simulation/models/plates.py @@ -1,5 +1,5 @@ # '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -# Copyright (c) 2024 Mira Geoscience Ltd. ' +# Copyright (c) 2024-2025 Mira Geoscience Ltd. ' # ' # This file is part of plate-simulation package. ' # ' diff --git a/plate_simulation/models/series.py b/plate_simulation/models/series.py index ae2d336..4e5250d 100644 --- a/plate_simulation/models/series.py +++ b/plate_simulation/models/series.py @@ -1,5 +1,5 @@ # '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -# Copyright (c) 2024 Mira Geoscience Ltd. ' +# Copyright (c) 2024-2025 Mira Geoscience Ltd. ' # ' # This file is part of plate-simulation package. ' # ' diff --git a/plate_simulation/params.py b/plate_simulation/params.py index 15ffbd4..9f8e276 100644 --- a/plate_simulation/params.py +++ b/plate_simulation/params.py @@ -1,5 +1,5 @@ # '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -# Copyright (c) 2024 Mira Geoscience Ltd. ' +# Copyright (c) 2024-2025 Mira Geoscience Ltd. ' # ' # This file is part of plate-simulation package. ' # ' diff --git a/plate_simulation/utils.py b/plate_simulation/utils.py index fd0e606..c9e743e 100644 --- a/plate_simulation/utils.py +++ b/plate_simulation/utils.py @@ -1,5 +1,5 @@ # '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -# Copyright (c) 2024 Mira Geoscience Ltd. ' +# Copyright (c) 2024-2025 Mira Geoscience Ltd. ' # ' # This file is part of plate-simulation package. ' # ' diff --git a/tests/__init__.py b/tests/__init__.py index e9ed15c..5355ec9 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,5 +1,5 @@ # '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -# Copyright (c) 2022-2024 Mira Geoscience Ltd. ' +# Copyright (c) 2022-2025 Mira Geoscience Ltd. ' # ' # This file is part of plate-simulation package. ' # ' diff --git a/tests/assets_path_test.py b/tests/assets_path_test.py index 83aaa67..034cafb 100644 --- a/tests/assets_path_test.py +++ b/tests/assets_path_test.py @@ -1,5 +1,5 @@ # '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -# Copyright (c) 2024 Mira Geoscience Ltd. ' +# Copyright (c) 2024-2025 Mira Geoscience Ltd. ' # ' # This file is part of plate-simulation package. ' # ' diff --git a/tests/models/__init__.py b/tests/models/__init__.py index d05e214..5709a88 100644 --- a/tests/models/__init__.py +++ b/tests/models/__init__.py @@ -1,5 +1,5 @@ # '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -# Copyright (c) 2024 Mira Geoscience Ltd. ' +# Copyright (c) 2024-2025 Mira Geoscience Ltd. ' # ' # This file is part of plate-simulation package. ' # ' diff --git a/tests/models/events_test.py b/tests/models/events_test.py index 118c3a1..b689043 100644 --- a/tests/models/events_test.py +++ b/tests/models/events_test.py @@ -1,5 +1,5 @@ # '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -# Copyright (c) 2024 Mira Geoscience Ltd. ' +# Copyright (c) 2024-2025 Mira Geoscience Ltd. ' # ' # This file is part of plate-simulation package. ' # ' diff --git a/tests/models/params_test.py b/tests/models/params_test.py index d14c997..46e1472 100644 --- a/tests/models/params_test.py +++ b/tests/models/params_test.py @@ -1,5 +1,5 @@ # '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -# Copyright (c) 2024 Mira Geoscience Ltd. ' +# Copyright (c) 2024-2025 Mira Geoscience Ltd. ' # ' # This file is part of plate-simulation package. ' # ' diff --git a/tests/models/plates_test.py b/tests/models/plates_test.py index 27f1cec..71af677 100644 --- a/tests/models/plates_test.py +++ b/tests/models/plates_test.py @@ -1,5 +1,5 @@ # '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -# Copyright (c) 2024 Mira Geoscience Ltd. ' +# Copyright (c) 2024-2025 Mira Geoscience Ltd. ' # ' # This file is part of plate-simulation package. ' # ' diff --git a/tests/models/series_test.py b/tests/models/series_test.py index dc77cbd..822d5f1 100644 --- a/tests/models/series_test.py +++ b/tests/models/series_test.py @@ -1,5 +1,5 @@ # '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -# Copyright (c) 2024 Mira Geoscience Ltd. ' +# Copyright (c) 2024-2025 Mira Geoscience Ltd. ' # ' # This file is part of plate-simulation package. ' # ' diff --git a/tests/runtest/__init__.py b/tests/runtest/__init__.py index baa5103..5925972 100644 --- a/tests/runtest/__init__.py +++ b/tests/runtest/__init__.py @@ -1,5 +1,5 @@ # '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -# Copyright (c) 2024 Mira Geoscience Ltd. ' +# Copyright (c) 2024-2025 Mira Geoscience Ltd. ' # ' # This file is part of plate-simulation package. ' # ' diff --git a/tests/runtest/driver_test.py b/tests/runtest/driver_test.py index 9120114..fdfbcf0 100644 --- a/tests/runtest/driver_test.py +++ b/tests/runtest/driver_test.py @@ -1,5 +1,5 @@ # '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -# Copyright (c) 2024 Mira Geoscience Ltd. ' +# Copyright (c) 2024-2025 Mira Geoscience Ltd. ' # ' # This file is part of plate-simulation package. ' # ' @@ -111,11 +111,13 @@ def test_plate_simulation(tmp_path): mesh = next(obj for obj in out_group.children if isinstance(obj, Octree)) model = next(k for k in mesh.children if k.name == "starting_model") + assert data.property_groups is not None assert len(data.property_groups) == 3 assert all( k.name in [f"Iteration_0_{i}" for i in "xyz"] for k in data.property_groups ) - assert all(len(k.properties) == 20 for k in data.property_groups) + assert all(k.properties is not None for k in data.property_groups) + assert all(len(k.properties) == 20 for k in data.property_groups) # type: ignore assert mesh.n_cells == 14555 assert len(np.unique(model.values)) == 4 assert all( diff --git a/tests/runtest/gravity_test.py b/tests/runtest/gravity_test.py index 551c72f..1cc9002 100644 --- a/tests/runtest/gravity_test.py +++ b/tests/runtest/gravity_test.py @@ -1,5 +1,5 @@ # '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -# Copyright (c) 2024 Mira Geoscience Ltd. ' +# Copyright (c) 2024-2025 Mira Geoscience Ltd. ' # ' # This file is part of plate-simulation package. ' # ' diff --git a/tests/utils/__init__.py b/tests/utils/__init__.py index ff14e25..83935c2 100644 --- a/tests/utils/__init__.py +++ b/tests/utils/__init__.py @@ -1,5 +1,5 @@ # '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -# Copyright (c) 2024 Mira Geoscience Ltd. ' +# Copyright (c) 2024-2025 Mira Geoscience Ltd. ' # ' # This file is part of plate-simulation package. ' # ' diff --git a/tests/utils/utils_test.py b/tests/utils/utils_test.py index 210e193..54316da 100644 --- a/tests/utils/utils_test.py +++ b/tests/utils/utils_test.py @@ -1,5 +1,5 @@ # '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -# Copyright (c) 2024 Mira Geoscience Ltd. ' +# Copyright (c) 2024-2025 Mira Geoscience Ltd. ' # ' # This file is part of plate-simulation package. ' # ' diff --git a/tests/version_test.py b/tests/version_test.py index 420d7a0..65a97dc 100644 --- a/tests/version_test.py +++ b/tests/version_test.py @@ -1,5 +1,5 @@ # '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -# Copyright (c) 2022-2024 Mira Geoscience Ltd. ' +# Copyright (c) 2022-2025 Mira Geoscience Ltd. ' # ' # This file is part of plate-simulation package. ' # '