Skip to content

Commit

Permalink
refactor - kamangir/bolt#746
Browse files Browse the repository at this point in the history
  • Loading branch information
kamangir committed May 25, 2024
1 parent 2e2c142 commit f2fd415
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 42 deletions.
9 changes: 9 additions & 0 deletions .abcli/aka.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#! /usr/bin/env bash

function hubble() {
abcli_hubble "$@"
}

function hubblescope() {
abcli_hubble "$@"
}
9 changes: 9 additions & 0 deletions .abcli/get.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#! /usr/bin/env bash

function abcli_hubble_get() {
python3 -m hubble get \
--what "$1" \
--dataset_name "$2" \
--object_name "$3" \
"${@:4}"
}
44 changes: 3 additions & 41 deletions .abcli/hubble.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
#! /usr/bin/env bash

function hubble() {
abcli_hubble "$@"
}

function hubblescope() {
abcli_hubble "$@"
}

function abcli_hubble() {
local task=$(abcli_unpack_keyword $1 help)

Expand All @@ -18,39 +10,9 @@ function abcli_hubble() {
return
fi

local function_name=abcli_hubble_$task
if [[ $(type -t $function_name) == "function" ]]; then
$function_name "${@:2}"
return
fi

if [ "$task" == "init" ]; then
abcli_init hubble "${@:2}"
return
fi

if [[ "|pylint|pytest|test|" == *"|$task|"* ]]; then
abcli_${task} plugin=hubble,$2 \
"${@:3}"
return
fi

if [[ "|pypi|" == *"|$task|"* ]]; then
abcli_${task} "$2" \
plugin=hubble,$3 \
"${@:4}"
return
fi

python3 -m hubble "$@"
}

function abcli_hubble_get() {
python3 -m hubble get \
--what "$1" \
--dataset_name "$2" \
--object_name "$3" \
"${@:4}"
abcli_generic_task \
plugin=hubble,task=$task \
"${@:2}"
}

abcli_source_path \
Expand Down
2 changes: 1 addition & 1 deletion hubblescope/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.3.1"
VERSION = "4.4.1"

0 comments on commit f2fd415

Please sign in to comment.