bluer-objects 6.294.1__py3-none-any.whl → 6.301.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of bluer-objects might be problematic. Click here for more details.
- bluer_objects/.abcli/host.sh +23 -7
- bluer_objects/README/items.py +33 -0
- bluer_objects/__init__.py +1 -1
- bluer_objects/help/host.py +6 -4
- bluer_objects/tests/test_README_items.py +120 -0
- {bluer_objects-6.294.1.dist-info → bluer_objects-6.301.1.dist-info}/METADATA +2 -2
- {bluer_objects-6.294.1.dist-info → bluer_objects-6.301.1.dist-info}/RECORD +10 -9
- {bluer_objects-6.294.1.dist-info → bluer_objects-6.301.1.dist-info}/WHEEL +0 -0
- {bluer_objects-6.294.1.dist-info → bluer_objects-6.301.1.dist-info}/licenses/LICENSE +0 -0
- {bluer_objects-6.294.1.dist-info → bluer_objects-6.301.1.dist-info}/top_level.txt +0 -0
bluer_objects/.abcli/host.sh
CHANGED
|
@@ -12,15 +12,31 @@ function bluer_objects_host() {
|
|
|
12
12
|
return
|
|
13
13
|
fi
|
|
14
14
|
|
|
15
|
-
if [
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
if [[ "|reboot|shutdown|" == *"|$task|"* ]]; then
|
|
16
|
+
local command_line
|
|
17
|
+
[[ $task == "reboot" ]] &&
|
|
18
|
+
command_line="sudo reboot"
|
|
19
|
+
[[ $task == "shutdown" ]] &&
|
|
20
|
+
command_line="sudo shutdown -h now"
|
|
21
|
+
|
|
22
|
+
local rpi=$(bluer_ai_option_int "$options" rpi 0)
|
|
23
|
+
if [[ "$rpi" == 1 ]]; then
|
|
24
|
+
local machine_name=$3
|
|
25
|
+
if [[ -z "$machine_name" ]]; then
|
|
26
|
+
bluer_ai_log_error "machine_name not found."
|
|
27
|
+
return 1
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
ssh \
|
|
31
|
+
pi@$machine_name.local \
|
|
32
|
+
$command_line
|
|
33
|
+
|
|
34
|
+
return
|
|
35
|
+
fi
|
|
20
36
|
|
|
21
|
-
if [ $task == "shutdown" ]; then
|
|
22
37
|
bluer_ai_eval ,$options \
|
|
23
|
-
|
|
38
|
+
$command_line
|
|
39
|
+
|
|
24
40
|
return
|
|
25
41
|
fi
|
|
26
42
|
|
bluer_objects/README/items.py
CHANGED
|
@@ -59,3 +59,36 @@ def Items(
|
|
|
59
59
|
output = sorted(output)
|
|
60
60
|
|
|
61
61
|
return output
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
# dict of {name, url, marquee, description}
|
|
65
|
+
def Items_of_dict(
|
|
66
|
+
dict_of_things: Dict[str, Dict],
|
|
67
|
+
) -> List[str]:
|
|
68
|
+
return Items(
|
|
69
|
+
sorted(
|
|
70
|
+
[
|
|
71
|
+
{
|
|
72
|
+
"name": thing_name,
|
|
73
|
+
"marquee": info.get("marquee", ""),
|
|
74
|
+
"url": f"./{thing_name}.md",
|
|
75
|
+
}
|
|
76
|
+
for thing_name, info in dict_of_things.items()
|
|
77
|
+
if thing_name != "template"
|
|
78
|
+
],
|
|
79
|
+
key=lambda x: x["name"],
|
|
80
|
+
)
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
# dict of {name, url, marquee, description}
|
|
85
|
+
def list_of_dict(
|
|
86
|
+
dict_of_things: Dict[str, Dict],
|
|
87
|
+
) -> List[str]:
|
|
88
|
+
return sorted(
|
|
89
|
+
[
|
|
90
|
+
f"- [{thing_name}](./{thing_name}.md)"
|
|
91
|
+
for thing_name in dict_of_things
|
|
92
|
+
if thing_name != "template"
|
|
93
|
+
]
|
|
94
|
+
)
|
bluer_objects/__init__.py
CHANGED
bluer_objects/help/host.py
CHANGED
|
@@ -24,15 +24,16 @@ def help_reboot(
|
|
|
24
24
|
tokens: List[str],
|
|
25
25
|
mono: bool,
|
|
26
26
|
) -> str:
|
|
27
|
-
options = xtra("dryrun", mono=mono)
|
|
27
|
+
options = xtra("dryrun,rpi", mono=mono)
|
|
28
28
|
|
|
29
29
|
return show_usage(
|
|
30
30
|
[
|
|
31
31
|
"@host",
|
|
32
32
|
"reboot",
|
|
33
33
|
f"[{options}]",
|
|
34
|
+
"[<machine-name>]",
|
|
34
35
|
],
|
|
35
|
-
"reboot
|
|
36
|
+
"reboot.",
|
|
36
37
|
mono=mono,
|
|
37
38
|
)
|
|
38
39
|
|
|
@@ -41,15 +42,16 @@ def help_shutdown(
|
|
|
41
42
|
tokens: List[str],
|
|
42
43
|
mono: bool,
|
|
43
44
|
) -> str:
|
|
44
|
-
options = xtra("dryrun", mono=mono)
|
|
45
|
+
options = xtra("dryrun,rpi", mono=mono)
|
|
45
46
|
|
|
46
47
|
return show_usage(
|
|
47
48
|
[
|
|
48
49
|
"@host",
|
|
49
50
|
"shutdown",
|
|
50
51
|
f"[{options}]",
|
|
52
|
+
"[<machine-name>]",
|
|
51
53
|
],
|
|
52
|
-
"shutdown
|
|
54
|
+
"shutdown.",
|
|
53
55
|
mono=mono,
|
|
54
56
|
)
|
|
55
57
|
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
from bluer_objects.README.items import ImageItems, Items, Items_of_dict, list_of_dict
|
|
2
|
+
from bluer_objects.README.consts import assets, assets2
|
|
3
|
+
from bluer_objects import markdown
|
|
4
|
+
from bluer_objects import env
|
|
5
|
+
|
|
6
|
+
dict_of_validations = dict_of_validations = {
|
|
7
|
+
"village-1": {
|
|
8
|
+
"ugv_name": "arzhang",
|
|
9
|
+
"items": ImageItems(
|
|
10
|
+
{
|
|
11
|
+
f"{assets2}/arzhang/20250905_120526.jpg": "",
|
|
12
|
+
f"{assets2}/arzhang/20250905_120808.jpg": "",
|
|
13
|
+
f"{assets2}/arzhang/20250905_121030.jpg": "",
|
|
14
|
+
f"{assets2}/arzhang/20250905_121032.jpg": "",
|
|
15
|
+
f"{assets2}/arzhang/20250905_121702.jpg": "",
|
|
16
|
+
f"{assets2}/arzhang/20250905_121711.jpg": "",
|
|
17
|
+
}
|
|
18
|
+
),
|
|
19
|
+
"marquee": f"{assets}/2025-09-05-11-48-27-d56azo/VID-20250905-WA0014_1.gif",
|
|
20
|
+
},
|
|
21
|
+
"village-2": {
|
|
22
|
+
"ugv_name": "arzhang",
|
|
23
|
+
"items": ImageItems(
|
|
24
|
+
{
|
|
25
|
+
f"{assets2}/arzhang/20250922_094548.jpg": "",
|
|
26
|
+
f"{assets2}/arzhang/20250922_101156.jpg": "",
|
|
27
|
+
f"{assets2}/arzhang/20250922_101409.jpg": "",
|
|
28
|
+
f"{assets2}/arzhang/20250922_101557.jpg": "",
|
|
29
|
+
f"{assets2}/arzhang/20250922_101653.jpg": "",
|
|
30
|
+
f"{assets2}/arzhang/20250922_102822.jpg": "",
|
|
31
|
+
}
|
|
32
|
+
),
|
|
33
|
+
"macros": {
|
|
34
|
+
"debug_objects": markdown.generate_table(
|
|
35
|
+
Items(
|
|
36
|
+
[
|
|
37
|
+
{
|
|
38
|
+
"name": object_name,
|
|
39
|
+
"url": "https://{}.{}/{}".format(
|
|
40
|
+
env.S3_PUBLIC_STORAGE_BUCKET,
|
|
41
|
+
env.S3_STORAGE_ENDPOINT_URL.split("https://", 1)[1],
|
|
42
|
+
f"{object_name}.tar.gz",
|
|
43
|
+
),
|
|
44
|
+
"marquee": f"{assets}/{object_name}/{object_name}.gif",
|
|
45
|
+
}
|
|
46
|
+
for object_name in [
|
|
47
|
+
"swallow-debug-2025-09-22-09-47-32-85hag3",
|
|
48
|
+
"swallow-debug-2025-09-22-09-59-29-emj29v",
|
|
49
|
+
"swallow-debug-2025-09-22-10-01-01-uzray6",
|
|
50
|
+
"swallow-debug-2025-09-22-10-06-19-hcyl1v",
|
|
51
|
+
"swallow-debug-2025-09-22-10-09-44-z6q9kn",
|
|
52
|
+
"swallow-debug-2025-09-22-10-19-35-mobajm",
|
|
53
|
+
]
|
|
54
|
+
]
|
|
55
|
+
),
|
|
56
|
+
cols=3,
|
|
57
|
+
log=False,
|
|
58
|
+
),
|
|
59
|
+
},
|
|
60
|
+
"marquee": f"{assets}/arzhang/20250922_101202_1.gif",
|
|
61
|
+
},
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def test_ImageItems():
|
|
66
|
+
items = ImageItems(
|
|
67
|
+
{
|
|
68
|
+
f"{assets2}/swallow/20250701_2206342_1.gif": "",
|
|
69
|
+
f"{assets2}/swallow/20250913_203635~2_1.gif": "",
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
assert isinstance(items, list)
|
|
74
|
+
for item in items:
|
|
75
|
+
assert isinstance(item, str)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def test_Items():
|
|
79
|
+
items = Items(
|
|
80
|
+
[
|
|
81
|
+
{
|
|
82
|
+
"name": "yolo",
|
|
83
|
+
"description": "a yolo interface.",
|
|
84
|
+
"marquee": "https://github.com/kamangir/assets/raw/main/swallow-debug-2025-09-16-19-53-19-4yzsp8/swallow-debug-2025-09-16-19-53-19-4yzsp8-2.gif?raw=true",
|
|
85
|
+
"url": "./bluer_algo/docs/yolo",
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"name": "tracker",
|
|
89
|
+
"marquee": "https://github.com/kamangir/assets/raw/main/tracker-camshift-2025-07-16-11-07-52-4u3nu4/tracker.gif?raw=true",
|
|
90
|
+
"description": "a visual tracker.",
|
|
91
|
+
"url": "./bluer_algo/docs/tracker",
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": "image classifier",
|
|
95
|
+
"marquee": "https://github.com/kamangir/assets/raw/main/swallow-model-2025-07-11-15-04-03-2glcch/evaluation.png?raw=true",
|
|
96
|
+
"description": "an image classifier.",
|
|
97
|
+
"url": "./bluer_algo/docs/image_classifier",
|
|
98
|
+
},
|
|
99
|
+
]
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
assert isinstance(items, list)
|
|
103
|
+
for item in items:
|
|
104
|
+
assert isinstance(item, str)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
def test_Items_of_dict():
|
|
108
|
+
items = Items_of_dict(dict_of_validations)
|
|
109
|
+
|
|
110
|
+
assert isinstance(items, list)
|
|
111
|
+
for item in items:
|
|
112
|
+
assert isinstance(item, str)
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
def test_list_of_dict():
|
|
116
|
+
items = list_of_dict(dict_of_validations)
|
|
117
|
+
|
|
118
|
+
assert isinstance(items, list)
|
|
119
|
+
for item in items:
|
|
120
|
+
assert isinstance(item, str)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bluer_objects
|
|
3
|
-
Version: 6.
|
|
3
|
+
Version: 6.301.1
|
|
4
4
|
Summary: 🌀 Object management in Bash.
|
|
5
5
|
Home-page: https://github.com/kamangir/bluer-objects
|
|
6
6
|
Author: Arash Abadpour (Kamangir)
|
|
@@ -65,6 +65,6 @@ pip install bluer-objects
|
|
|
65
65
|
|
|
66
66
|
[](https://github.com/kamangir/bluer-objects/actions/workflows/pylint.yml) [](https://github.com/kamangir/bluer-objects/actions/workflows/pytest.yml) [](https://github.com/kamangir/bluer-objects/actions/workflows/bashtest.yml) [](https://pypi.org/project/bluer-objects/) [](https://pypistats.org/packages/bluer-objects)
|
|
67
67
|
|
|
68
|
-
built by 🌀 [`bluer README`](https://github.com/kamangir/bluer-objects/tree/main/bluer_objects/README), based on 🌀 [`bluer_objects-6.
|
|
68
|
+
built by 🌀 [`bluer README`](https://github.com/kamangir/bluer-objects/tree/main/bluer_objects/README), based on 🌀 [`bluer_objects-6.301.1`](https://github.com/kamangir/bluer-objects).
|
|
69
69
|
|
|
70
70
|
built by 🌀 [`blueness-3.118.1`](https://github.com/kamangir/blueness).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
bluer_objects/__init__.py,sha256=
|
|
1
|
+
bluer_objects/__init__.py,sha256=IjOfbxdWL3O3us3yet8Uvep0AJEBdNyFRzZizCOoQ4Q,315
|
|
2
2
|
bluer_objects/__main__.py,sha256=Yqfov833_hJuRne19WrGhT5DWAPtdffpoMxeSXS7EGw,359
|
|
3
3
|
bluer_objects/config.env,sha256=ReX0OSH_dK2tdD4-zAlp-427BB57yw8uDTS6tLYN4K0,270
|
|
4
4
|
bluer_objects/env.py,sha256=ecwldUVsamxAjOI0a6PmbZPcyhdUZgzJ-nhAPh0CJRo,2085
|
|
@@ -18,7 +18,7 @@ bluer_objects/.abcli/create_test_asset.sh,sha256=ONIdad_WRjZWdW6V2RalRW2qSJwybEw
|
|
|
18
18
|
bluer_objects/.abcli/download.sh,sha256=SKv4JyjcWjOutK95-gurCqbRjpmcrmzxASEEdT23Ob4,650
|
|
19
19
|
bluer_objects/.abcli/file.sh,sha256=djcHSFS8fqlCsoDyZKmimNTzd-jOUnxbOFpL7xq_hGk,150
|
|
20
20
|
bluer_objects/.abcli/gif.sh,sha256=cskDoi_BJq5phOAqgJouxH2biC2z3LlDgd9JHAQqvM0,1363
|
|
21
|
-
bluer_objects/.abcli/host.sh,sha256=
|
|
21
|
+
bluer_objects/.abcli/host.sh,sha256=rOTrxGEYk4ikJGSvqCzNNfJDVEvAebOqGutVqJpSRxs,1051
|
|
22
22
|
bluer_objects/.abcli/ls.sh,sha256=9IGfGopZNdpkSwA31hXsRG7Ap0KzY3SGAM9takLQe24,639
|
|
23
23
|
bluer_objects/.abcli/metadata.sh,sha256=EXBB39nn5PRRryIlfetIpR4fPQ-4eDg7Hnee9g1JXrI,377
|
|
24
24
|
bluer_objects/.abcli/mlflow.sh,sha256=7ylwHrQas-QbAJ8SfDJiN3zbuU6ifLUBEAhPRw38Hpc,625
|
|
@@ -76,7 +76,7 @@ bluer_objects/.abcli/web/where_am_i.sh,sha256=QPBXFo6Ni4pZEoOx0rtuJUxk6tOlp0ESMy
|
|
|
76
76
|
bluer_objects/README/__init__.py,sha256=AG9_REFcYVrfMbzK4y02Omie-fCjf6UBP4OnJyNSZ6w,1434
|
|
77
77
|
bluer_objects/README/consts.py,sha256=GYQ8EikslsUfr8JcrXoU0w4eMIGWpIiNmlchTQbSYV0,803
|
|
78
78
|
bluer_objects/README/functions.py,sha256=PvFawBlJ8IginQn8Kk1QewAyOYRQ4wCuRKpJwr5mUJ8,5844
|
|
79
|
-
bluer_objects/README/items.py,sha256=
|
|
79
|
+
bluer_objects/README/items.py,sha256=yWMGI_znoYaF2wQRC9Qn96ybtn-OzN5yOzxKoVL73Xc,2328
|
|
80
80
|
bluer_objects/README/utils.py,sha256=WsEm0ad-gpMGMJ6X11W2nXYY5fBokOGPGNFvzjYZc5o,8241
|
|
81
81
|
bluer_objects/assets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
82
82
|
bluer_objects/assets/__main__.py,sha256=X1s4ABevs8y5pafPIhZBj5oFX_kMOLWLTMaCFF6_Rio,1064
|
|
@@ -102,7 +102,7 @@ bluer_objects/help/create_test_asset.py,sha256=oxJORm2qk4b_q7EC6-dEuNu1_pK9Ri60P
|
|
|
102
102
|
bluer_objects/help/download.py,sha256=9zC_IvH4p2vMXb_qcAS176CBFp5fJe4Z9DFMPdSGBac,751
|
|
103
103
|
bluer_objects/help/functions.py,sha256=wgHOtkhEv7oQYcRpiTH6J_70lGKqLbxoBOBV4_O8LIU,1213
|
|
104
104
|
bluer_objects/help/gif.py,sha256=0yrTJ0U-vyqc94GH5xstAc_C9Ld0pxptdBusOpnbfzQ,1007
|
|
105
|
-
bluer_objects/help/host.py,sha256=
|
|
105
|
+
bluer_objects/help/host.py,sha256=cq4Y8mo71pqJ0AUjCGkj3smZ-MOTo9aqyxm8q2FWVAs,1050
|
|
106
106
|
bluer_objects/help/ls.py,sha256=mD6QyMzR5YLnjmtumudVc7AoCPXkevZRexXyTazekGo,972
|
|
107
107
|
bluer_objects/help/metadata.py,sha256=fk22NasBcZU1ffY4fu6AxrCzMQtTI28p_ghaSVRrrPM,2811
|
|
108
108
|
bluer_objects/help/upload.py,sha256=kied2p7II-zCdme_GyDs_74n-15iwyS_RMh2SWLkw1I,460
|
|
@@ -149,6 +149,7 @@ bluer_objects/testing/functions.py,sha256=AXAfzWLcEPkbSYTehdahshjKJ45C4IJkRs_Tgr
|
|
|
149
149
|
bluer_objects/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
150
150
|
bluer_objects/tests/test_README.py,sha256=5D4UV8VcjbeAPThsYVynYtVFuP8gwMAhIjEWuOQZsWs,89
|
|
151
151
|
bluer_objects/tests/test_README_consts.py,sha256=fBDNjmPrQN0WhF0AtrTVRcEDQMW02MfLFQPgI3U2PcI,1290
|
|
152
|
+
bluer_objects/tests/test_README_items.py,sha256=K_tRZcifZUpV5WqWaf10mYG2Wi1FouMHQGXtCQxYYkk,4382
|
|
152
153
|
bluer_objects/tests/test_env.py,sha256=HgVCbnHGLIXK8GiaWNWORW9nAHs7fqvIoo6S5Jj29-g,1132
|
|
153
154
|
bluer_objects/tests/test_file_download.py,sha256=1_adHYqgSifkdP-I7TQVW0t8MLCujQ61fvRbcrSkcmg,512
|
|
154
155
|
bluer_objects/tests/test_file_load_save.py,sha256=unqxfiqba6RVhMS95AtHZWsT7Q097jBOKdckAT9PyFU,2390
|
|
@@ -181,8 +182,8 @@ bluer_objects/tests/test_web_is_accessible.py,sha256=2Y20NAEDMblg0MKnhnqcfw3XVKE
|
|
|
181
182
|
bluer_objects/web/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
182
183
|
bluer_objects/web/__main__.py,sha256=xf2Ob54FI8JEokfGhFmiyOBdD9nBactwqmZvsKsdioU,624
|
|
183
184
|
bluer_objects/web/functions.py,sha256=KNufAFOc6N3BYf83lN2rUpKUdsnzb2anWyp9koFRVUo,172
|
|
184
|
-
bluer_objects-6.
|
|
185
|
-
bluer_objects-6.
|
|
186
|
-
bluer_objects-6.
|
|
187
|
-
bluer_objects-6.
|
|
188
|
-
bluer_objects-6.
|
|
185
|
+
bluer_objects-6.301.1.dist-info/licenses/LICENSE,sha256=ogEPNDSH0_dhiv_lT3ifVIdgIzHAqNA_SemnxUfPBJk,7048
|
|
186
|
+
bluer_objects-6.301.1.dist-info/METADATA,sha256=y1OIzddcNMhyLM3IWqqXK13ajxzG-PDsJ37MFN-k55I,3780
|
|
187
|
+
bluer_objects-6.301.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
188
|
+
bluer_objects-6.301.1.dist-info/top_level.txt,sha256=RX2TpddbnRkurda3G_pAdyeTztP2IhhRPx949GlEvQo,14
|
|
189
|
+
bluer_objects-6.301.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|