From 323c9453afb78a67461a6d8a2a992a7b02108b98 Mon Sep 17 00:00:00 2001 From: Deepak Chandan Date: Thu, 26 Oct 2023 20:12:01 -0400 Subject: [PATCH] pr changes --- STACpopulator/populator_base.py | 6 +++--- tests/{ref.txt => ref.json} | 0 tests/test_standalone_stac_item.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename tests/{ref.txt => ref.json} (100%) diff --git a/STACpopulator/populator_base.py b/STACpopulator/populator_base.py index e6b795d..f8ccb1c 100644 --- a/STACpopulator/populator_base.py +++ b/STACpopulator/populator_base.py @@ -69,18 +69,18 @@ def collection_id(self) -> str: def item_properties_model(self): """In derived classes, this property should be defined as a pydantic data model that derives from models.STACItemProperties.""" - pass + raise NotImplementedError @property @abstractmethod def item_geometry_model(self): """In derived classes, this property should be defined as a pydantic data model that derives from models.STACItemProperties.""" - pass + raise NotImplementedError @abstractmethod def create_stac_item(self, item_name: str, item_data: MutableMapping[str, Any]) -> MutableMapping[str, Any]: - pass + raise NotImplementedError def validate_host(self, stac_host: str) -> str: if not url_validate(stac_host): diff --git a/tests/ref.txt b/tests/ref.json similarity index 100% rename from tests/ref.txt rename to tests/ref.json diff --git a/tests/test_standalone_stac_item.py b/tests/test_standalone_stac_item.py index f0dc3c8..d7239a8 100644 --- a/tests/test_standalone_stac_item.py +++ b/tests/test_standalone_stac_item.py @@ -24,7 +24,7 @@ def test_standalone_stac_item(): stac_item_id = make_cmip6_item_id(attrs["attributes"]) stac_item = STAC_item_from_metadata(stac_item_id, attrs, CMIP6ItemProperties, GeoJSONPolygon) - with open("tests/ref.txt", "r") as ff: + with open("tests/ref.json", "r") as ff: reference = json.load(ff) assert stac_item.to_dict() == reference