From d45b3357c3b81863ce2cc98eeafe06b909aee653 Mon Sep 17 00:00:00 2001 From: kamangir Date: Sat, 25 May 2024 20:25:14 -0700 Subject: [PATCH 1/5] bash delivery - kamangir/bolt#746 --- .abcli/{install/hubble.sh => install.sh} | 0 hubblescope/__init__.py | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename .abcli/{install/hubble.sh => install.sh} (100%) diff --git a/.abcli/install/hubble.sh b/.abcli/install.sh similarity index 100% rename from .abcli/install/hubble.sh rename to .abcli/install.sh diff --git a/hubblescope/__init__.py b/hubblescope/__init__.py index d3a8ede..e4b4889 100644 --- a/hubblescope/__init__.py +++ b/hubblescope/__init__.py @@ -4,4 +4,4 @@ DESCRIPTION = f"{ICON} tools to access and process Hubble Space Telescope imagery and other datasets on AWS Open Data Registry." -VERSION = "4.6.1" +VERSION = "4.8.1" From a4a51fcb1ea6d199d5851fa04655645f4e7aa9af Mon Sep 17 00:00:00 2001 From: kamangir Date: Sat, 25 May 2024 21:36:46 -0700 Subject: [PATCH 2/5] bash delivey - kamangir/bolt#746 --- .abcli/actions.sh | 5 ----- hubblescope/.abcli/actions.sh | 6 ++++++ {.abcli => hubblescope/.abcli}/aka.sh | 0 {.abcli => hubblescope/.abcli}/download.sh | 0 {.abcli => hubblescope/.abcli}/get.sh | 0 {.abcli => hubblescope/.abcli}/hubble.sh | 0 {.abcli => hubblescope/.abcli}/install.sh | 0 {.abcli => hubblescope/.abcli}/list.sh | 0 {.abcli => hubblescope/.abcli}/select.sh | 0 {.abcli => hubblescope/.abcli}/tests/is_dataset.sh | 0 {.abcli => hubblescope/.abcli}/tests/list.sh | 0 {.abcli => hubblescope/.abcli}/tests/select_and_download.sh | 0 {.abcli => hubblescope/.abcli}/tests/version.sh | 0 hubblescope/__init__.py | 2 +- 14 files changed, 7 insertions(+), 6 deletions(-) delete mode 100644 .abcli/actions.sh create mode 100644 hubblescope/.abcli/actions.sh rename {.abcli => hubblescope/.abcli}/aka.sh (100%) rename {.abcli => hubblescope/.abcli}/download.sh (100%) rename {.abcli => hubblescope/.abcli}/get.sh (100%) rename {.abcli => hubblescope/.abcli}/hubble.sh (100%) rename {.abcli => hubblescope/.abcli}/install.sh (100%) rename {.abcli => hubblescope/.abcli}/list.sh (100%) rename {.abcli => hubblescope/.abcli}/select.sh (100%) rename {.abcli => hubblescope/.abcli}/tests/is_dataset.sh (100%) rename {.abcli => hubblescope/.abcli}/tests/list.sh (100%) rename {.abcli => hubblescope/.abcli}/tests/select_and_download.sh (100%) rename {.abcli => hubblescope/.abcli}/tests/version.sh (100%) diff --git a/.abcli/actions.sh b/.abcli/actions.sh deleted file mode 100644 index e084487..0000000 --- a/.abcli/actions.sh +++ /dev/null @@ -1,5 +0,0 @@ -#! /usr/bin/env bash - -function hubble_action_git_before_push() { - hubble pypi build -} diff --git a/hubblescope/.abcli/actions.sh b/hubblescope/.abcli/actions.sh new file mode 100644 index 0000000..e315e44 --- /dev/null +++ b/hubblescope/.abcli/actions.sh @@ -0,0 +1,6 @@ +#! /usr/bin/env bash + +function hubble_action_git_before_push() { + [[ "$(abcli_git get_branch)" == "main" ]] && + hubble pypi build +} diff --git a/.abcli/aka.sh b/hubblescope/.abcli/aka.sh similarity index 100% rename from .abcli/aka.sh rename to hubblescope/.abcli/aka.sh diff --git a/.abcli/download.sh b/hubblescope/.abcli/download.sh similarity index 100% rename from .abcli/download.sh rename to hubblescope/.abcli/download.sh diff --git a/.abcli/get.sh b/hubblescope/.abcli/get.sh similarity index 100% rename from .abcli/get.sh rename to hubblescope/.abcli/get.sh diff --git a/.abcli/hubble.sh b/hubblescope/.abcli/hubble.sh similarity index 100% rename from .abcli/hubble.sh rename to hubblescope/.abcli/hubble.sh diff --git a/.abcli/install.sh b/hubblescope/.abcli/install.sh similarity index 100% rename from .abcli/install.sh rename to hubblescope/.abcli/install.sh diff --git a/.abcli/list.sh b/hubblescope/.abcli/list.sh similarity index 100% rename from .abcli/list.sh rename to hubblescope/.abcli/list.sh diff --git a/.abcli/select.sh b/hubblescope/.abcli/select.sh similarity index 100% rename from .abcli/select.sh rename to hubblescope/.abcli/select.sh diff --git a/.abcli/tests/is_dataset.sh b/hubblescope/.abcli/tests/is_dataset.sh similarity index 100% rename from .abcli/tests/is_dataset.sh rename to hubblescope/.abcli/tests/is_dataset.sh diff --git a/.abcli/tests/list.sh b/hubblescope/.abcli/tests/list.sh similarity index 100% rename from .abcli/tests/list.sh rename to hubblescope/.abcli/tests/list.sh diff --git a/.abcli/tests/select_and_download.sh b/hubblescope/.abcli/tests/select_and_download.sh similarity index 100% rename from .abcli/tests/select_and_download.sh rename to hubblescope/.abcli/tests/select_and_download.sh diff --git a/.abcli/tests/version.sh b/hubblescope/.abcli/tests/version.sh similarity index 100% rename from .abcli/tests/version.sh rename to hubblescope/.abcli/tests/version.sh diff --git a/hubblescope/__init__.py b/hubblescope/__init__.py index e4b4889..ee9665f 100644 --- a/hubblescope/__init__.py +++ b/hubblescope/__init__.py @@ -4,4 +4,4 @@ DESCRIPTION = f"{ICON} tools to access and process Hubble Space Telescope imagery and other datasets on AWS Open Data Registry." -VERSION = "4.8.1" +VERSION = "4.10.1" From d3dff1ce14f77c7b3e8e177c295f46bb7d19ea5d Mon Sep 17 00:00:00 2001 From: kamangir Date: Sun, 26 May 2024 00:41:12 -0700 Subject: [PATCH 3/5] refactor - kamangir/bolt#746 --- hubblescope/.abcli/abcli.sh | 5 +++++ hubblescope/.abcli/hubble.sh | 3 --- hubblescope/__init__.py | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 hubblescope/.abcli/abcli.sh diff --git a/hubblescope/.abcli/abcli.sh b/hubblescope/.abcli/abcli.sh new file mode 100644 index 0000000..81f83eb --- /dev/null +++ b/hubblescope/.abcli/abcli.sh @@ -0,0 +1,5 @@ +#! /usr/bin/env bash + +abcli_source_path - caller,suffix=/tests + +export hubble_module_name=hubblescope diff --git a/hubblescope/.abcli/hubble.sh b/hubblescope/.abcli/hubble.sh index 4defad2..733755c 100755 --- a/hubblescope/.abcli/hubble.sh +++ b/hubblescope/.abcli/hubble.sh @@ -14,6 +14,3 @@ function abcli_hubble() { plugin=hubble,task=$task \ "${@:2}" } - -abcli_source_path \ - $abcli_path_git/hubble/.abcli/tests diff --git a/hubblescope/__init__.py b/hubblescope/__init__.py index ee9665f..78462dd 100644 --- a/hubblescope/__init__.py +++ b/hubblescope/__init__.py @@ -4,4 +4,4 @@ DESCRIPTION = f"{ICON} tools to access and process Hubble Space Telescope imagery and other datasets on AWS Open Data Registry." -VERSION = "4.10.1" +VERSION = "4.11.1" From 9b3a023f9c1c784630939b631dfd3000bb68d7cc Mon Sep 17 00:00:00 2001 From: kamangir Date: Sun, 26 May 2024 13:21:15 -0700 Subject: [PATCH 4/5] Refactor - kamangir/bolt#746 --- .gitignore | 3 ++- hubblescope/.abcli/aka.sh | 6 +----- hubblescope/.abcli/download.sh | 8 ++++---- hubblescope/.abcli/get.sh | 4 ++-- hubblescope/.abcli/hubble.sh | 6 +++--- hubblescope/.abcli/list.sh | 12 ++++++------ hubblescope/.abcli/select.sh | 12 ++++++------ hubblescope/.abcli/tests/is_dataset.sh | 6 +++--- hubblescope/__init__.py | 2 +- 9 files changed, 28 insertions(+), 31 deletions(-) diff --git a/.gitignore b/.gitignore index be3703e..444ce8c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ __pycache__ .DS_Store *.egg-info *.log -, .json \ No newline at end of file +, .json +dist diff --git a/hubblescope/.abcli/aka.sh b/hubblescope/.abcli/aka.sh index 35688ca..7522104 100644 --- a/hubblescope/.abcli/aka.sh +++ b/hubblescope/.abcli/aka.sh @@ -1,9 +1,5 @@ #! /usr/bin/env bash -function hubble() { - abcli_hubble "$@" -} - function hubblescope() { - abcli_hubble "$@" + hubble "$@" } diff --git a/hubblescope/.abcli/download.sh b/hubblescope/.abcli/download.sh index cb6212c..6c0230f 100644 --- a/hubblescope/.abcli/download.sh +++ b/hubblescope/.abcli/download.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -function abcli_hubble_download() { +function hubble_download() { local options=$1 if [ $(abcli_option_int "$options" help 0) == 1 ]; then @@ -21,8 +21,8 @@ function abcli_hubble_download() { local hubble_object_name=$(abcli_clarify_object "$2" . hubble_object) local object_name=$(abcli_clarify_object "$3" .) - local auth=$(abcli_hubble_get auth $dataset_name) - local s3_uri=$(abcli_hubble_get s3_uri $dataset_name $hubble_object_name) + local auth=$(hubble_get auth $dataset_name) + local s3_uri=$(hubble_get s3_uri $dataset_name $hubble_object_name) local command_line if [ "$filename" == all ]; then @@ -53,7 +53,7 @@ function abcli_hubble_download() { [[ "$do_ingest" == 1 ]] && abcli_eval dryrun=$do_dryrun \ - python3 -m hubble ingest \ + python3 -m hubblescope ingest \ --dataset_name $dataset_name \ --hubble_object_name $hubble_object_name \ --object_name $object_name diff --git a/hubblescope/.abcli/get.sh b/hubblescope/.abcli/get.sh index b982dbc..fcbc5f5 100644 --- a/hubblescope/.abcli/get.sh +++ b/hubblescope/.abcli/get.sh @@ -1,7 +1,7 @@ #! /usr/bin/env bash -function abcli_hubble_get() { - python3 -m hubble get \ +function hubble_get() { + python3 -m hubblescope get \ --what "$1" \ --dataset_name "$2" \ --object_name "$3" \ diff --git a/hubblescope/.abcli/hubble.sh b/hubblescope/.abcli/hubble.sh index 733755c..d10cd4b 100755 --- a/hubblescope/.abcli/hubble.sh +++ b/hubblescope/.abcli/hubble.sh @@ -4,9 +4,9 @@ function abcli_hubble() { local task=$(abcli_unpack_keyword $1 help) if [ $task == "help" ]; then - abcli_hubble_download "$@" - abcli_hubble_list "$@" - abcli_hubble_select "$@" + hubble_download "$@" + hubble_list "$@" + hubble_select "$@" return fi diff --git a/hubblescope/.abcli/list.sh b/hubblescope/.abcli/list.sh index 39a0661..22235b7 100644 --- a/hubblescope/.abcli/list.sh +++ b/hubblescope/.abcli/list.sh @@ -1,9 +1,9 @@ #! /usr/bin/env bash -function abcli_hubble_ls() { - abcli_hubble_list "$@" +function hubble_ls() { + hubble_list "$@" } -function abcli_hubble_list() { +function hubble_list() { local task=$1 if [ "$task" == help ]; then @@ -40,7 +40,7 @@ function abcli_hubble_list() { thing_type=object thing_name=$abcli_hubble_object_name suffix="${@:2}" - elif [[ $(abcli_hubble_is_dataset $thing_type) == 1 ]]; then + elif [[ $(hubble_is_dataset $thing_type) == 1 ]]; then thing_type=dataset thing_name=${1:-.} suffix="${@:2}" @@ -60,13 +60,13 @@ function abcli_hubble_list() { abcli_log "🔭 $dataset_name :: $object_name" - local s3_uri=$(abcli_hubble_get s3_uri $dataset_name $object_name) + local s3_uri=$(hubble_get s3_uri $dataset_name $object_name) [[ ! -z "$suffix" ]] && s3_uri=$s3_uri$suffix abcli_log "🔗 $s3_uri" # https://registry.opendata.aws/hst/ abcli_eval - \ "aws s3 ls \ - $(abcli_hubble_get auth $dataset_name) \ + $(hubble_get auth $dataset_name) \ $s3_uri" } diff --git a/hubblescope/.abcli/select.sh b/hubblescope/.abcli/select.sh index 386115f..a64a2ba 100644 --- a/hubblescope/.abcli/select.sh +++ b/hubblescope/.abcli/select.sh @@ -2,7 +2,7 @@ [[ -z "$abcli_hubble_dataset_name" ]] && export abcli_hubble_dataset_name=hst -function abcli_hubble_select() { +function hubble_select() { if [ "$1" == help ]; then abcli_show_usage "hubble select [dataset] " \ "select , example: hst." @@ -18,7 +18,7 @@ function abcli_hubble_select() { if [[ -z "$thing_type" ]]; then abcli_log_error "-hubble: select: not found." return 1 - elif [[ $(abcli_hubble_is_dataset $thing_type) == 1 ]]; then + elif [[ $(hubble_is_dataset $thing_type) == 1 ]]; then local thing_type=dataset local thing_name=$1 local args="${@:2}" @@ -36,7 +36,7 @@ function abcli_hubble_select() { abcli_log "🔗 https://registry.opendata.aws/$thing_name/" abcli_log "🔗 https://github.com/awslabs/open-data-registry/blob/main/datasets/$thing_name.yaml" - abcli_log_file $(abcli_hubble_dataset_metadata $thing_name) + abcli_log_file $(hubble_dataset_metadata $thing_name) else abcli_log "🔭 $abcli_hubble_dataset_name :: $thing_name" @@ -48,12 +48,12 @@ function abcli_hubble_select() { "$args" } -function abcli_hubble_dataset_metadata() { +function hubble_dataset_metadata() { echo $abcli_path_git/open-data-registry/datasets/$1.yaml } -function abcli_hubble_is_dataset() { - if [[ -f $(abcli_hubble_dataset_metadata $1) ]]; then +function hubble_is_dataset() { + if [[ -f $(hubble_dataset_metadata $1) ]]; then echo 1 return fi diff --git a/hubblescope/.abcli/tests/is_dataset.sh b/hubblescope/.abcli/tests/is_dataset.sh index 23984b6..da46ddb 100644 --- a/hubblescope/.abcli/tests/is_dataset.sh +++ b/hubblescope/.abcli/tests/is_dataset.sh @@ -5,14 +5,14 @@ function test_hubble_is_dataset() { local do_dryrun=$(abcli_option_int "$options" dryrun 0) abcli_assert \ - $(abcli_hubble_is_dataset hst) \ + $(hubble_is_dataset hst) \ 1 abcli_assert \ - $(abcli_hubble_is_dataset nst) \ + $(hubble_is_dataset nst) \ 0 abcli_assert \ - $(abcli_hubble_is_dataset shopping-humor-generation) \ + $(hubble_is_dataset shopping-humor-generation) \ 1 } diff --git a/hubblescope/__init__.py b/hubblescope/__init__.py index 78462dd..d8d7d54 100644 --- a/hubblescope/__init__.py +++ b/hubblescope/__init__.py @@ -4,4 +4,4 @@ DESCRIPTION = f"{ICON} tools to access and process Hubble Space Telescope imagery and other datasets on AWS Open Data Registry." -VERSION = "4.11.1" +VERSION = "4.15.1" From 3e5a9936f65cb68a2c886f09ee02066279f6199c Mon Sep 17 00:00:00 2001 From: kamangir Date: Sun, 26 May 2024 13:23:46 -0700 Subject: [PATCH 5/5] pipeline fix (hopefully) - kamangir/bolt#746 --- hubblescope/.abcli/hubble.sh | 2 +- hubblescope/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hubblescope/.abcli/hubble.sh b/hubblescope/.abcli/hubble.sh index d10cd4b..0e2ad3e 100755 --- a/hubblescope/.abcli/hubble.sh +++ b/hubblescope/.abcli/hubble.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -function abcli_hubble() { +function hubble() { local task=$(abcli_unpack_keyword $1 help) if [ $task == "help" ]; then diff --git a/hubblescope/__init__.py b/hubblescope/__init__.py index d8d7d54..d8c1b5a 100644 --- a/hubblescope/__init__.py +++ b/hubblescope/__init__.py @@ -4,4 +4,4 @@ DESCRIPTION = f"{ICON} tools to access and process Hubble Space Telescope imagery and other datasets on AWS Open Data Registry." -VERSION = "4.15.1" +VERSION = "4.16.1"