blue-sandbox 5.38.1__tar.gz → 5.61.1__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {blue_sandbox-5.38.1/blue_sandbox.egg-info → blue_sandbox-5.61.1}/PKG-INFO +4 -3
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/README.md +2 -2
- blue_sandbox-5.61.1/blue_sandbox/.abcli/alias.sh +5 -0
- blue_sandbox-5.61.1/blue_sandbox/.abcli/microsoft_building_damage_assessment/ingest/list.sh +21 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/blue_sandbox/.abcli/microsoft_building_damage_assessment/ingest.sh +13 -4
- blue_sandbox-5.61.1/blue_sandbox/.abcli/microsoft_building_damage_assessment/label.sh +26 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/blue_sandbox/.abcli/tests/help.sh +4 -2
- blue_sandbox-5.61.1/blue_sandbox/.abcli/tests/microsoft_building_damage_assessment_ingest_list.sh +19 -0
- blue_sandbox-5.61.1/blue_sandbox/.abcli/tests/microsoft_building_damage_assessment_label.sh +12 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/blue_sandbox/README.py +1 -1
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/blue_sandbox/__init__.py +1 -1
- blue_sandbox-5.61.1/blue_sandbox/config.env +1 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/blue_sandbox/env.py +2 -2
- blue_sandbox-5.61.1/blue_sandbox/microsoft_building_damage_assessment/README.py +42 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/blue_sandbox/microsoft_building_damage_assessment/__main__.py +7 -1
- blue_sandbox-5.61.1/blue_sandbox/microsoft_building_damage_assessment/ingest.py +31 -0
- blue_sandbox-5.61.1/blue_sandbox/microsoft_building_damage_assessment/label.py +38 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1/blue_sandbox.egg-info}/PKG-INFO +4 -3
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/blue_sandbox.egg-info/SOURCES.txt +6 -2
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/blue_sandbox.egg-info/requires.txt +1 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/requirements.txt +1 -0
- blue_sandbox-5.38.1/blue_sandbox/.abcli/alias.sh +0 -5
- blue_sandbox-5.38.1/blue_sandbox/config.env +0 -1
- blue_sandbox-5.38.1/blue_sandbox/help/microsoft_building_damage_assessment.py +0 -42
- blue_sandbox-5.38.1/blue_sandbox/microsoft_building_damage_assessment/README.py +0 -34
- blue_sandbox-5.38.1/blue_sandbox/microsoft_building_damage_assessment/ingest.py +0 -19
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/LICENSE +0 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/MANIFEST.in +0 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/blue_sandbox/.abcli/abcli.sh +0 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/blue_sandbox/.abcli/actions.sh +0 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/blue_sandbox/.abcli/aka.sh +0 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/blue_sandbox/.abcli/blue_sandbox.sh +0 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/blue_sandbox/.abcli/browse.sh +0 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/blue_sandbox/.abcli/install.sh +0 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/blue_sandbox/.abcli/microsoft_building_damage_assessment.sh +0 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/blue_sandbox/.abcli/tests/README.sh +0 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/blue_sandbox/.abcli/tests/microsoft_building_damage_assessment_ingest.sh +0 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/blue_sandbox/.abcli/tests/version.sh +0 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/blue_sandbox/__main__.py +0 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/blue_sandbox/functions.py +0 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/blue_sandbox/help/__init__.py +0 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/blue_sandbox/help/__main__.py +0 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/blue_sandbox/help/functions.py +0 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/blue_sandbox/host.py +0 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/blue_sandbox/logger.py +0 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/blue_sandbox/microsoft_building_damage_assessment/__init__.py +0 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/blue_sandbox/sample.env +0 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/blue_sandbox/urls.py +0 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/blue_sandbox.egg-info/dependency_links.txt +0 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/blue_sandbox.egg-info/top_level.txt +0 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/pyproject.toml +0 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/setup.cfg +0 -0
- {blue_sandbox-5.38.1 → blue_sandbox-5.61.1}/setup.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: blue_sandbox
|
3
|
-
Version: 5.
|
3
|
+
Version: 5.61.1
|
4
4
|
Summary: 🌀 A sandbox for ideas and experiments.
|
5
5
|
Home-page: https://github.com/kamangir/blue-sandbox
|
6
6
|
Author: Arash Abadpour (Kamangir)
|
@@ -14,6 +14,7 @@ Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE
|
15
15
|
Requires-Dist: blueness
|
16
16
|
Requires-Dist: blue-options
|
17
|
+
Requires-Dist: blue_objects
|
17
18
|
Requires-Dist: abcli
|
18
19
|
Requires-Dist: boto3
|
19
20
|
Requires-Dist: geojson
|
@@ -47,11 +48,11 @@ pip install blue-sandbox
|
|
47
48
|
|
48
49
|
| | | |
|
49
50
|
| --- | --- | --- |
|
50
|
-
| 🌐[``@
|
51
|
+
| 🌐[``@damages``](https://github.com/kamangir/blue-sandbox/blob/main/blue_sandbox/microsoft_building_damage_assessment/README.md) [![image](https://github.com/microsoft/building-damage-assessment/raw/main/figures/damage.png)](https://github.com/kamangir/blue-sandbox/blob/main/blue_sandbox/microsoft_building_damage_assessment/README.md) Satellite imagery damage assessment workflow | 🌀[`experiment 2`](#) [![image](https://github.com/kamangir/assets/raw/main/blue-plugin/marquee.png?raw=true)](#) description of experiment 2 ... | 🌀[`experiment 3`](#) [![image](https://github.com/kamangir/assets/raw/main/blue-plugin/marquee.png?raw=true)](#) description of experiment 3 ... |
|
51
52
|
|
52
53
|
---
|
53
54
|
|
54
55
|
|
55
56
|
[![pylint](https://github.com/kamangir/blue-sandbox/actions/workflows/pylint.yml/badge.svg)](https://github.com/kamangir/blue-sandbox/actions/workflows/pylint.yml) [![pytest](https://github.com/kamangir/blue-sandbox/actions/workflows/pytest.yml/badge.svg)](https://github.com/kamangir/blue-sandbox/actions/workflows/pytest.yml) [![bashtest](https://github.com/kamangir/blue-sandbox/actions/workflows/bashtest.yml/badge.svg)](https://github.com/kamangir/blue-sandbox/actions/workflows/bashtest.yml) [![PyPI version](https://img.shields.io/pypi/v/blue-sandbox.svg)](https://pypi.org/project/blue-sandbox/) [![PyPI - Downloads](https://img.shields.io/pypi/dd/blue-sandbox)](https://pypistats.org/packages/blue-sandbox)
|
56
57
|
|
57
|
-
built by 🌀 [`blue_options-4.
|
58
|
+
built by 🌀 [`blue_options-4.180.1`](https://github.com/kamangir/awesome-bash-cli), based on 🌀 [`blue_sandbox-5.61.1`](https://github.com/kamangir/blue-sandbox).
|
@@ -8,11 +8,11 @@ pip install blue-sandbox
|
|
8
8
|
|
9
9
|
| | | |
|
10
10
|
| --- | --- | --- |
|
11
|
-
| 🌐[``@
|
11
|
+
| 🌐[``@damages``](https://github.com/kamangir/blue-sandbox/blob/main/blue_sandbox/microsoft_building_damage_assessment/README.md) [![image](https://github.com/microsoft/building-damage-assessment/raw/main/figures/damage.png)](https://github.com/kamangir/blue-sandbox/blob/main/blue_sandbox/microsoft_building_damage_assessment/README.md) Satellite imagery damage assessment workflow | 🌀[`experiment 2`](#) [![image](https://github.com/kamangir/assets/raw/main/blue-plugin/marquee.png?raw=true)](#) description of experiment 2 ... | 🌀[`experiment 3`](#) [![image](https://github.com/kamangir/assets/raw/main/blue-plugin/marquee.png?raw=true)](#) description of experiment 3 ... |
|
12
12
|
|
13
13
|
---
|
14
14
|
|
15
15
|
|
16
16
|
[![pylint](https://github.com/kamangir/blue-sandbox/actions/workflows/pylint.yml/badge.svg)](https://github.com/kamangir/blue-sandbox/actions/workflows/pylint.yml) [![pytest](https://github.com/kamangir/blue-sandbox/actions/workflows/pytest.yml/badge.svg)](https://github.com/kamangir/blue-sandbox/actions/workflows/pytest.yml) [![bashtest](https://github.com/kamangir/blue-sandbox/actions/workflows/bashtest.yml/badge.svg)](https://github.com/kamangir/blue-sandbox/actions/workflows/bashtest.yml) [![PyPI version](https://img.shields.io/pypi/v/blue-sandbox.svg)](https://pypi.org/project/blue-sandbox/) [![PyPI - Downloads](https://img.shields.io/pypi/dd/blue-sandbox)](https://pypistats.org/packages/blue-sandbox)
|
17
17
|
|
18
|
-
built by 🌀 [`blue_options-4.
|
18
|
+
built by 🌀 [`blue_options-4.180.1`](https://github.com/kamangir/awesome-bash-cli), based on 🌀 [`blue_sandbox-5.61.1`](https://github.com/kamangir/blue-sandbox).
|
@@ -0,0 +1,21 @@
|
|
1
|
+
#! /usr/bin/env bash
|
2
|
+
|
3
|
+
function blue_sandbox_microsoft_building_damage_assessment_ingest_list() {
|
4
|
+
local options=$1
|
5
|
+
local event_name=$(abcli_option "$options" event all)
|
6
|
+
|
7
|
+
local suffix=$2
|
8
|
+
|
9
|
+
local url="s3://maxar-opendata/events/"
|
10
|
+
|
11
|
+
[[ "$event_name" != all ]] &&
|
12
|
+
url="$url$event_name/ard/"
|
13
|
+
|
14
|
+
[[ ! -z "$suffix" ]] &&
|
15
|
+
url="$url$suffix"
|
16
|
+
|
17
|
+
abcli_eval ,$options \
|
18
|
+
aws s3 ls --no-sign-request $url
|
19
|
+
|
20
|
+
return 0
|
21
|
+
}
|
@@ -2,6 +2,13 @@
|
|
2
2
|
|
3
3
|
function blue_sandbox_microsoft_building_damage_assessment_ingest() {
|
4
4
|
local options=$1
|
5
|
+
|
6
|
+
local show_list=$(abcli_option_int "$options" list 0)
|
7
|
+
if [[ "$show_list" == 1 ]]; then
|
8
|
+
blue_sandbox_microsoft_building_damage_assessment_ingest_list "${@:2}"
|
9
|
+
return
|
10
|
+
fi
|
11
|
+
|
5
12
|
local do_dryrun=$(abcli_option_int "$options" dryrun 0)
|
6
13
|
local do_download=$(abcli_option_int "$options" download $(abcli_not $do_dryrun))
|
7
14
|
local do_gdal=$(abcli_option_int "$options" gdal 1)
|
@@ -19,10 +26,12 @@ function blue_sandbox_microsoft_building_damage_assessment_ingest() {
|
|
19
26
|
pushd $object_path >/dev/null
|
20
27
|
|
21
28
|
# https://github.com/microsoft/building-damage-assessment/blob/main/SATELLITE_WORKFLOW.md#1-image-acquisition-and-label-generation
|
22
|
-
mkdir -pv
|
23
|
-
cd
|
29
|
+
mkdir -pv raw
|
30
|
+
cd raw
|
24
31
|
|
25
32
|
if [[ "$do_download" == 1 ]]; then
|
33
|
+
# TODO: use $event_name and $count (options +=)
|
34
|
+
|
26
35
|
abcli_eval ,$options \
|
27
36
|
wget https://maxar-opendata.s3.amazonaws.com/events/Maui-Hawaii-fires-Aug-23/ard/04/122000330002/2023-08-12/10300100EB15FF00-visual.tif
|
28
37
|
[[ $? -ne 0 ]] && return 1
|
@@ -48,8 +57,6 @@ function blue_sandbox_microsoft_building_damage_assessment_ingest() {
|
|
48
57
|
rm -v maxar_lahaina_8_12_2023-visual.vrt
|
49
58
|
fi
|
50
59
|
|
51
|
-
cd ../../..
|
52
|
-
|
53
60
|
popd >/dev/null
|
54
61
|
|
55
62
|
abcli_eval dryrun=$do_dryrun \
|
@@ -65,3 +72,5 @@ function blue_sandbox_microsoft_building_damage_assessment_ingest() {
|
|
65
72
|
|
66
73
|
return $status
|
67
74
|
}
|
75
|
+
|
76
|
+
abcli_source_caller_suffix_path /ingest
|
@@ -0,0 +1,26 @@
|
|
1
|
+
#! /usr/bin/env bash
|
2
|
+
|
3
|
+
function blue_sandbox_microsoft_building_damage_assessment_label() {
|
4
|
+
local options=$1
|
5
|
+
local do_dryrun=$(abcli_option_int "$options" dryrun 0)
|
6
|
+
local do_download=$(abcli_option_int "$options" download $(abcli_not $do_dryrun))
|
7
|
+
local do_upload=$(abcli_option_int "$options" upload $(abcli_not $do_dryrun))
|
8
|
+
|
9
|
+
local object_name=$(abcli_clarify_object $2 .)
|
10
|
+
[[ "$do_download" == 1 ]] &&
|
11
|
+
abcli_download - $object_name
|
12
|
+
|
13
|
+
abcli_log "labeling $object_name ..."
|
14
|
+
|
15
|
+
abcli_eval dryrun=$do_dryrun \
|
16
|
+
python3 -m blue_sandbox.microsoft_building_damage_assessment \
|
17
|
+
label \
|
18
|
+
--object_name $object_name \
|
19
|
+
"${@:3}"
|
20
|
+
local status="$?"
|
21
|
+
|
22
|
+
[[ "$do_upload" == 1 ]] &&
|
23
|
+
abcli_upload - $object_name
|
24
|
+
|
25
|
+
return $status
|
26
|
+
}
|
blue_sandbox-5.61.1/blue_sandbox/.abcli/tests/microsoft_building_damage_assessment_ingest_list.sh
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
#! /usr/bin/env bash
|
2
|
+
|
3
|
+
function test_blue_sandbox_microsoft_building_damage_assessment_ingest_list() {
|
4
|
+
local options=$1
|
5
|
+
|
6
|
+
abcli_eval ,$options \
|
7
|
+
blue_sandbox_microsoft_building_damage_assessment_ingest list
|
8
|
+
[[ $? -ne 0 ]] && return 1
|
9
|
+
|
10
|
+
abcli_eval ,$options \
|
11
|
+
blue_sandbox_microsoft_building_damage_assessment_ingest list \
|
12
|
+
event=Maui-Hawaii-fires-Aug-23
|
13
|
+
[[ $? -ne 0 ]] && return 1
|
14
|
+
|
15
|
+
abcli_eval ,$options \
|
16
|
+
blue_sandbox_microsoft_building_damage_assessment_ingest list \
|
17
|
+
event=Maui-Hawaii-fires-Aug-23 \
|
18
|
+
04/
|
19
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
#! /usr/bin/env bash
|
2
|
+
|
3
|
+
function test_blue_sandbox_microsoft_building_damage_assessment_label() {
|
4
|
+
local options=$1
|
5
|
+
|
6
|
+
abcli_eval ,$options \
|
7
|
+
blue_sandbox_microsoft_building_damage_assessment \
|
8
|
+
label \
|
9
|
+
~upload,$options \
|
10
|
+
$DAMAGES_TEST_DATASET_OBJECT_NAME \
|
11
|
+
"${@:2}"
|
12
|
+
}
|
@@ -11,7 +11,7 @@ from blue_sandbox.microsoft_building_damage_assessment import (
|
|
11
11
|
items = [
|
12
12
|
"{}[`{}`]({}) [![image]({})]({}) {}".format(
|
13
13
|
"🌐",
|
14
|
-
"`@
|
14
|
+
"`@damages`",
|
15
15
|
"https://github.com/kamangir/blue-sandbox/blob/main/blue_sandbox/microsoft_building_damage_assessment/README.md",
|
16
16
|
"https://github.com/microsoft/building-damage-assessment/raw/main/figures/damage.png",
|
17
17
|
"https://github.com/kamangir/blue-sandbox/blob/main/blue_sandbox/microsoft_building_damage_assessment/README.md",
|
@@ -0,0 +1 @@
|
|
1
|
+
DAMAGES_TEST_DATASET_OBJECT_NAME=Maui-Hawaii-fires-Aug-23-ingest-2025-01-10-qqJqhm
|
@@ -0,0 +1,42 @@
|
|
1
|
+
from typing import Dict
|
2
|
+
|
3
|
+
from blue_sandbox.env import DAMAGES_TEST_DATASET_OBJECT_NAME
|
4
|
+
|
5
|
+
list_of_steps: Dict[str, Dict] = {
|
6
|
+
"ingest": {
|
7
|
+
"object_name": DAMAGES_TEST_DATASET_OBJECT_NAME,
|
8
|
+
"image_name": "Maui-Hawaii-fires-Aug-23-damage-2025-01-09-GgnjQC",
|
9
|
+
},
|
10
|
+
"label": {
|
11
|
+
"object_name": DAMAGES_TEST_DATASET_OBJECT_NAME,
|
12
|
+
"image_name": DAMAGES_TEST_DATASET_OBJECT_NAME,
|
13
|
+
},
|
14
|
+
"train": {"object_name": "", "image_name": ""},
|
15
|
+
"predict": {"object_name": "", "image_name": ""},
|
16
|
+
"summarize": {"object_name": "", "image_name": ""},
|
17
|
+
}
|
18
|
+
|
19
|
+
items = (
|
20
|
+
[f"`{step}`" for step in list_of_steps]
|
21
|
+
+ [
|
22
|
+
(
|
23
|
+
"[`{}`](https://kamangir-public.s3.ca-central-1.amazonaws.com/{}.tar.gz)".format(
|
24
|
+
step["object_name"],
|
25
|
+
step["image_name"],
|
26
|
+
)
|
27
|
+
if step["object_name"]
|
28
|
+
else ""
|
29
|
+
)
|
30
|
+
for step in list_of_steps.values()
|
31
|
+
]
|
32
|
+
+ [
|
33
|
+
(
|
34
|
+
"![image](https://github.com/kamangir/assets/blob/main/blue-sandbox/{}.png?raw=true)".format(
|
35
|
+
step["image_name"],
|
36
|
+
)
|
37
|
+
if step["image_name"]
|
38
|
+
else ""
|
39
|
+
)
|
40
|
+
for step in list_of_steps.values()
|
41
|
+
]
|
42
|
+
)
|
@@ -5,6 +5,7 @@ from blueness.argparse.generic import sys_exit
|
|
5
5
|
|
6
6
|
from blue_sandbox import NAME
|
7
7
|
from blue_sandbox.microsoft_building_damage_assessment.ingest import ingest
|
8
|
+
from blue_sandbox.microsoft_building_damage_assessment.label import label
|
8
9
|
from blue_sandbox.help.microsoft_building_damage_assessment import list_of_events
|
9
10
|
from blue_sandbox.logger import logger
|
10
11
|
|
@@ -14,7 +15,7 @@ parser = argparse.ArgumentParser(NAME)
|
|
14
15
|
parser.add_argument(
|
15
16
|
"task",
|
16
17
|
type=str,
|
17
|
-
help="ingest",
|
18
|
+
help="ingest | label",
|
18
19
|
)
|
19
20
|
parser.add_argument(
|
20
21
|
"--object_name",
|
@@ -41,6 +42,11 @@ if args.task == "ingest":
|
|
41
42
|
event_name=args.event_name,
|
42
43
|
verbose=args.verbose == 1,
|
43
44
|
)
|
45
|
+
elif args.task == "label":
|
46
|
+
success = label(
|
47
|
+
object_name=args.object_name,
|
48
|
+
verbose=args.verbose == 1,
|
49
|
+
)
|
44
50
|
else:
|
45
51
|
success = None
|
46
52
|
|
@@ -0,0 +1,31 @@
|
|
1
|
+
from blueness import module
|
2
|
+
|
3
|
+
from blue_objects import mlflow, metadata
|
4
|
+
|
5
|
+
from blue_sandbox import NAME
|
6
|
+
from blue_sandbox.logger import logger
|
7
|
+
|
8
|
+
|
9
|
+
NAME = module.name(__file__, NAME)
|
10
|
+
|
11
|
+
|
12
|
+
def ingest(
|
13
|
+
event_name: str,
|
14
|
+
object_name: str,
|
15
|
+
verbose: bool = False,
|
16
|
+
) -> bool:
|
17
|
+
logger.info(f"{NAME}.ingest({event_name}) -> {object_name}")
|
18
|
+
|
19
|
+
return all(
|
20
|
+
[
|
21
|
+
mlflow.set_tags(
|
22
|
+
object_name,
|
23
|
+
{"event": event_name},
|
24
|
+
),
|
25
|
+
metadata.post_to_object(
|
26
|
+
object_name,
|
27
|
+
"ingest",
|
28
|
+
{"event": event_name},
|
29
|
+
),
|
30
|
+
]
|
31
|
+
)
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import os
|
2
|
+
|
3
|
+
from blueness import module
|
4
|
+
from blue_objects import metadata, file, objects
|
5
|
+
from blue_objects.env import abcli_path_git
|
6
|
+
|
7
|
+
from blue_sandbox import NAME
|
8
|
+
from blue_sandbox.logger import logger
|
9
|
+
|
10
|
+
|
11
|
+
NAME = module.name(__file__, NAME)
|
12
|
+
|
13
|
+
|
14
|
+
def label(
|
15
|
+
object_name: str,
|
16
|
+
verbose: bool = False,
|
17
|
+
) -> bool:
|
18
|
+
logger.info(f"{NAME}.label: {object_name}")
|
19
|
+
|
20
|
+
geojson_filename = os.path.join(
|
21
|
+
abcli_path_git,
|
22
|
+
"building-damage-assessment/data/demo/labels/Maui_Wildfires_August_0.geojson",
|
23
|
+
)
|
24
|
+
|
25
|
+
if not file.copy(
|
26
|
+
geojson_filename,
|
27
|
+
objects.path_of(
|
28
|
+
filename="label.geojson",
|
29
|
+
object_name=object_name,
|
30
|
+
),
|
31
|
+
):
|
32
|
+
return False
|
33
|
+
|
34
|
+
return metadata.post_to_object(
|
35
|
+
object_name,
|
36
|
+
"label",
|
37
|
+
{"geojson": geojson_filename},
|
38
|
+
)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: blue_sandbox
|
3
|
-
Version: 5.
|
3
|
+
Version: 5.61.1
|
4
4
|
Summary: 🌀 A sandbox for ideas and experiments.
|
5
5
|
Home-page: https://github.com/kamangir/blue-sandbox
|
6
6
|
Author: Arash Abadpour (Kamangir)
|
@@ -14,6 +14,7 @@ Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE
|
15
15
|
Requires-Dist: blueness
|
16
16
|
Requires-Dist: blue-options
|
17
|
+
Requires-Dist: blue_objects
|
17
18
|
Requires-Dist: abcli
|
18
19
|
Requires-Dist: boto3
|
19
20
|
Requires-Dist: geojson
|
@@ -47,11 +48,11 @@ pip install blue-sandbox
|
|
47
48
|
|
48
49
|
| | | |
|
49
50
|
| --- | --- | --- |
|
50
|
-
| 🌐[``@
|
51
|
+
| 🌐[``@damages``](https://github.com/kamangir/blue-sandbox/blob/main/blue_sandbox/microsoft_building_damage_assessment/README.md) [![image](https://github.com/microsoft/building-damage-assessment/raw/main/figures/damage.png)](https://github.com/kamangir/blue-sandbox/blob/main/blue_sandbox/microsoft_building_damage_assessment/README.md) Satellite imagery damage assessment workflow | 🌀[`experiment 2`](#) [![image](https://github.com/kamangir/assets/raw/main/blue-plugin/marquee.png?raw=true)](#) description of experiment 2 ... | 🌀[`experiment 3`](#) [![image](https://github.com/kamangir/assets/raw/main/blue-plugin/marquee.png?raw=true)](#) description of experiment 3 ... |
|
51
52
|
|
52
53
|
---
|
53
54
|
|
54
55
|
|
55
56
|
[![pylint](https://github.com/kamangir/blue-sandbox/actions/workflows/pylint.yml/badge.svg)](https://github.com/kamangir/blue-sandbox/actions/workflows/pylint.yml) [![pytest](https://github.com/kamangir/blue-sandbox/actions/workflows/pytest.yml/badge.svg)](https://github.com/kamangir/blue-sandbox/actions/workflows/pytest.yml) [![bashtest](https://github.com/kamangir/blue-sandbox/actions/workflows/bashtest.yml/badge.svg)](https://github.com/kamangir/blue-sandbox/actions/workflows/bashtest.yml) [![PyPI version](https://img.shields.io/pypi/v/blue-sandbox.svg)](https://pypi.org/project/blue-sandbox/) [![PyPI - Downloads](https://img.shields.io/pypi/dd/blue-sandbox)](https://pypistats.org/packages/blue-sandbox)
|
56
57
|
|
57
|
-
built by 🌀 [`blue_options-4.
|
58
|
+
built by 🌀 [`blue_options-4.180.1`](https://github.com/kamangir/awesome-bash-cli), based on 🌀 [`blue_sandbox-5.61.1`](https://github.com/kamangir/blue-sandbox).
|
@@ -28,15 +28,19 @@ blue_sandbox/.abcli/browse.sh
|
|
28
28
|
blue_sandbox/.abcli/install.sh
|
29
29
|
blue_sandbox/.abcli/microsoft_building_damage_assessment.sh
|
30
30
|
blue_sandbox/.abcli/microsoft_building_damage_assessment/ingest.sh
|
31
|
+
blue_sandbox/.abcli/microsoft_building_damage_assessment/label.sh
|
32
|
+
blue_sandbox/.abcli/microsoft_building_damage_assessment/ingest/list.sh
|
31
33
|
blue_sandbox/.abcli/tests/README.sh
|
32
34
|
blue_sandbox/.abcli/tests/help.sh
|
33
35
|
blue_sandbox/.abcli/tests/microsoft_building_damage_assessment_ingest.sh
|
36
|
+
blue_sandbox/.abcli/tests/microsoft_building_damage_assessment_ingest_list.sh
|
37
|
+
blue_sandbox/.abcli/tests/microsoft_building_damage_assessment_label.sh
|
34
38
|
blue_sandbox/.abcli/tests/version.sh
|
35
39
|
blue_sandbox/help/__init__.py
|
36
40
|
blue_sandbox/help/__main__.py
|
37
41
|
blue_sandbox/help/functions.py
|
38
|
-
blue_sandbox/help/microsoft_building_damage_assessment.py
|
39
42
|
blue_sandbox/microsoft_building_damage_assessment/README.py
|
40
43
|
blue_sandbox/microsoft_building_damage_assessment/__init__.py
|
41
44
|
blue_sandbox/microsoft_building_damage_assessment/__main__.py
|
42
|
-
blue_sandbox/microsoft_building_damage_assessment/ingest.py
|
45
|
+
blue_sandbox/microsoft_building_damage_assessment/ingest.py
|
46
|
+
blue_sandbox/microsoft_building_damage_assessment/label.py
|
@@ -1 +0,0 @@
|
|
1
|
-
BLUE_PLUGIN_CONFIG=value
|
@@ -1,42 +0,0 @@
|
|
1
|
-
from typing import List
|
2
|
-
|
3
|
-
from blue_options.terminal import show_usage, xtra
|
4
|
-
|
5
|
-
list_of_events = ["Maui-Hawaii-fires-Aug-23"]
|
6
|
-
|
7
|
-
|
8
|
-
def help_ingest(
|
9
|
-
tokens: List[str],
|
10
|
-
mono: bool,
|
11
|
-
) -> str:
|
12
|
-
options = "".join(
|
13
|
-
[
|
14
|
-
xtra("~download,dryrun,", mono=mono),
|
15
|
-
"event=<event>",
|
16
|
-
xtra(",~gdal,~rm,~upload", mono=mono),
|
17
|
-
]
|
18
|
-
)
|
19
|
-
|
20
|
-
args = [
|
21
|
-
"[--verbose 1]",
|
22
|
-
]
|
23
|
-
|
24
|
-
return show_usage(
|
25
|
-
[
|
26
|
-
"@damage",
|
27
|
-
"ingest",
|
28
|
-
f"[{options}]",
|
29
|
-
"[-|<object-name>]",
|
30
|
-
]
|
31
|
-
+ args,
|
32
|
-
"ingest <event> -> <object-name>.",
|
33
|
-
{
|
34
|
-
"event: {}".format(" | ".join(list_of_events)): [],
|
35
|
-
},
|
36
|
-
mono=mono,
|
37
|
-
)
|
38
|
-
|
39
|
-
|
40
|
-
help_functions = {
|
41
|
-
"ingest": help_ingest,
|
42
|
-
}
|
@@ -1,34 +0,0 @@
|
|
1
|
-
from typing import Dict
|
2
|
-
|
3
|
-
list_of_steps: Dict[str, Dict] = {
|
4
|
-
"ingest": "Maui-Hawaii-fires-Aug-23-damage-2025-01-09-GgnjQC",
|
5
|
-
"label": "",
|
6
|
-
"train": "",
|
7
|
-
"predict": "",
|
8
|
-
"summarize": "",
|
9
|
-
}
|
10
|
-
|
11
|
-
items = (
|
12
|
-
[f"`{step}`" for step in list_of_steps]
|
13
|
-
+ [
|
14
|
-
(
|
15
|
-
"[`{}`](https://kamangir-public.s3.ca-central-1.amazonaws.com/{}.tar.gz)".format(
|
16
|
-
object_name,
|
17
|
-
object_name,
|
18
|
-
)
|
19
|
-
if object_name
|
20
|
-
else ""
|
21
|
-
)
|
22
|
-
for object_name in list_of_steps.values()
|
23
|
-
]
|
24
|
-
+ [
|
25
|
-
(
|
26
|
-
"[![image](https://github.com/kamangir/assets/blob/main/blue-sandbox/{}.png?raw=true)](#)".format(
|
27
|
-
object_name,
|
28
|
-
)
|
29
|
-
if object_name
|
30
|
-
else ""
|
31
|
-
)
|
32
|
-
for object_name in list_of_steps.values()
|
33
|
-
]
|
34
|
-
)
|
@@ -1,19 +0,0 @@
|
|
1
|
-
from blueness import module
|
2
|
-
|
3
|
-
from blue_sandbox import NAME
|
4
|
-
from blue_sandbox.logger import logger
|
5
|
-
|
6
|
-
|
7
|
-
NAME = module.name(__file__, NAME)
|
8
|
-
|
9
|
-
|
10
|
-
def ingest(
|
11
|
-
event_name: str,
|
12
|
-
object_name: str,
|
13
|
-
verbose: bool = False,
|
14
|
-
) -> bool:
|
15
|
-
logger.info(f"{NAME}.ingest({event_name}) -> {object_name}")
|
16
|
-
|
17
|
-
logger.info("🪄")
|
18
|
-
|
19
|
-
return True
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|