Skip to content

Commit

Permalink
datacube query refactor - kamangir/bolt#746
Browse files Browse the repository at this point in the history
  • Loading branch information
kamangir committed Jul 21, 2024
1 parent 746a168 commit 6a8e725
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 0 additions & 1 deletion blue_geo/.abcli/datacube/query.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#! /usr/bin/env bash

export blue_geo_datacube_query_read_args="[--count <count>]$ABCUL[--delim <delim>]$ABCUL[--index <index>]$ABCUL[--prefix <prefix>]$ABCUL[--suffix <suffix>]$ABCUL[--contains <contains>]$ABCUL[--notcontains <not-contains>]"
export blue_geo_datacube_query_options="download,ingest,select,upload"

function blue_geo_datacube_query() {
Expand Down
10 changes: 8 additions & 2 deletions blue_geo/.abcli/datacube/query/read.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,30 @@ 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 <count>]$ABCUL[--delim <delim>]$ABCUL[--index <index>]$ABCUL[--prefix <prefix>]$ABCUL[--suffix <suffix>]$ABCUL[--contains <contains>]$ABCUL[--notcontains <not-contains>]"
abcli_show_usage "@datacube query read$ABCUL[$options]$ABCUL[.|<object-name>]$ABCUL$args" \
"read query results in <object-name>."
return
fi

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}"
}
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.98.1"
VERSION = "4.99.1"

REPO_NAME = "blue-geo"

Expand Down

0 comments on commit 6a8e725

Please sign in to comment.