From 6a8e7252613755c8fd8f306cc23cd7b4328a760a Mon Sep 17 00:00:00 2001 From: kamangir Date: Sat, 20 Jul 2024 17:37:50 -0700 Subject: [PATCH] datacube query refactor - kamangir/bolt#746 --- blue_geo/.abcli/datacube/query.sh | 1 - blue_geo/.abcli/datacube/query/read.sh | 10 ++++++++-- blue_geo/__init__.py | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/blue_geo/.abcli/datacube/query.sh b/blue_geo/.abcli/datacube/query.sh index 52aa982d..b2872f2d 100644 --- a/blue_geo/.abcli/datacube/query.sh +++ b/blue_geo/.abcli/datacube/query.sh @@ -1,6 +1,5 @@ #! /usr/bin/env bash -export blue_geo_datacube_query_read_args="[--count ]$ABCUL[--delim ]$ABCUL[--index ]$ABCUL[--prefix ]$ABCUL[--suffix ]$ABCUL[--contains ]$ABCUL[--notcontains ]" export blue_geo_datacube_query_options="download,ingest,select,upload" function blue_geo_datacube_query() { diff --git a/blue_geo/.abcli/datacube/query/read.sh b/blue_geo/.abcli/datacube/query/read.sh index 28b5d230..8227358f 100644 --- a/blue_geo/.abcli/datacube/query/read.sh +++ b/blue_geo/.abcli/datacube/query/read.sh @@ -4,8 +4,8 @@ function blue_geo_datacube_query_read() { local options=$1 if [ $(abcli_option_int "$options" help 0) == 1 ]; then - options="download,len" - local args="$blue_geo_datacube_query_read_args" + options="all,download,len" + local args="[--count ]$ABCUL[--delim ]$ABCUL[--index ]$ABCUL[--prefix ]$ABCUL[--suffix ]$ABCUL[--contains ]$ABCUL[--notcontains ]" abcli_show_usage "@datacube query read$ABCUL[$options]$ABCUL[.|]$ABCUL$args" \ "read query results in ." return @@ -13,15 +13,21 @@ function blue_geo_datacube_query_read() { local do_download=$(abcli_option_int "$options" download 0) local show_len=$(abcli_option_int "$options" len 0) + local do_all=$(abcli_option_int "$options" all 0) local object_name=$(abcli_clarify_object $2 .) [[ "$do_download" == 1 ]] && abcli_download - $object_name + local extra_args="" + [[ "$do_all" == 1 ]] && + extra_args="--count -1" + python3 -m blue_geo.datacube.query \ read \ --object_name $object_name \ --show_len $show_len \ + $extra_args \ "${@:3}" } diff --git a/blue_geo/__init__.py b/blue_geo/__init__.py index 5d2b1291..e7c6f44a 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.98.1" +VERSION = "4.99.1" REPO_NAME = "blue-geo"