diff --git a/polytope/__init__.py b/polytope_feature/__init__.py similarity index 100% rename from polytope/__init__.py rename to polytope_feature/__init__.py diff --git a/polytope/datacube/__init__.py b/polytope_feature/datacube/__init__.py similarity index 100% rename from polytope/datacube/__init__.py rename to polytope_feature/datacube/__init__.py diff --git a/polytope/datacube/backends/__init__.py b/polytope_feature/datacube/backends/__init__.py similarity index 100% rename from polytope/datacube/backends/__init__.py rename to polytope_feature/datacube/backends/__init__.py diff --git a/polytope/datacube/backends/datacube.py b/polytope_feature/datacube/backends/datacube.py similarity index 100% rename from polytope/datacube/backends/datacube.py rename to polytope_feature/datacube/backends/datacube.py diff --git a/polytope/datacube/backends/fdb.py b/polytope_feature/datacube/backends/fdb.py similarity index 100% rename from polytope/datacube/backends/fdb.py rename to polytope_feature/datacube/backends/fdb.py diff --git a/polytope/datacube/backends/mock.py b/polytope_feature/datacube/backends/mock.py similarity index 100% rename from polytope/datacube/backends/mock.py rename to polytope_feature/datacube/backends/mock.py diff --git a/polytope/datacube/backends/xarray.py b/polytope_feature/datacube/backends/xarray.py similarity index 100% rename from polytope/datacube/backends/xarray.py rename to polytope_feature/datacube/backends/xarray.py diff --git a/polytope/datacube/datacube_axis.py b/polytope_feature/datacube/datacube_axis.py similarity index 100% rename from polytope/datacube/datacube_axis.py rename to polytope_feature/datacube/datacube_axis.py diff --git a/polytope/datacube/index_tree.proto b/polytope_feature/datacube/index_tree.proto similarity index 100% rename from polytope/datacube/index_tree.proto rename to polytope_feature/datacube/index_tree.proto diff --git a/polytope/datacube/index_tree_pb2.py b/polytope_feature/datacube/index_tree_pb2.py similarity index 100% rename from polytope/datacube/index_tree_pb2.py rename to polytope_feature/datacube/index_tree_pb2.py diff --git a/polytope/datacube/tensor_index_tree.py b/polytope_feature/datacube/tensor_index_tree.py similarity index 100% rename from polytope/datacube/tensor_index_tree.py rename to polytope_feature/datacube/tensor_index_tree.py diff --git a/polytope/datacube/transformations/__init__.py b/polytope_feature/datacube/transformations/__init__.py similarity index 100% rename from polytope/datacube/transformations/__init__.py rename to polytope_feature/datacube/transformations/__init__.py diff --git a/polytope/datacube/transformations/datacube_cyclic/__init__.py b/polytope_feature/datacube/transformations/datacube_cyclic/__init__.py similarity index 100% rename from polytope/datacube/transformations/datacube_cyclic/__init__.py rename to polytope_feature/datacube/transformations/datacube_cyclic/__init__.py diff --git a/polytope/datacube/transformations/datacube_cyclic/datacube_cyclic.py b/polytope_feature/datacube/transformations/datacube_cyclic/datacube_cyclic.py similarity index 100% rename from polytope/datacube/transformations/datacube_cyclic/datacube_cyclic.py rename to polytope_feature/datacube/transformations/datacube_cyclic/datacube_cyclic.py diff --git a/polytope/datacube/transformations/datacube_mappers/__init__.py b/polytope_feature/datacube/transformations/datacube_mappers/__init__.py similarity index 100% rename from polytope/datacube/transformations/datacube_mappers/__init__.py rename to polytope_feature/datacube/transformations/datacube_mappers/__init__.py diff --git a/polytope/datacube/transformations/datacube_mappers/datacube_mappers.py b/polytope_feature/datacube/transformations/datacube_mappers/datacube_mappers.py similarity index 97% rename from polytope/datacube/transformations/datacube_mappers/datacube_mappers.py rename to polytope_feature/datacube/transformations/datacube_mappers/datacube_mappers.py index 685f3a3b1..e6efe6818 100644 --- a/polytope/datacube/transformations/datacube_mappers/datacube_mappers.py +++ b/polytope_feature/datacube/transformations/datacube_mappers/datacube_mappers.py @@ -27,7 +27,7 @@ def __init__(self, name, mapper_options): def generate_final_transformation(self): map_type = _type_to_datacube_mapper_lookup[self.grid_type] - module = import_module("polytope.datacube.transformations.datacube_mappers.mapper_types." + self.grid_type) + module = import_module("polytope_feature.datacube.transformations.datacube_mappers.mapper_types." + self.grid_type) constructor = getattr(module, map_type) transformation = deepcopy( constructor(self.old_axis, self.grid_axes, self.grid_resolution, self.local_area, self._axis_reversed) diff --git a/polytope/datacube/transformations/datacube_mappers/mapper_types/__init__.py b/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/__init__.py similarity index 100% rename from polytope/datacube/transformations/datacube_mappers/mapper_types/__init__.py rename to polytope_feature/datacube/transformations/datacube_mappers/mapper_types/__init__.py diff --git a/polytope/datacube/transformations/datacube_mappers/mapper_types/healpix.py b/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/healpix.py similarity index 100% rename from polytope/datacube/transformations/datacube_mappers/mapper_types/healpix.py rename to polytope_feature/datacube/transformations/datacube_mappers/mapper_types/healpix.py diff --git a/polytope/datacube/transformations/datacube_mappers/mapper_types/healpix_nested.py b/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/healpix_nested.py similarity index 100% rename from polytope/datacube/transformations/datacube_mappers/mapper_types/healpix_nested.py rename to polytope_feature/datacube/transformations/datacube_mappers/mapper_types/healpix_nested.py diff --git a/polytope/datacube/transformations/datacube_mappers/mapper_types/local_regular.py b/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/local_regular.py similarity index 100% rename from polytope/datacube/transformations/datacube_mappers/mapper_types/local_regular.py rename to polytope_feature/datacube/transformations/datacube_mappers/mapper_types/local_regular.py diff --git a/polytope/datacube/transformations/datacube_mappers/mapper_types/octahedral.py b/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/octahedral.py similarity index 100% rename from polytope/datacube/transformations/datacube_mappers/mapper_types/octahedral.py rename to polytope_feature/datacube/transformations/datacube_mappers/mapper_types/octahedral.py diff --git a/polytope/datacube/transformations/datacube_mappers/mapper_types/reduced_ll.py b/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/reduced_ll.py similarity index 100% rename from polytope/datacube/transformations/datacube_mappers/mapper_types/reduced_ll.py rename to polytope_feature/datacube/transformations/datacube_mappers/mapper_types/reduced_ll.py diff --git a/polytope/datacube/transformations/datacube_mappers/mapper_types/regular.py b/polytope_feature/datacube/transformations/datacube_mappers/mapper_types/regular.py similarity index 100% rename from polytope/datacube/transformations/datacube_mappers/mapper_types/regular.py rename to polytope_feature/datacube/transformations/datacube_mappers/mapper_types/regular.py diff --git a/polytope/datacube/transformations/datacube_merger/__init__.py b/polytope_feature/datacube/transformations/datacube_merger/__init__.py similarity index 100% rename from polytope/datacube/transformations/datacube_merger/__init__.py rename to polytope_feature/datacube/transformations/datacube_merger/__init__.py diff --git a/polytope/datacube/transformations/datacube_merger/datacube_merger.py b/polytope_feature/datacube/transformations/datacube_merger/datacube_merger.py similarity index 100% rename from polytope/datacube/transformations/datacube_merger/datacube_merger.py rename to polytope_feature/datacube/transformations/datacube_merger/datacube_merger.py diff --git a/polytope/datacube/transformations/datacube_reverse/__init__.py b/polytope_feature/datacube/transformations/datacube_reverse/__init__.py similarity index 100% rename from polytope/datacube/transformations/datacube_reverse/__init__.py rename to polytope_feature/datacube/transformations/datacube_reverse/__init__.py diff --git a/polytope/datacube/transformations/datacube_reverse/datacube_reverse.py b/polytope_feature/datacube/transformations/datacube_reverse/datacube_reverse.py similarity index 100% rename from polytope/datacube/transformations/datacube_reverse/datacube_reverse.py rename to polytope_feature/datacube/transformations/datacube_reverse/datacube_reverse.py diff --git a/polytope/datacube/transformations/datacube_transformations.py b/polytope_feature/datacube/transformations/datacube_transformations.py similarity index 96% rename from polytope/datacube/transformations/datacube_transformations.py rename to polytope_feature/datacube/transformations/datacube_transformations.py index 4212d7dd1..f174bf1aa 100644 --- a/polytope/datacube/transformations/datacube_transformations.py +++ b/polytope_feature/datacube/transformations/datacube_transformations.py @@ -12,7 +12,7 @@ def create_transform(name, transformation_type_key, transformation_options): transformation_type = _type_to_datacube_transformation_lookup[transformation_type_key] transformation_file_name = _type_to_transformation_file_lookup[transformation_type_key] file_name = ".datacube_" + transformation_file_name - module = import_module("polytope.datacube.transformations" + file_name + file_name) + module = import_module("polytope_feature.datacube.transformations" + file_name + file_name) constructor = getattr(module, transformation_type) transformation_type_option = transformation_options new_transformation = deepcopy(constructor(name, transformation_type_option)) diff --git a/polytope/datacube/transformations/datacube_type_change/__init__.py b/polytope_feature/datacube/transformations/datacube_type_change/__init__.py similarity index 100% rename from polytope/datacube/transformations/datacube_type_change/__init__.py rename to polytope_feature/datacube/transformations/datacube_type_change/__init__.py diff --git a/polytope/datacube/transformations/datacube_type_change/datacube_type_change.py b/polytope_feature/datacube/transformations/datacube_type_change/datacube_type_change.py similarity index 95% rename from polytope/datacube/transformations/datacube_type_change/datacube_type_change.py rename to polytope_feature/datacube/transformations/datacube_type_change/datacube_type_change.py index 8cbf2c44e..7d6cc4cd2 100644 --- a/polytope/datacube/transformations/datacube_type_change/datacube_type_change.py +++ b/polytope_feature/datacube/transformations/datacube_type_change/datacube_type_change.py @@ -15,7 +15,7 @@ def __init__(self, name, type_options): def generate_final_transformation(self): map_type = _type_to_datacube_type_change_lookup[self.new_type] - module = import_module("polytope.datacube.transformations.datacube_type_change.datacube_type_change") + module = import_module("polytope_feature.datacube.transformations.datacube_type_change.datacube_type_change") constructor = getattr(module, map_type) transformation = deepcopy(constructor(self.name, self.new_type)) return transformation diff --git a/polytope/datacube/tree_encoding.py b/polytope_feature/datacube/tree_encoding.py similarity index 100% rename from polytope/datacube/tree_encoding.py rename to polytope_feature/datacube/tree_encoding.py diff --git a/polytope/engine/__init__.py b/polytope_feature/engine/__init__.py similarity index 100% rename from polytope/engine/__init__.py rename to polytope_feature/engine/__init__.py diff --git a/polytope/engine/engine.py b/polytope_feature/engine/engine.py similarity index 100% rename from polytope/engine/engine.py rename to polytope_feature/engine/engine.py diff --git a/polytope/engine/hullslicer.py b/polytope_feature/engine/hullslicer.py similarity index 100% rename from polytope/engine/hullslicer.py rename to polytope_feature/engine/hullslicer.py diff --git a/polytope/options.py b/polytope_feature/options.py similarity index 100% rename from polytope/options.py rename to polytope_feature/options.py diff --git a/polytope/polytope.py b/polytope_feature/polytope.py similarity index 100% rename from polytope/polytope.py rename to polytope_feature/polytope.py diff --git a/polytope/shapes.py b/polytope_feature/shapes.py similarity index 100% rename from polytope/shapes.py rename to polytope_feature/shapes.py diff --git a/polytope/utility/__init__.py b/polytope_feature/utility/__init__.py similarity index 100% rename from polytope/utility/__init__.py rename to polytope_feature/utility/__init__.py diff --git a/polytope/utility/combinatorics.py b/polytope_feature/utility/combinatorics.py similarity index 100% rename from polytope/utility/combinatorics.py rename to polytope_feature/utility/combinatorics.py diff --git a/polytope/utility/exceptions.py b/polytope_feature/utility/exceptions.py similarity index 100% rename from polytope/utility/exceptions.py rename to polytope_feature/utility/exceptions.py diff --git a/polytope/utility/geometry.py b/polytope_feature/utility/geometry.py similarity index 100% rename from polytope/utility/geometry.py rename to polytope_feature/utility/geometry.py diff --git a/polytope/utility/list_tools.py b/polytope_feature/utility/list_tools.py similarity index 100% rename from polytope/utility/list_tools.py rename to polytope_feature/utility/list_tools.py diff --git a/polytope/utility/profiling.py b/polytope_feature/utility/profiling.py similarity index 100% rename from polytope/utility/profiling.py rename to polytope_feature/utility/profiling.py diff --git a/polytope/version.py b/polytope_feature/version.py similarity index 100% rename from polytope/version.py rename to polytope_feature/version.py diff --git a/setup.py b/setup.py index 005e76dfd..06c058056 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ __version__ = re.search( r'__version__\s*=\s*[\'"]([^\'"]*)[\'"]', - io.open("polytope/version.py", encoding="utf_8_sig").read(), + io.open("polytope_feature/version.py", encoding="utf_8_sig").read(), ).group(1) with open("requirements.txt") as f: diff --git a/tests/test_axis_mappers.py b/tests/test_axis_mappers.py index c1dc0cd24..b500b9a03 100644 --- a/tests/test_axis_mappers.py +++ b/tests/test_axis_mappers.py @@ -1,13 +1,13 @@ import pandas as pd -from polytope.datacube.datacube_axis import ( +from polytope_feature.datacube.datacube_axis import ( DatacubeAxisCyclic, FloatDatacubeAxis, IntDatacubeAxis, PandasTimedeltaDatacubeAxis, PandasTimestampDatacubeAxis, ) -from polytope.options import PolytopeOptions +from polytope_feature.options import PolytopeOptions class TestAxisMappers: diff --git a/tests/test_combinatorics.py b/tests/test_combinatorics.py index 980ad8e2c..0e4798720 100644 --- a/tests/test_combinatorics.py +++ b/tests/test_combinatorics.py @@ -1,9 +1,9 @@ import numpy as np import pytest -from polytope import ConvexPolytope -from polytope.utility.combinatorics import group, tensor_product, validate_axes -from polytope.utility.exceptions import ( +from polytope_feature import ConvexPolytope +from polytope_feature.utility.combinatorics import group, tensor_product, validate_axes +from polytope_feature.utility.exceptions import ( AxisNotFoundError, AxisOverdefinedError, AxisUnderdefinedError, diff --git a/tests/test_cyclic_axis_over_negative_vals.py b/tests/test_cyclic_axis_over_negative_vals.py index b95a044ff..37bddd75f 100644 --- a/tests/test_cyclic_axis_over_negative_vals.py +++ b/tests/test_cyclic_axis_over_negative_vals.py @@ -2,9 +2,9 @@ import pandas as pd import xarray as xr -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Box, Select +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Box, Select class TestSlicingCyclicAxisNegVals: diff --git a/tests/test_cyclic_axis_slicer_not_0.py b/tests/test_cyclic_axis_slicer_not_0.py index ec041263d..84d36d9ce 100644 --- a/tests/test_cyclic_axis_slicer_not_0.py +++ b/tests/test_cyclic_axis_slicer_not_0.py @@ -2,9 +2,9 @@ import pandas as pd import xarray as xr -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Box, Select +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Box, Select class TestSlicingCyclicAxisNotOverZero: diff --git a/tests/test_cyclic_axis_slicing.py b/tests/test_cyclic_axis_slicing.py index 3bccf2801..3f8d53e8d 100644 --- a/tests/test_cyclic_axis_slicing.py +++ b/tests/test_cyclic_axis_slicing.py @@ -2,9 +2,9 @@ import pandas as pd import xarray as xr -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Box, Select +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Box, Select class TestSlicingCyclic: diff --git a/tests/test_cyclic_nearest.py b/tests/test_cyclic_nearest.py index fbf7f2996..86e37c69c 100644 --- a/tests/test_cyclic_nearest.py +++ b/tests/test_cyclic_nearest.py @@ -3,9 +3,9 @@ from eccodes import codes_grib_find_nearest, codes_grib_new_from_file from helper_functions import download_test_data -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Point, Select +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Point, Select class TestRegularGrid: diff --git a/tests/test_cyclic_simple.py b/tests/test_cyclic_simple.py index 9913872cc..d9974b7e7 100644 --- a/tests/test_cyclic_simple.py +++ b/tests/test_cyclic_simple.py @@ -2,9 +2,9 @@ import pandas as pd import xarray as xr -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Box, Select +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Box, Select class TestSlicing3DXarrayDatacube: diff --git a/tests/test_cyclic_snapping.py b/tests/test_cyclic_snapping.py index ac149db2d..599dc9573 100644 --- a/tests/test_cyclic_snapping.py +++ b/tests/test_cyclic_snapping.py @@ -1,8 +1,8 @@ import xarray as xr -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Select +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Select class TestSlicing3DXarrayDatacube: diff --git a/tests/test_datacube_axes_init.py b/tests/test_datacube_axes_init.py index c02c44f84..702374de8 100644 --- a/tests/test_datacube_axes_init.py +++ b/tests/test_datacube_axes_init.py @@ -2,10 +2,10 @@ from earthkit import data from helper_functions import download_test_data -from polytope.datacube.datacube_axis import FloatDatacubeAxis -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Box, Select +from polytope_feature.datacube.datacube_axis import FloatDatacubeAxis +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Box, Select class TestInitDatacubeAxes: diff --git a/tests/test_datacube_mock.py b/tests/test_datacube_mock.py index 0b147b95c..b941af1d3 100644 --- a/tests/test_datacube_mock.py +++ b/tests/test_datacube_mock.py @@ -1,7 +1,7 @@ import pytest -from polytope.datacube.backends.mock import MockDatacube -from polytope.utility.exceptions import AxisNotFoundError, AxisOverdefinedError +from polytope_feature.datacube.backends.mock import MockDatacube +from polytope_feature.utility.exceptions import AxisNotFoundError, AxisOverdefinedError class TestMockDatacube: diff --git a/tests/test_datacube_xarray.py b/tests/test_datacube_xarray.py index 362937cdd..f15a4f8bc 100644 --- a/tests/test_datacube_xarray.py +++ b/tests/test_datacube_xarray.py @@ -5,14 +5,14 @@ import pytest import xarray as xr -from polytope.datacube import Datacube, DatacubePath -from polytope.datacube.backends.xarray import XArrayDatacube -from polytope.datacube.datacube_axis import ( +from polytope_feature.datacube import Datacube, DatacubePath +from polytope_feature.datacube.backends.xarray import XArrayDatacube +from polytope_feature.datacube.datacube_axis import ( FloatDatacubeAxis, IntDatacubeAxis, PandasTimestampDatacubeAxis, ) -from polytope.utility.exceptions import AxisNotFoundError, AxisOverdefinedError +from polytope_feature.utility.exceptions import AxisNotFoundError, AxisOverdefinedError class TestXarrayDatacube: diff --git a/tests/test_ecmwf_oper_data_fdb.py b/tests/test_ecmwf_oper_data_fdb.py index c08674638..e848716c8 100644 --- a/tests/test_ecmwf_oper_data_fdb.py +++ b/tests/test_ecmwf_oper_data_fdb.py @@ -1,9 +1,9 @@ import pandas as pd import pytest -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Box, Point, Select, Span +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Box, Point, Select, Span class TestSlicingFDBDatacube: diff --git a/tests/test_engine_slicer.py b/tests/test_engine_slicer.py index 5e79479e3..3392ccd3a 100644 --- a/tests/test_engine_slicer.py +++ b/tests/test_engine_slicer.py @@ -1,6 +1,6 @@ -from polytope.datacube.backends.mock import MockDatacube -from polytope.engine.hullslicer import HullSlicer -from polytope.shapes import Box, Polygon +from polytope_feature.datacube.backends.mock import MockDatacube +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.shapes import Box, Polygon class TestEngineSlicer: diff --git a/tests/test_fdb_datacube.py b/tests/test_fdb_datacube.py index 777e60f42..301ceec30 100644 --- a/tests/test_fdb_datacube.py +++ b/tests/test_fdb_datacube.py @@ -1,9 +1,9 @@ import pandas as pd import pytest -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Box, Select, Span +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Box, Select, Span # import geopandas as gpd # import matplotlib.pyplot as plt diff --git a/tests/test_fdb_unmap_tree.py b/tests/test_fdb_unmap_tree.py index bfc71f1ee..a9dcf9cbe 100644 --- a/tests/test_fdb_unmap_tree.py +++ b/tests/test_fdb_unmap_tree.py @@ -1,9 +1,9 @@ import pandas as pd import pytest -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Box, Select +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Box, Select class TestSlicingFDBDatacube: diff --git a/tests/test_float_type.py b/tests/test_float_type.py index 222ce458a..51df70df8 100644 --- a/tests/test_float_type.py +++ b/tests/test_float_type.py @@ -2,9 +2,9 @@ import pytest import xarray as xr -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Select, Span +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Select, Span class TestFloatType: diff --git a/tests/test_healpix_mapper.py b/tests/test_healpix_mapper.py index f99d5dc6e..a7b82877c 100644 --- a/tests/test_healpix_mapper.py +++ b/tests/test_healpix_mapper.py @@ -2,12 +2,12 @@ from earthkit import data from helper_functions import download_test_data, find_nearest_latlon -from polytope.datacube.transformations.datacube_mappers.mapper_types.healpix import ( +from polytope_feature.datacube.transformations.datacube_mappers.mapper_types.healpix import ( HealpixGridMapper, ) -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Box, Select +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Box, Select class TestHealpixGrid: diff --git a/tests/test_healpix_nested_grid.py b/tests/test_healpix_nested_grid.py index 8d2108521..225b16206 100644 --- a/tests/test_healpix_nested_grid.py +++ b/tests/test_healpix_nested_grid.py @@ -3,12 +3,12 @@ import pandas as pd import pytest -from polytope.datacube.transformations.datacube_mappers.mapper_types.healpix_nested import ( +from polytope_feature.datacube.transformations.datacube_mappers.mapper_types.healpix_nested import ( NestedHealpixGridMapper, ) -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Box, Select +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Box, Select class TestHealpixNestedGrid: diff --git a/tests/test_hull_slicer.py b/tests/test_hull_slicer.py index e733612f7..c05ca5814 100644 --- a/tests/test_hull_slicer.py +++ b/tests/test_hull_slicer.py @@ -2,15 +2,15 @@ import pytest -import polytope.engine.hullslicer -from polytope import ConvexPolytope -from polytope.datacube.backends.mock import MockDatacube -from polytope.utility.profiling import benchmark +from polytope_feature import ConvexPolytope +from polytope_feature.datacube.backends.mock import MockDatacube +from polytope_feature.engine.hullslicer import HullSlicer, slice +from polytope_feature.utility.profiling import benchmark class TestHullSlicer: def setup_method(self, method): - self.slicer = polytope.engine.hullslicer.HullSlicer() + self.slicer = HullSlicer() def construct_nd_cube(self, dimension, lower=-1, upper=1): axes = [str(chr(97 + ax)) for ax in range(dimension)] @@ -20,9 +20,9 @@ def construct_nd_cube(self, dimension, lower=-1, upper=1): def test_3D(self): p3 = self.construct_nd_cube(3) print(p3) - p2 = polytope.engine.hullslicer.slice(p3, "c", 0.5, 2) + p2 = slice(p3, "c", 0.5, 2) print(p2) - p1 = polytope.engine.hullslicer.slice(p2, "b", 0.5, 1) + p1 = slice(p2, "b", 0.5, 1) print(p1) @pytest.mark.skip(reason="This is too slow.") @@ -30,7 +30,7 @@ def test_4D(self): p = self.construct_nd_cube(4) print(p) while len(p.axes()) > 1: - p = polytope.engine.hullslicer.slice(p, p._axes[-1], 0.5, -1) + p = slice(p, p._axes[-1], 0.5, -1) print(p) @pytest.mark.skip(reason="This is too slow.") @@ -38,22 +38,22 @@ def test_ND(self): with benchmark("4D"): p = self.construct_nd_cube(4) while len(p.axes()) > 1: - p = polytope.engine.hullslicer.slice(p, p._axes[-1], 0.5, -1) + p = slice(p, p._axes[-1], 0.5, -1) with benchmark("5D"): p = self.construct_nd_cube(5) while len(p.axes()) > 1: - p = polytope.engine.hullslicer.slice(p, p._axes[-1], 0.5, -1) + p = slice(p, p._axes[-1], 0.5, -1) with benchmark("6D"): p = self.construct_nd_cube(6) while len(p.axes()) > 1: - p = polytope.engine.hullslicer.slice(p, p._axes[-1], 0.5, -1) + p = slice(p, p._axes[-1], 0.5, -1) with benchmark("7D"): p = self.construct_nd_cube(7) while len(p.axes()) > 1: - p = polytope.engine.hullslicer.slice(p, p._axes[-1], 0.5, -1) + p = slice(p, p._axes[-1], 0.5, -1) # QHull is not performant above 7D as per its documentation # with benchmark("8D"): diff --git a/tests/test_hullslicer_engine.py b/tests/test_hullslicer_engine.py index 148025323..198b96b25 100644 --- a/tests/test_hullslicer_engine.py +++ b/tests/test_hullslicer_engine.py @@ -1,11 +1,11 @@ import numpy as np import xarray as xr -from polytope.datacube.backends.xarray import XArrayDatacube -from polytope.datacube.tensor_index_tree import TensorIndexTree -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope -from polytope.shapes import Box +from polytope_feature.datacube.backends.xarray import XArrayDatacube +from polytope_feature.datacube.tensor_index_tree import TensorIndexTree +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope +from polytope_feature.shapes import Box class TestSlicerComponents: diff --git a/tests/test_incomplete_tree_fdb.py b/tests/test_incomplete_tree_fdb.py index b863dac2a..2fbfcaf28 100644 --- a/tests/test_incomplete_tree_fdb.py +++ b/tests/test_incomplete_tree_fdb.py @@ -2,9 +2,9 @@ import pytest from helper_functions import download_test_data -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Select +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Select class TestRegularGrid: diff --git a/tests/test_local_grid_cyclic.py b/tests/test_local_grid_cyclic.py index ec90f8e48..376f1e4a5 100644 --- a/tests/test_local_grid_cyclic.py +++ b/tests/test_local_grid_cyclic.py @@ -1,9 +1,9 @@ import pandas as pd import pytest -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Point, Select +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Point, Select class TestSlicingFDBDatacube: diff --git a/tests/test_local_regular_grid.py b/tests/test_local_regular_grid.py index e279720c9..023c2dbdc 100644 --- a/tests/test_local_regular_grid.py +++ b/tests/test_local_regular_grid.py @@ -1,9 +1,9 @@ import pandas as pd import pytest -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Point, Select +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Point, Select class TestSlicingFDBDatacube: diff --git a/tests/test_local_swiss_grid.py b/tests/test_local_swiss_grid.py index 29001f7ad..34019e54f 100644 --- a/tests/test_local_swiss_grid.py +++ b/tests/test_local_swiss_grid.py @@ -4,9 +4,9 @@ import pytest from eccodes import codes_grib_find_nearest, codes_grib_new_from_file -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Box, Select +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Box, Select class TestSlicingFDBDatacube: diff --git a/tests/test_mappers.py b/tests/test_mappers.py index fb4783a33..3a2cb4fb4 100644 --- a/tests/test_mappers.py +++ b/tests/test_mappers.py @@ -1,4 +1,4 @@ -from polytope.datacube.transformations.datacube_mappers.mapper_types.octahedral import ( +from polytope_feature.datacube.transformations.datacube_mappers.mapper_types.octahedral import ( OctahedralGridMapper, ) diff --git a/tests/test_merge_cyclic_octahedral.py b/tests/test_merge_cyclic_octahedral.py index c44483a06..0997c806c 100644 --- a/tests/test_merge_cyclic_octahedral.py +++ b/tests/test_merge_cyclic_octahedral.py @@ -2,9 +2,9 @@ import pytest import xarray as xr -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Box, Select, Span +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Box, Select, Span class TestMultipleTransformations: diff --git a/tests/test_merge_octahedral_one_axis.py b/tests/test_merge_octahedral_one_axis.py index 86e466769..e62e0ca99 100644 --- a/tests/test_merge_octahedral_one_axis.py +++ b/tests/test_merge_octahedral_one_axis.py @@ -2,9 +2,9 @@ from earthkit import data from helper_functions import download_test_data -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Box, Select +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Box, Select class TestSlicingMultipleTransformationsOneAxis: diff --git a/tests/test_merge_transformation.py b/tests/test_merge_transformation.py index 61c3284ae..5d2311c35 100644 --- a/tests/test_merge_transformation.py +++ b/tests/test_merge_transformation.py @@ -2,9 +2,9 @@ import pandas as pd import xarray as xr -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Select +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Select class TestMergeTransformation: diff --git a/tests/test_multiple_param_fdb.py b/tests/test_multiple_param_fdb.py index b12f11443..11285af84 100644 --- a/tests/test_multiple_param_fdb.py +++ b/tests/test_multiple_param_fdb.py @@ -1,9 +1,9 @@ import pandas as pd import pytest -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Box, Select +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Box, Select class TestSlicingFDBDatacube: diff --git a/tests/test_octahedral_grid.py b/tests/test_octahedral_grid.py index 959f7ca64..abcdc543d 100644 --- a/tests/test_octahedral_grid.py +++ b/tests/test_octahedral_grid.py @@ -2,9 +2,9 @@ from earthkit import data from helper_functions import download_test_data, find_nearest_latlon -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Box, Select +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Box, Select class TestOctahedralGrid: diff --git a/tests/test_point_nearest.py b/tests/test_point_nearest.py index 75edf041b..b9fdc4bed 100644 --- a/tests/test_point_nearest.py +++ b/tests/test_point_nearest.py @@ -1,9 +1,9 @@ import pandas as pd import pytest -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Point, Select +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Point, Select class TestSlicingFDBDatacube: diff --git a/tests/test_point_shape.py b/tests/test_point_shape.py index 7b6d4c643..d4d6eb98f 100644 --- a/tests/test_point_shape.py +++ b/tests/test_point_shape.py @@ -2,9 +2,9 @@ import pandas as pd import xarray as xr -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Point, Select +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Point, Select class TestSlicing3DXarrayDatacube: diff --git a/tests/test_profiling_requesttree.py b/tests/test_profiling_requesttree.py index 6bd6afac2..670da7881 100644 --- a/tests/test_profiling_requesttree.py +++ b/tests/test_profiling_requesttree.py @@ -3,10 +3,10 @@ import pytest import xarray as xr -from polytope.datacube.backends.xarray import XArrayDatacube -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Box, Select +from polytope_feature.datacube.backends.xarray import XArrayDatacube +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Box, Select class TestProfiling: diff --git a/tests/test_reduced_ll_grid.py b/tests/test_reduced_ll_grid.py index d554e528e..b0a3535c4 100644 --- a/tests/test_reduced_ll_grid.py +++ b/tests/test_reduced_ll_grid.py @@ -5,9 +5,9 @@ from eccodes import codes_grib_find_nearest, codes_grib_new_from_file from helper_functions import download_test_data -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Box, Select +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Box, Select class TestReducedLatLonGrid: diff --git a/tests/test_regular_grid.py b/tests/test_regular_grid.py index a03c62545..4fbb13856 100644 --- a/tests/test_regular_grid.py +++ b/tests/test_regular_grid.py @@ -2,9 +2,9 @@ import pytest from helper_functions import download_test_data, find_nearest_latlon -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Disk, Select +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Disk, Select # import geopandas as gpd # import matplotlib.pyplot as plt @@ -91,7 +91,7 @@ def test_regular_grid(self): assert len(result.leaves[1].values) == 3 assert len(result.leaves[2].values) == 1 - from polytope.datacube.transformations.datacube_mappers.mapper_types.regular import ( + from polytope_feature.datacube.transformations.datacube_mappers.mapper_types.regular import ( RegularGridMapper, ) diff --git a/tests/test_request_tree.py b/tests/test_request_tree.py index ddd0463e4..038599724 100644 --- a/tests/test_request_tree.py +++ b/tests/test_request_tree.py @@ -1,7 +1,7 @@ from sortedcontainers import SortedList -from polytope.datacube.datacube_axis import IntDatacubeAxis -from polytope.datacube.tensor_index_tree import TensorIndexTree +from polytope_feature.datacube.datacube_axis import IntDatacubeAxis +from polytope_feature.datacube.tensor_index_tree import TensorIndexTree class TestIndexTree: diff --git a/tests/test_request_trees_after_slicing.py b/tests/test_request_trees_after_slicing.py index 3e7bf6dfb..2aa28b4a7 100644 --- a/tests/test_request_trees_after_slicing.py +++ b/tests/test_request_trees_after_slicing.py @@ -1,11 +1,11 @@ import numpy as np import xarray as xr -from polytope.datacube.backends.xarray import XArrayDatacube -from polytope.datacube.datacube_axis import IntDatacubeAxis -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope -from polytope.shapes import Box +from polytope_feature.datacube.backends.xarray import XArrayDatacube +from polytope_feature.datacube.datacube_axis import IntDatacubeAxis +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope +from polytope_feature.shapes import Box class TestIndexTreesAfterSlicing: diff --git a/tests/test_reverse_transformation.py b/tests/test_reverse_transformation.py index aa4b27fe1..f1d9b24ed 100644 --- a/tests/test_reverse_transformation.py +++ b/tests/test_reverse_transformation.py @@ -1,9 +1,9 @@ import numpy as np import xarray as xr -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Select +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Select class TestSlicingReverseTransformation: diff --git a/tests/test_shapes.py b/tests/test_shapes.py index ee17e6b22..3013be3f0 100644 --- a/tests/test_shapes.py +++ b/tests/test_shapes.py @@ -3,9 +3,9 @@ import pytest import xarray as xr -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import All, Select, Span +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import All, Select, Span class TestSlicing3DXarrayDatacube: diff --git a/tests/test_slice_date_range_fdb.py b/tests/test_slice_date_range_fdb.py index 80d5c96e1..dae81cb22 100644 --- a/tests/test_slice_date_range_fdb.py +++ b/tests/test_slice_date_range_fdb.py @@ -1,9 +1,9 @@ import pandas as pd import pytest -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Box, Disk, Select, Span +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Box, Disk, Select, Span class TestSlicingFDBDatacube: diff --git a/tests/test_slice_date_range_fdb_v2.py b/tests/test_slice_date_range_fdb_v2.py index c75a2ca7d..fcacf6b7c 100644 --- a/tests/test_slice_date_range_fdb_v2.py +++ b/tests/test_slice_date_range_fdb_v2.py @@ -2,9 +2,9 @@ import pandas as pd import pytest -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Select, Span +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Select, Span class TestSlicingFDBDatacube: diff --git a/tests/test_slice_fdb_box.py b/tests/test_slice_fdb_box.py index aa65edf7e..f9daa128e 100644 --- a/tests/test_slice_fdb_box.py +++ b/tests/test_slice_fdb_box.py @@ -3,10 +3,10 @@ import pandas as pd import pytest -from polytope.datacube.tree_encoding import decode_tree, encode_tree -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import All, Box, Select +from polytope_feature.datacube.tree_encoding import decode_tree, encode_tree +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import All, Box, Select class TestSlicingFDBDatacube: diff --git a/tests/test_slicer_engine.py b/tests/test_slicer_engine.py index 29bdf5f09..289eeab6b 100644 --- a/tests/test_slicer_engine.py +++ b/tests/test_slicer_engine.py @@ -1,11 +1,11 @@ import numpy as np import xarray as xr -from polytope.datacube.backends.xarray import XArrayDatacube -from polytope.datacube.tensor_index_tree import TensorIndexTree -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope -from polytope.shapes import Box +from polytope_feature.datacube.backends.xarray import XArrayDatacube +from polytope_feature.datacube.tensor_index_tree import TensorIndexTree +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope +from polytope_feature.shapes import Box class TestSlicerComponents: diff --git a/tests/test_slicer_era5.py b/tests/test_slicer_era5.py index 39a335c1a..4e7da9f48 100644 --- a/tests/test_slicer_era5.py +++ b/tests/test_slicer_era5.py @@ -3,9 +3,9 @@ from earthkit import data from helper_functions import download_test_data -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Box, Select +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Box, Select class TestSlicingEra5Data: diff --git a/tests/test_slicer_xarray.py b/tests/test_slicer_xarray.py index 428345e39..b36cd051c 100644 --- a/tests/test_slicer_xarray.py +++ b/tests/test_slicer_xarray.py @@ -2,9 +2,9 @@ import pandas as pd import xarray as xr -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Box, Select, Span +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Box, Select, Span class TestXarraySlicing: diff --git a/tests/test_slicing_unsliceable_axis.py b/tests/test_slicing_unsliceable_axis.py index d021291d2..286252065 100644 --- a/tests/test_slicing_unsliceable_axis.py +++ b/tests/test_slicing_unsliceable_axis.py @@ -3,10 +3,10 @@ import pytest import xarray as xr -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Box, Select -from polytope.utility.exceptions import UnsliceableShapeError +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Box, Select +from polytope_feature.utility.exceptions import UnsliceableShapeError class TestSlicingUnsliceableAxis: diff --git a/tests/test_slicing_xarray_3D.py b/tests/test_slicing_xarray_3D.py index cbffeccae..06df3ec6b 100644 --- a/tests/test_slicing_xarray_3D.py +++ b/tests/test_slicing_xarray_3D.py @@ -5,11 +5,11 @@ import pandas as pd import xarray as xr -from polytope.datacube.backends.xarray import XArrayDatacube -from polytope.datacube.tensor_index_tree import TensorIndexTree -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import ( +from polytope_feature.datacube.backends.xarray import XArrayDatacube +from polytope_feature.datacube.tensor_index_tree import TensorIndexTree +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import ( Box, ConvexPolytope, Disk, diff --git a/tests/test_slicing_xarray_4D.py b/tests/test_slicing_xarray_4D.py index c8b3abd5e..9345e8db5 100644 --- a/tests/test_slicing_xarray_4D.py +++ b/tests/test_slicing_xarray_4D.py @@ -3,10 +3,10 @@ import pytest import xarray as xr -from polytope.datacube.tensor_index_tree import TensorIndexTree -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import ( +from polytope_feature.datacube.tensor_index_tree import TensorIndexTree +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import ( Box, Disk, Ellipsoid, @@ -17,7 +17,10 @@ Span, Union, ) -from polytope.utility.exceptions import AxisOverdefinedError, AxisUnderdefinedError +from polytope_feature.utility.exceptions import ( + AxisOverdefinedError, + AxisUnderdefinedError, +) class TestSlicing4DXarrayDatacube: diff --git a/tests/test_snapping.py b/tests/test_snapping.py index bdb365ce5..529f1d69a 100644 --- a/tests/test_snapping.py +++ b/tests/test_snapping.py @@ -1,9 +1,9 @@ import numpy as np import xarray as xr -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Select +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Select class TestSlicing3DXarrayDatacube: diff --git a/tests/test_snapping_real_data.py b/tests/test_snapping_real_data.py index c2bcc9f02..f8c350e43 100644 --- a/tests/test_snapping_real_data.py +++ b/tests/test_snapping_real_data.py @@ -6,9 +6,9 @@ from earthkit import data from helper_functions import download_test_data -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Box, Select +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Box, Select class TestSlicingEra5Data: diff --git a/tests/test_tree_protobuf.py b/tests/test_tree_protobuf.py index a88633ea5..7f2e56f23 100644 --- a/tests/test_tree_protobuf.py +++ b/tests/test_tree_protobuf.py @@ -1,4 +1,4 @@ -import polytope.datacube.index_tree_pb2 as pb2 +import polytope_feature.datacube.index_tree_pb2 as pb2 class TestTreeProtobuf: diff --git a/tests/test_tree_protobuf_encoding.py b/tests/test_tree_protobuf_encoding.py index 7497453d4..b177cbe2b 100644 --- a/tests/test_tree_protobuf_encoding.py +++ b/tests/test_tree_protobuf_encoding.py @@ -1,15 +1,15 @@ import pytest -from polytope.datacube.backends.mock import MockDatacube -from polytope.datacube.datacube_axis import ( +from polytope_feature.datacube.backends.mock import MockDatacube +from polytope_feature.datacube.datacube_axis import ( FloatDatacubeAxis, IntDatacubeAxis, PandasTimedeltaDatacubeAxis, PandasTimestampDatacubeAxis, UnsliceableDatacubeAxis, ) -from polytope.datacube.tensor_index_tree import TensorIndexTree -from polytope.datacube.tree_encoding import decode_tree, encode_tree +from polytope_feature.datacube.tensor_index_tree import TensorIndexTree +from polytope_feature.datacube.tree_encoding import decode_tree, encode_tree class TestEncoder: @@ -49,8 +49,8 @@ def setup_method(self): def test_encoding(self): import pygribjump as gj - from polytope.engine.hullslicer import HullSlicer - from polytope.polytope import Polytope + from polytope_feature.engine.hullslicer import HullSlicer + from polytope_feature.polytope import Polytope self.options = { "pre_path": {"class": "od", "expver": "0001", "levtype": "sfc", "stream": "oper"}, diff --git a/tests/test_tree_protobuf_encoding_fdb.py b/tests/test_tree_protobuf_encoding_fdb.py index 7cef1070e..2e288f0d6 100644 --- a/tests/test_tree_protobuf_encoding_fdb.py +++ b/tests/test_tree_protobuf_encoding_fdb.py @@ -1,7 +1,7 @@ import pandas as pd import pytest -from polytope.datacube.tree_encoding import decode_tree, encode_tree +from polytope_feature.datacube.tree_encoding import decode_tree, encode_tree class TestEncoder: @@ -12,9 +12,9 @@ def setup_method(self): def test_encoding(self): import pygribjump as gj - from polytope.engine.hullslicer import HullSlicer - from polytope.polytope import Polytope, Request - from polytope.shapes import Box, Select + from polytope_feature.engine.hullslicer import HullSlicer + from polytope_feature.polytope import Polytope, Request + from polytope_feature.shapes import Box, Select request = Request( Select("step", [0]), diff --git a/tests/test_type_change_transformation.py b/tests/test_type_change_transformation.py index f74dd4744..09f800610 100644 --- a/tests/test_type_change_transformation.py +++ b/tests/test_type_change_transformation.py @@ -1,9 +1,9 @@ import numpy as np import xarray as xr -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Select +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Select class TestTypeChangeTransformation: diff --git a/tests/test_union_gj.py b/tests/test_union_gj.py index 30f22fc54..9182fc360 100644 --- a/tests/test_union_gj.py +++ b/tests/test_union_gj.py @@ -1,9 +1,9 @@ import pandas as pd import pytest -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Box, Select, Span, Union +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Box, Select, Span, Union class TestSlicingFDBDatacube: diff --git a/tests/test_union_point_box.py b/tests/test_union_point_box.py index 7b7d1152d..ba280bc02 100644 --- a/tests/test_union_point_box.py +++ b/tests/test_union_point_box.py @@ -1,9 +1,9 @@ import pandas as pd import pytest -from polytope.engine.hullslicer import HullSlicer -from polytope.polytope import Polytope, Request -from polytope.shapes import Box, Point, Select, Union +from polytope_feature.engine.hullslicer import HullSlicer +from polytope_feature.polytope import Polytope, Request +from polytope_feature.shapes import Box, Point, Select, Union class TestSlicingFDBDatacube: