Skip to content

Commit

Permalink
-> pypi - kamangir/bolt#746
Browse files Browse the repository at this point in the history
  • Loading branch information
kamangir committed May 23, 2024
1 parent f460be0 commit 2e2c142
Show file tree
Hide file tree
Showing 14 changed files with 41 additions and 34 deletions.
24 changes: 12 additions & 12 deletions .abcli/hubble.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,17 @@ function hubble() {
abcli_hubble "$@"
}

function hubblescope() {
abcli_hubble "$@"
}

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

if [ $task == "help" ]; then
abcli_hubble_download "$@"
abcli_hubble_list "$@"
abcli_hubble_select "$@"

local task
for task in pylint pytest test; do
abcli_hubble $task "$@"
done

if [ "$(abcli_keyword_is $2 verbose)" == true ]; then
python3 -m hubble --help
fi
return
fi

Expand All @@ -40,9 +35,14 @@ function abcli_hubble() {
return
fi

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

python3 -m hubble "$@"
}

function abcli_hubble_get() {
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include requirements.txt
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# hubble 🔭
# hubble (hubblescope) 🔭

`hubble` 🔭 is a set of tools to access and process [Hubble Space Telescope imagery](https://registry.opendata.aws/hst/) and other datasets on [AWS Open Data Registry](https://registry.opendata.aws/).
`hubble` 🔭 is a set of tools to access and process [Hubble Space Telescope imagery](https://registry.opendata.aws/hst/) and other datasets on [AWS Open Data Registry](https://registry.opendata.aws/).

---

Expand All @@ -26,7 +26,6 @@ hubble select [object] <hubble-object-name>
`hubble` supports `list`ing `dataset`s and the `objects`s in them and downloading the `object`s. here is an example use for ingesting the object `public/u4ge/u4ge0106r` from the dataset [Hubble Space Telescope](https://registry.opendata.aws/hst/) (`hst`),
```bash
abcli select; open .
hubble select dataset hst
Expand All @@ -38,4 +37,4 @@ hubble download ~dryrun
![image](./assets/hst/2023-09-15-19-34-36-01196.png)
also see [`./notebooks/hst.ipynb`](./notebooks/hst.ipynb)
also see [`./notebooks/hst.ipynb`](./notebooks/hst.ipynb)
4 changes: 2 additions & 2 deletions hubble/__init__.py → hubblescope/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
NAME = "hubble"
NAME = "hubblescope"

ICON = "🔭"

DESCRIPTION = f"{ICON} tools to access and process Hubble Space Telescope imagery and other datasets on AWS Open Data Registry."

VERSION = "3.331.1"
VERSION = "4.3.1"
8 changes: 4 additions & 4 deletions hubble/__main__.py → hubblescope/__main__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import argparse
from hubble.datasets import get
from hubble.ingest import ingest
from hubble import NAME, VERSION, DESCRIPTION
from hubble.logger import logger
from hubblescope.datasets import get
from hubblescope.ingest import ingest
from hubblescope import NAME, VERSION, DESCRIPTION
from hubblescope.logger import logger

parser = argparse.ArgumentParser(NAME, description=f"{NAME}-{VERSION}")
parser.add_argument(
Expand Down
2 changes: 1 addition & 1 deletion hubble/datasets.py → hubblescope/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from abcli import env, file
from typing import Any
from abcli import string
from hubble.logger import logger
from hubblescope.logger import logger


# https://registry.opendata.aws/hst/
Expand Down
4 changes: 2 additions & 2 deletions hubble/fits.py → hubblescope/fits.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import matplotlib.pyplot as plt
from abcli import file, path
from abcli.plugins.graphics.gif import generate_animated_gif
from hubble import NAME
from hubble.logger import logger
from hubblescope import NAME
from hubblescope.logger import logger


def load_fit_file(
Expand Down
6 changes: 3 additions & 3 deletions hubble/ingest.py → hubblescope/ingest.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from hubble import NAME
from hubblescope import NAME
from tqdm import tqdm
from abcli import file
from hubble.fits import load_fit_file
from hubblescope.fits import load_fit_file
from abcli.modules import objects
from hubble.logger import logger
from hubblescope.logger import logger


def ingest(
Expand Down
2 changes: 1 addition & 1 deletion hubble/logger.py → hubblescope/logger.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from abcli.logger import get_logger
from hubble import ICON
from hubblescope import ICON

logger = get_logger(ICON)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from hubble import VERSION
from hubblescope import VERSION


def test_version():
Expand Down
File renamed without changes.
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[build-system]
requires = [
"setuptools>=42",
"wheel",
"blueness",
]
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
blueness
abcli
astropy[recommended]
boto3
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from setuptools import setup

from hubble import NAME, VERSION, DESCRIPTION
from hubblescope import NAME, VERSION, DESCRIPTION
from blueness.pypi import setup

setup(
filename=__file__,
repo_name="hubble",
name=NAME,
author="[email protected]",
version=VERSION,
description=DESCRIPTION,
packages=[NAME],
Expand Down

0 comments on commit 2e2c142

Please sign in to comment.