Skip to content

Commit

Permalink
start of testing... - kamangir/bolt#746
Browse files Browse the repository at this point in the history
  • Loading branch information
kamangir committed Jul 26, 2024
1 parent 882f63c commit 1acca16
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 6 deletions.
2 changes: 1 addition & 1 deletion blue_geo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

DESCRIPTION = f"{ICON} AI for precise geospatial data analysis and visualization."

VERSION = "4.140.1"
VERSION = "4.141.1"

REPO_NAME = "blue-geo"

Expand Down
9 changes: 6 additions & 3 deletions blue_geo/tests/assets.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# last datacube-id must be valid.

datacube_generic_parse_datacube_id = [
["void", False],
["void-void-void-void-void-void-void-void", False],
Expand All @@ -8,7 +10,8 @@
datacube_firms_area_parse_datacube_id = [
["datacube-firms_void-void-void-void-void", False],
["datacube-firms_area-void-void-void-void", False],
["datacube-firms_area-world-void-2024-07-20-1", False],
["datacube-firms_area-void-MODIS_NRT-2024-07-20-1", False],
["datacube-firms_area-world-MODIS_NRT-2024-07-20-1", True],
["datacube-firms-area-void-void-void-void", False],
["datacube-firms-area-world-void-2024-07-20-1", False],
["datacube-firms-area-void-MODIS_NRT-2024-07-20-1", False],
["datacube-firms-area-world-MODIS_NRT-2024-07-20-1", True],
]
19 changes: 19 additions & 0 deletions blue_geo/tests/test_catalog_generic.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from typing import Type
import pytest
from abcli.modules.objects import unique_object
from blue_geo.tests import assets
from blue_geo.catalog.generic import GenericCatalog, VoidCatalog


@pytest.mark.parametrize(
["catalog_class"],
[
[
GenericCatalog,
VoidCatalog,
],
],
)
def test_catalog(catalog_class: Type[GenericCatalog]):
catalog = catalog_class()
assert catalog.name
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import pytest
from abcli.modules.objects import unique_object
from blue_geo.tests import assets
from blue_geo.catalog.generic import GenericDatacube
from blue_geo.catalog.generic import GenericCatalog, GenericDatacube


def test_datacube():
object_name = unique_object()

datacube = GenericDatacube()

assert isinstance(datacube.catalog, GenericCatalog)

assert datacube.datacube_id

assert datacube.description
Expand All @@ -20,7 +22,7 @@ def test_datacube():
@pytest.mark.parametrize(
["datacube_id"],
[
["datacube-generic"],
[assets.datacube_generic_parse_datacube_id[-1]],
],
)
def test_datacube_from_datacube_id(datacube_id: str):
Expand Down

0 comments on commit 1acca16

Please sign in to comment.