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 23db7a8 commit 4245e17
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
34 changes: 16 additions & 18 deletions blue_geo/.abcli/datacube/firms_area/query.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,22 @@ function blue_geo_datacube_firms_area_query() {

if [ $(abcli_option_int "$options" help 0) == 1 ]; then
options="dryrun"
local args=$(blue_geo_datacube_firms_area_query_args)

local date=$(abcli_string_timestamp_short \
--include_time 0 \
--unique 0)
local area=$(python3 -m blue_geo.datacube.firms.area \
get \
--what area \
--delim \|)
local source=$(python3 -m blue_geo.datacube.firms.area \
get \
--what source \
--values 1 \
--delim \|)

local args="[--date $date]$ABCUL[--depth 1]$ABCUL[--area $area]$ABCUL[--source $source]$ABCUL[--log 1]"

abcli_show_usage "@datacube query firms_area$ABCUL[$blue_geo_datacube_query_options]$ABCUL[-|<object-name>]$ABCUL[$options]$ABCUL$args" \
"firms_area -query-> <object-name>."
return
Expand All @@ -23,20 +38,3 @@ function blue_geo_datacube_firms_area_query() {

return 0
}

function blue_geo_datacube_firms_area_query_args() {
local date=$(abcli_string_timestamp_short \
--include_time 0 \
--unique 0)
local area=$(python3 -m blue_geo.datacube.firms.area \
get \
--what area \
--delim \|)
local source=$(python3 -m blue_geo.datacube.firms.area \
get \
--what source \
--values 1 \
--delim \|)

echo "[--date $date]$ABCUL[--depth 1]$ABCUL[--area $area]$ABCUL[--source $source]$ABCUL[--log 1]"
}
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.95.1"
VERSION = "4.96.1"

REPO_NAME = "blue-geo"

Expand Down

0 comments on commit 4245e17

Please sign in to comment.