diff --git a/blue_geo/__init__.py b/blue_geo/__init__.py index 1bfe94bc..365fc90d 100644 --- a/blue_geo/__init__.py +++ b/blue_geo/__init__.py @@ -4,7 +4,7 @@ DESCRIPTION = f"{ICON} AI for precise geospatial data analysis and visualization." -VERSION = "4.165.1" +VERSION = "4.166.1" REPO_NAME = "blue-geo" diff --git a/blue_geo/catalog/__init__.py b/blue_geo/catalog/__init__.py index 2f96de4b..c303c827 100644 --- a/blue_geo/catalog/__init__.py +++ b/blue_geo/catalog/__init__.py @@ -1,7 +1,10 @@ from blue_geo.catalog.classes import ( list_of_catalog_classes, list_of_datacube_classes, + get_catalog, + get_catalog_class, get_collections, get_datacube, get_datacube_class, + list_of_catalogs, ) diff --git a/blue_geo/tests/test_catalog.py b/blue_geo/tests/test_catalog.py index 208362f8..f2a64158 100644 --- a/blue_geo/tests/test_catalog.py +++ b/blue_geo/tests/test_catalog.py @@ -5,9 +5,12 @@ from blue_geo.catalog import ( list_of_catalog_classes, list_of_datacube_classes, + get_catalog, + get_catalog_class, get_datacube, get_datacube_class, get_collections, + list_of_catalogs, ) from blue_geo.catalog.generic import GenericCatalog, GenericDatacube @@ -45,6 +48,33 @@ def test_list_of_datacube_classes( assert success +@pytest.mark.parametrize( + ["catalog_name", "expected_catalog_class"], + [[catalog_name, catalog_class] for catalog_name, catalog_class in list_of_catalogs], +) +def test_get_catalog( + catalog_name: str, + expected_catalog_class: Type[GenericCatalog], +): + catalog = get_catalog(catalog_name) + assert isinstance(catalog, expected_catalog_class) + + +@pytest.mark.parametrize( + ["catalog_name", "expected_catalog_class"], + [ + [datacube_id, datacube_class] + for datacube_id, datacube_class in assets.datacubes.items() + ], +) +def test_get_datacube_class( + catalog_name: str, + expected_catalog_class: Type[GenericDatacube], +): + catalog_class = get_catalog_class(catalog_name) + assert catalog_class == expected_catalog_class + + @pytest.mark.parametrize( ["datacube_id", "expected_datacube_class"], [