From b0b0d0de006fafc053d48c0d80efe3a9bb731685 Mon Sep 17 00:00:00 2001 From: kamangir Date: Sun, 4 Aug 2024 17:10:47 -0700 Subject: [PATCH] =?UTF-8?q?untested=20=E2=9D=97=EF=B8=8F=20-=20kamangir/bo?= =?UTF-8?q?lt#746?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- blue_geo/__init__.py | 2 +- blue_geo/catalog/classes.py | 8 +++++++- blue_geo/catalog/ukraine_timemap/__init__.py | 2 ++ .../{ => catalog}/ukraine_timemap/__main__.py | 2 +- blue_geo/catalog/ukraine_timemap/catalog.py | 11 +++++++++++ .../ukraine_timemap/datacube.py} | 15 +++++++++++++++ blue_geo/ukraine_timemap/__init__.py | 0 8 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 blue_geo/catalog/ukraine_timemap/__init__.py rename blue_geo/{ => catalog}/ukraine_timemap/__main__.py (90%) create mode 100644 blue_geo/catalog/ukraine_timemap/catalog.py rename blue_geo/{ukraine_timemap/functions.py => catalog/ukraine_timemap/datacube.py} (91%) delete mode 100644 blue_geo/ukraine_timemap/__init__.py diff --git a/README.md b/README.md index 231665f9..a05d52f8 100644 --- a/README.md +++ b/README.md @@ -23,4 +23,4 @@ pip install blue-geo To use on [AWS SageMaker](https://aws.amazon.com/sagemaker/) replace `` with the name of the plugin and follow [these instructions](https://github.com/kamangir/notebooks-and-scripts/blob/main/SageMaker.md). --- -built by [`abcli-9.188.1-current`](https://github.com/kamangir/awesome-bash-cli), based on [`blue_geo-4.180.1`](https://github.com/kamangir/blue-geo). +built by [`abcli-9.188.1-current`](https://github.com/kamangir/awesome-bash-cli), based on [`blue_geo-4.181.1`](https://github.com/kamangir/blue-geo). diff --git a/blue_geo/__init__.py b/blue_geo/__init__.py index c78114b2..459907ed 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.180.1" +VERSION = "4.181.1" REPO_NAME = "blue-geo" diff --git a/blue_geo/catalog/classes.py b/blue_geo/catalog/classes.py index 1a0c9610..cbc64fbe 100644 --- a/blue_geo/catalog/classes.py +++ b/blue_geo/catalog/classes.py @@ -1,16 +1,21 @@ from typing import List, Type, Union -from blue_geo.catalog.firms import FirmsCatalog from blue_geo.catalog.generic import ( GenericCatalog, VoidCatalog, GenericDatacube, VoidDatacube, ) +from blue_geo.catalog.firms import FirmsCatalog from blue_geo.catalog.firms.area import FirmsAreaDatacube +from blue_geo.catalog.ukraine_timemap import ( + UkraineTimemapCatalog, + UkraineTimemapDatacube, +) list_of_catalog_classes: List[Type[GenericCatalog]] = [ GenericCatalog, FirmsCatalog, + UkraineTimemapCatalog, ] list_of_catalogs: List[str] = sorted( @@ -20,6 +25,7 @@ list_of_datacube_classes: List[Type[GenericDatacube]] = [ GenericDatacube, FirmsAreaDatacube, + UkraineTimemapDatacube, ] diff --git a/blue_geo/catalog/ukraine_timemap/__init__.py b/blue_geo/catalog/ukraine_timemap/__init__.py new file mode 100644 index 00000000..b63df826 --- /dev/null +++ b/blue_geo/catalog/ukraine_timemap/__init__.py @@ -0,0 +1,2 @@ +from blue_geo.catalog.ukraine_timemap.catalog import UkraineTimemapCatalog +from blue_geo.catalog.ukraine_timemap.datacube import UkraineTimemapDatacube diff --git a/blue_geo/ukraine_timemap/__main__.py b/blue_geo/catalog/ukraine_timemap/__main__.py similarity index 90% rename from blue_geo/ukraine_timemap/__main__.py rename to blue_geo/catalog/ukraine_timemap/__main__.py index 79c0f799..6d2854ac 100644 --- a/blue_geo/ukraine_timemap/__main__.py +++ b/blue_geo/catalog/ukraine_timemap/__main__.py @@ -1,7 +1,7 @@ import argparse from blueness import module from blue_geo import NAME, VERSION -from blue_geo.ukraine_timemap.functions import ingest +from blue_geo.catalog.ukraine_timemap.functions import ingest from blue_geo.logger import logger from blueness.argparse.generic import sys_exit diff --git a/blue_geo/catalog/ukraine_timemap/catalog.py b/blue_geo/catalog/ukraine_timemap/catalog.py new file mode 100644 index 00000000..f51a950e --- /dev/null +++ b/blue_geo/catalog/ukraine_timemap/catalog.py @@ -0,0 +1,11 @@ +from blueness import module +from blue_geo import NAME +from blue_geo.catalog.generic import GenericCatalog +from blue_geo.logger import logger + +NAME = module.name(__file__, NAME) + + +class UkraineTimemapCatalog(GenericCatalog): + name = "ukraime_timemap" + collections = ["ukraime_timemap"] diff --git a/blue_geo/ukraine_timemap/functions.py b/blue_geo/catalog/ukraine_timemap/datacube.py similarity index 91% rename from blue_geo/ukraine_timemap/functions.py rename to blue_geo/catalog/ukraine_timemap/datacube.py index 8be78403..48becb19 100644 --- a/blue_geo/ukraine_timemap/functions.py +++ b/blue_geo/catalog/ukraine_timemap/datacube.py @@ -7,6 +7,9 @@ from geojson import Point from blueness import module from blue_geo import NAME, VERSION +from blue_geo import env +from blue_geo.catalog.generic import GenericDatacube +from blue_geo.catalog.ukraine_timemap.catalog import UkraineTimemapCatalog from blue_geo.logger import logger import matplotlib.pyplot as plt from typing import Dict @@ -20,6 +23,18 @@ NAME = module.name(__file__, NAME) +class UkraineTimemapDatacube(GenericDatacube): + name = "area" + catalog = UkraineTimemapCatalog() + QGIS_template = env.BLUE_GEO_UKRAINE_TIMEMAP_QGIS_TEMPLATE + + def __init__( + self, + datacube_id: str = "", + ): + super().__init__(datacube_id) + + def ingest( object_name: str, do_save: bool = True, diff --git a/blue_geo/ukraine_timemap/__init__.py b/blue_geo/ukraine_timemap/__init__.py deleted file mode 100644 index e69de29b..00000000