bluer-objects 6.104.1__py3-none-any.whl → 6.377.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.
Files changed (146) hide show
  1. bluer_objects/.abcli/abcli.sh +6 -0
  2. bluer_objects/.abcli/alias.sh +11 -0
  3. bluer_objects/.abcli/assets/cd.sh +20 -0
  4. bluer_objects/.abcli/assets/mv.sh +34 -0
  5. bluer_objects/.abcli/assets/publish.sh +37 -0
  6. bluer_objects/.abcli/assets.sh +15 -0
  7. bluer_objects/.abcli/create_test_asset.sh +10 -0
  8. bluer_objects/.abcli/download.sh +3 -1
  9. bluer_objects/.abcli/file.sh +15 -4
  10. bluer_objects/.abcli/gif.sh +18 -0
  11. bluer_objects/.abcli/host.sh +23 -7
  12. bluer_objects/.abcli/ls.sh +19 -8
  13. bluer_objects/.abcli/metadata/download.sh +9 -0
  14. bluer_objects/.abcli/metadata/edit.sh +15 -0
  15. bluer_objects/.abcli/metadata/upload.sh +9 -0
  16. bluer_objects/.abcli/mlflow/browse.sh +2 -0
  17. bluer_objects/.abcli/mlflow/deploy.sh +21 -5
  18. bluer_objects/.abcli/mlflow/lock/lock.sh +11 -0
  19. bluer_objects/.abcli/mlflow/lock/unlock.sh +12 -0
  20. bluer_objects/.abcli/mlflow/lock.sh +15 -0
  21. bluer_objects/.abcli/mlflow.sh +0 -2
  22. bluer_objects/.abcli/pdf/convert.sh +92 -0
  23. bluer_objects/.abcli/pdf.sh +15 -0
  24. bluer_objects/.abcli/storage/clear.sh +2 -0
  25. bluer_objects/.abcli/tests/clone.sh +2 -3
  26. bluer_objects/.abcli/tests/create_test_asset.sh +16 -0
  27. bluer_objects/.abcli/tests/file.sh +64 -0
  28. bluer_objects/.abcli/tests/gif.sh +3 -3
  29. bluer_objects/.abcli/tests/help.sh +27 -4
  30. bluer_objects/.abcli/tests/ls.sh +11 -4
  31. bluer_objects/.abcli/tests/metadata.sh +35 -0
  32. bluer_objects/.abcli/tests/mlflow_lock.sh +30 -0
  33. bluer_objects/.abcli/tests/open.sh +11 -0
  34. bluer_objects/.abcli/tests/open_gif_open.sh +14 -0
  35. bluer_objects/.abcli/tests/pdf.sh +31 -0
  36. bluer_objects/.abcli/tests/storage_clear.sh +11 -0
  37. bluer_objects/.abcli/tests/storage_public_upload.sh +25 -0
  38. bluer_objects/.abcli/tests/storage_status.sh +12 -0
  39. bluer_objects/.abcli/tests/{storage.sh → storage_upload_download.sh} +26 -8
  40. bluer_objects/.abcli/tests/web_is_accessible.sh +17 -0
  41. bluer_objects/.abcli/tests/web_where_am_ai.sh +5 -0
  42. bluer_objects/.abcli/upload.sh +26 -2
  43. bluer_objects/.abcli/url.sh +15 -0
  44. bluer_objects/.abcli/web/is_accessible.sh +13 -0
  45. bluer_objects/.abcli/web/where_am_i.sh +5 -0
  46. bluer_objects/README/__init__.py +24 -9
  47. bluer_objects/README/alias.py +56 -0
  48. bluer_objects/README/consts.py +39 -0
  49. bluer_objects/README/functions.py +127 -205
  50. bluer_objects/README/items.py +78 -6
  51. bluer_objects/README/utils.py +275 -0
  52. bluer_objects/__init__.py +1 -1
  53. bluer_objects/assets/__init__.py +0 -0
  54. bluer_objects/assets/__main__.py +57 -0
  55. bluer_objects/assets/functions.py +62 -0
  56. bluer_objects/config.env +9 -1
  57. bluer_objects/env.py +23 -0
  58. bluer_objects/file/__main__.py +52 -7
  59. bluer_objects/file/functions.py +13 -3
  60. bluer_objects/file/load.py +2 -9
  61. bluer_objects/file/save.py +17 -24
  62. bluer_objects/graphics/__main__.py +7 -0
  63. bluer_objects/graphics/gif.py +11 -7
  64. bluer_objects/graphics/screen.py +9 -8
  65. bluer_objects/help/assets.py +96 -0
  66. bluer_objects/help/create_test_asset.py +22 -0
  67. bluer_objects/help/download.py +17 -3
  68. bluer_objects/help/file.py +59 -0
  69. bluer_objects/help/functions.py +11 -1
  70. bluer_objects/help/gif.py +25 -0
  71. bluer_objects/help/host.py +6 -4
  72. bluer_objects/help/ls.py +26 -3
  73. bluer_objects/help/metadata.py +51 -0
  74. bluer_objects/help/mlflow/__init__.py +23 -2
  75. bluer_objects/help/mlflow/lock.py +52 -0
  76. bluer_objects/help/pdf.py +67 -0
  77. bluer_objects/help/upload.py +10 -3
  78. bluer_objects/help/web.py +38 -0
  79. bluer_objects/host/functions.py +4 -1
  80. bluer_objects/logger/confusion_matrix.py +76 -0
  81. bluer_objects/logger/image.py +110 -0
  82. bluer_objects/logger/stitch.py +107 -0
  83. bluer_objects/markdown.py +8 -6
  84. bluer_objects/metadata/__init__.py +1 -0
  85. bluer_objects/metadata/flatten.py +27 -0
  86. bluer_objects/mlflow/lock/__init__.py +1 -0
  87. bluer_objects/mlflow/lock/__main__.py +58 -0
  88. bluer_objects/mlflow/lock/functions.py +121 -0
  89. bluer_objects/mlflow/logging.py +47 -41
  90. bluer_objects/pdf/__init__.py +1 -0
  91. bluer_objects/pdf/__main__.py +78 -0
  92. bluer_objects/pdf/convert/__init__.py +0 -0
  93. bluer_objects/pdf/convert/batch.py +54 -0
  94. bluer_objects/pdf/convert/combination.py +32 -0
  95. bluer_objects/pdf/convert/convert.py +111 -0
  96. bluer_objects/pdf/convert/image.py +53 -0
  97. bluer_objects/pdf/convert/md.py +97 -0
  98. bluer_objects/pdf/convert/missing.py +96 -0
  99. bluer_objects/pdf/convert/pdf.py +37 -0
  100. bluer_objects/sample.env +6 -0
  101. bluer_objects/storage/WebDAV.py +11 -7
  102. bluer_objects/storage/WebDAVrequest.py +360 -0
  103. bluer_objects/storage/WebDAVzip.py +26 -29
  104. bluer_objects/storage/__init__.py +28 -1
  105. bluer_objects/storage/__main__.py +40 -6
  106. bluer_objects/storage/base.py +84 -5
  107. bluer_objects/storage/policies.py +7 -0
  108. bluer_objects/storage/s3.py +367 -0
  109. bluer_objects/testing/__main__.py +6 -0
  110. bluer_objects/tests/test_README_consts.py +71 -0
  111. bluer_objects/tests/test_README_items.py +128 -0
  112. bluer_objects/tests/test_alias.py +33 -0
  113. bluer_objects/tests/test_env.py +25 -2
  114. bluer_objects/tests/test_file_download.py +25 -0
  115. bluer_objects/tests/test_file_load_save.py +1 -2
  116. bluer_objects/tests/test_file_load_save_text.py +46 -0
  117. bluer_objects/tests/test_graphics_gif.py +2 -0
  118. bluer_objects/tests/test_log_image_grid.py +29 -0
  119. bluer_objects/tests/test_logger_confusion_matrix.py +18 -0
  120. bluer_objects/tests/test_logger_matrix.py +2 -2
  121. bluer_objects/tests/test_logger_stitch_images.py +47 -0
  122. bluer_objects/tests/test_metadata.py +12 -6
  123. bluer_objects/tests/test_metadata_flatten.py +109 -0
  124. bluer_objects/tests/test_mlflow.py +2 -2
  125. bluer_objects/tests/test_mlflow_lock.py +26 -0
  126. bluer_objects/tests/test_objects.py +2 -0
  127. bluer_objects/tests/test_shell.py +34 -0
  128. bluer_objects/tests/test_storage.py +8 -21
  129. bluer_objects/tests/test_storage_base.py +39 -0
  130. bluer_objects/tests/test_storage_s3.py +67 -0
  131. bluer_objects/tests/test_storage_webdav_request.py +75 -0
  132. bluer_objects/tests/test_storage_webdav_zip.py +42 -0
  133. bluer_objects/tests/test_web_is_accessible.py +11 -0
  134. bluer_objects/web/__init__.py +1 -0
  135. bluer_objects/web/__main__.py +31 -0
  136. bluer_objects/web/functions.py +9 -0
  137. {bluer_objects-6.104.1.dist-info → bluer_objects-6.377.1.dist-info}/METADATA +6 -3
  138. bluer_objects-6.377.1.dist-info/RECORD +217 -0
  139. {bluer_objects-6.104.1.dist-info → bluer_objects-6.377.1.dist-info}/WHEEL +1 -1
  140. bluer_objects/.abcli/storage/download_file.sh +0 -9
  141. bluer_objects/.abcli/storage/exists.sh +0 -8
  142. bluer_objects/.abcli/storage/list.sh +0 -8
  143. bluer_objects/.abcli/storage/rm.sh +0 -11
  144. bluer_objects-6.104.1.dist-info/RECORD +0 -143
  145. {bluer_objects-6.104.1.dist-info → bluer_objects-6.377.1.dist-info}/licenses/LICENSE +0 -0
  146. {bluer_objects-6.104.1.dist-info → bluer_objects-6.377.1.dist-info}/top_level.txt +0 -0
@@ -5,14 +5,14 @@ function test_bluer_objects_gif() {
5
5
 
6
6
  local source_object_name=test_bluer_objects_clone-$(bluer_ai_string_timestamp_short)
7
7
 
8
- python3 -m bluer_objects.testing \
9
- create_test_asset \
10
- --object_name $source_object_name
8
+ bluer_objects_create_test_asset \
9
+ $source_object_name
11
10
  [[ $? -ne 0 ]] && return 1
12
11
 
13
12
  bluer_objects_gif \
14
13
  ~upload,$options \
15
14
  $source_object_name \
15
+ --frame_count 20 \
16
16
  --frame_duration 200 \
17
17
  --output_filename test.gif \
18
18
  --scale 2 \
@@ -8,8 +8,15 @@ function test_bluer_objects_help() {
8
8
 
9
9
  local module
10
10
  for module in \
11
+ "@assets" \
12
+ "@assets cd" \
13
+ "@assets mv" \
14
+ "@assets publish" \
15
+ \
11
16
  "@cp" \
12
17
  \
18
+ "@create_test_asset" \
19
+ \
13
20
  "@objects" \
14
21
  \
15
22
  "@objects pypi" \
@@ -22,27 +29,43 @@ function test_bluer_objects_help() {
22
29
  "@objects test" \
23
30
  "@objects test list" \
24
31
  \
32
+ "@pdf" \
33
+ "@pdf convert" \
34
+ \
25
35
  "@cp" \
26
36
  \
27
37
  "@download" \
28
38
  \
29
39
  "@gif" \
40
+ "@gif open" \
30
41
  \
31
42
  "@ls" \
32
43
  \
44
+ "@file" \
45
+ "@file replace" \
46
+ "@file size" \
47
+ \
33
48
  "@host" \
34
49
  "@host get" \
35
50
  "@host reboot" \
36
51
  "@host shutdown" \
37
52
  \
53
+ "@lock" \
54
+ "@lock lock" \
55
+ "@lock unlock" \
56
+ \
38
57
  "@metadata" \
58
+ "@metadata download" \
59
+ "@metadata edit" \
39
60
  "@metadata get" \
40
61
  "@metadata post" \
62
+ "@metadata upload" \
41
63
  \
42
64
  "@mlflow" \
43
65
  "@mlflow browse" \
44
66
  "@mlflow cache" \
45
67
  "@mlflow deploy" \
68
+ "@mlflow deploy set" \
46
69
  "@mlflow get_id" \
47
70
  "@mlflow get_run_id" \
48
71
  "@mlflow list_registered_models" \
@@ -62,14 +85,14 @@ function test_bluer_objects_help() {
62
85
  \
63
86
  "@storage" \
64
87
  "@storage clear" \
65
- "@storage download_file" \
66
- "@storage exists" \
67
- "@storage list" \
68
- "@storage rm" \
69
88
  "@storage status" \
70
89
  \
71
90
  "@upload" \
72
91
  \
92
+ "@web" \
93
+ "@web is_accessible" \
94
+ "@web where_am_i" \
95
+ \
73
96
  "@wait" \
74
97
  \
75
98
  "bluer_objects"; do
@@ -3,9 +3,8 @@
3
3
  function test_bluer_objects_ls() {
4
4
  local object_name=test_bluer_objects_ls-$(bluer_ai_string_timestamp_short)
5
5
 
6
- python3 -m bluer_objects.testing \
7
- create_test_asset \
8
- --object_name $object_name
6
+ bluer_objects_create_test_asset \
7
+ $object_name
9
8
  [[ $? -ne 0 ]] && return 1
10
9
  bluer_ai_hr
11
10
 
@@ -21,5 +20,13 @@ function test_bluer_objects_ls() {
21
20
  [[ $? -ne 0 ]] && return 1
22
21
  bluer_ai_hr
23
22
 
24
- bluer_objects_ls $abcli_path_bash/tests/
23
+ bluer_objects_ls cloud,objects --prefix 2025-09
24
+ [[ $? -ne 0 ]] && return 1
25
+ bluer_ai_hr
26
+
27
+ bluer_objects_ls local,objects --prefix 2025-09
28
+ [[ $? -ne 0 ]] && return 1
29
+ bluer_ai_hr
30
+
31
+ bluer_objects_ls $abcli_path_git
25
32
  }
@@ -54,3 +54,38 @@ function test_bluer_objects_metadata() {
54
54
 
55
55
  return 0
56
56
  }
57
+
58
+ function test_bluer_objects_metadata_upload_download_edit() {
59
+ local object_name=test_bluer_objects_metadata_upload_download_edit-$(bluer_ai_string_timestamp)
60
+
61
+ local key=key-$(bluer_ai_string_timestamp)
62
+ local value=value-$(bluer_ai_string_timestamp)
63
+
64
+ bluer_objects_metadata_post \
65
+ $key \
66
+ $value \
67
+ object \
68
+ $object_name \
69
+ --verbose 1
70
+ [[ $? -ne 0 ]] && return 1
71
+
72
+ bluer_objects_metadata_upload \
73
+ $object_name
74
+ [[ $? -ne 0 ]] && return 1
75
+
76
+ rm -v $ABCLI_OBJECT_ROOT/$object_name/metadata.yaml
77
+ [[ $? -ne 0 ]] && return 1
78
+
79
+ bluer_objects_metadata_download \
80
+ $object_name
81
+ [[ $? -ne 0 ]] && return 1
82
+
83
+ local value_received=$(bluer_objects_metadata_get \
84
+ key=$key,object \
85
+ $object_name)
86
+
87
+ bluer_ai_assert \
88
+ $value \
89
+ $value_received \
90
+ yes
91
+ }
@@ -0,0 +1,30 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function test_bluer_objects_mlflow_lock() {
4
+ local options=$1
5
+
6
+ local object_name="test-object-$(bluer_ai_string_timestamp_short)"
7
+ local lock_name="lock-$(bluer_ai_string_random)"
8
+
9
+ bluer_ai_eval ,$options \
10
+ bluer_objects_mlflow_lock \
11
+ lock \
12
+ $object_name \
13
+ --lock $lock_name \
14
+ --timeout 10
15
+ [[ $? -ne 0 ]] && return 1
16
+
17
+ bluer_ai_eval ,$options \
18
+ bluer_objects_mlflow_lock \
19
+ lock \
20
+ $object_name \
21
+ --lock $lock_name \
22
+ --timeout 10
23
+ [[ $? -eq 0 ]] && return 1
24
+
25
+ bluer_ai_eval ,$options \
26
+ bluer_objects_mlflow_lock \
27
+ unlock \
28
+ $object_name \
29
+ --lock $lock_name
30
+ }
@@ -0,0 +1,11 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function test_bluer_objects_open() {
4
+ local options=$1
5
+
6
+ bluer_ai_eval ,$options \
7
+ bluer_ai_open \
8
+ ,$options \
9
+ $BLUER_OBJECTS_TEST_OBJECT \
10
+ "${@:2}"
11
+ }
@@ -0,0 +1,14 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function test_bluer_objects_gif_open() {
4
+ local options=$1
5
+
6
+ bluer_ai_eval ,$options \
7
+ bluer_objects_gif \
8
+ open \
9
+ download \
10
+ $BLUER_OBJECTS_TEST_OBJECT \
11
+ "${@:2}"
12
+
13
+ return 0
14
+ }
@@ -0,0 +1,31 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function test_bluer_objects_pdf_convert_inline() {
4
+ local options=$1
5
+
6
+ local object_name=test_bluer_objects_pdf_convert-$(bluer_ai_string_timestamp)
7
+
8
+ bluer_ai_eval ,$options \
9
+ bluer_objects_pdf_convert \
10
+ inline,install,combine,$2 \
11
+ bluer_objects \
12
+ aliases,aliases/assets.md \
13
+ $object_name \
14
+ "${@:3}"
15
+
16
+ return 0
17
+ }
18
+
19
+ function test_bluer_objects_pdf_convert() {
20
+ local options=$1
21
+
22
+ local object_name=test_bluer_objects_pdf_convert-2025-11-30-ci0cd7
23
+
24
+ bluer_ai_eval ,$options \
25
+ bluer_objects_pdf_convert \
26
+ install,combine,$2 \
27
+ $object_name \
28
+ "${@:3}"
29
+
30
+ return 0
31
+ }
@@ -0,0 +1,11 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function test_bluer_objects_storage_clear() {
4
+ local options=$1
5
+
6
+ bluer_ai_storage_clear cloud
7
+ [[ $? -ne 0 ]] && return 1
8
+ bluer_ai_hr
9
+
10
+ bluer_ai_storage_clear cloud,public
11
+ }
@@ -0,0 +1,25 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function test_bluer_objects_storage_public_upload() {
4
+ local options=$1
5
+
6
+ local object_name=test_bluer_objects_storage_public_upload-$(bluer_ai_string_timestamp_short)
7
+ local object_path=$ABCLI_OBJECT_ROOT/$object_name
8
+ mkdir -pv $object_path
9
+
10
+ bluer_objects_create_test_asset \
11
+ $object_name \
12
+ --depth 1
13
+ [[ $? -ne 0 ]] && return 1
14
+ bluer_ai_hr
15
+
16
+ bluer_objects_upload \
17
+ public \
18
+ $object_name
19
+ [[ $? -ne 0 ]] && return 1
20
+ bluer_ai_hr
21
+
22
+ bluer_objects_upload \
23
+ public,zip \
24
+ $object_name
25
+ }
@@ -0,0 +1,12 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function test_bluer_objects_storage_status() {
4
+ local options=$1
5
+
6
+ bluer_ai_storage_status
7
+ [[ $? -ne 0 ]] && return 1
8
+ bluer_ai_hr
9
+
10
+ bluer_ai_storage_status \
11
+ depth=2,count=10
12
+ }
@@ -1,20 +1,23 @@
1
1
  #! /usr/bin/env bash
2
2
 
3
- function test_bluer_objects_storage() {
3
+ function test_bluer_objects_storage_upload_download() {
4
4
  local options=$1
5
5
 
6
- local object_name=test_bluer_objects_storage-$(bluer_ai_string_timestamp_short)
6
+ local object_name=test_bluer_objects_storage_upload_download-$(bluer_ai_string_timestamp_short)
7
7
  local object_path=$ABCLI_OBJECT_ROOT/$object_name
8
8
  mkdir -pv $object_path
9
9
 
10
- python3 -m bluer_objects.testing \
11
- create_test_asset \
12
- --object_name $object_name
10
+ bluer_objects_create_test_asset \
11
+ $object_name \
12
+ --depth 1
13
13
  [[ $? -ne 0 ]] && return 1
14
+ bluer_ai_hr
14
15
 
15
- # testing upload
16
+ bluer_objects_ls local $object_name
17
+ [[ $? -ne 0 ]] && return 1
16
18
  bluer_ai_hr
17
19
 
20
+ # upload
18
21
  bluer_objects_upload \
19
22
  filename=this.yaml \
20
23
  $object_name
@@ -33,12 +36,15 @@ function test_bluer_objects_storage() {
33
36
  [[ $? -ne 0 ]] && return 1
34
37
  bluer_ai_hr
35
38
 
39
+ bluer_objects_ls cloud $object_name
40
+ [[ $? -ne 0 ]] && return 1
41
+ bluer_ai_hr
42
+
36
43
  # clean-up
37
44
  rm -rfv $object_path
38
45
  bluer_ai_hr
39
46
 
40
- # testing download
41
-
47
+ # download
42
48
  bluer_objects_download \
43
49
  filename=this.yaml \
44
50
  $object_name
@@ -54,4 +60,16 @@ function test_bluer_objects_storage() {
54
60
  bluer_objects_download \
55
61
  - \
56
62
  $object_name
63
+ [[ $? -ne 0 ]] && return 1
64
+ bluer_ai_hr
65
+
66
+ bluer_objects_download \
67
+ policy=doesnt_exist \
68
+ $object_name
69
+ [[ $? -ne 0 ]] && return 1
70
+ bluer_ai_hr
71
+
72
+ bluer_objects_upload \
73
+ zip \
74
+ $object_name
57
75
  }
@@ -0,0 +1,17 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function test_bluer_objects_web_is_accessible() {
4
+ local output=$(bluer_objects_web_is_accessible void)
5
+ [[ "$output" -ne 0 ]] &&
6
+ return 1
7
+
8
+ local url="https://iribnews.ir"
9
+ [[ "$abcli_is_github_workflow" == true ]] &&
10
+ url="https://cnn.com"
11
+
12
+ output=$(bluer_objects_web_is_accessible $url)
13
+ [[ "$output" -ne 1 ]] &&
14
+ return 1
15
+
16
+ return 0
17
+ }
@@ -0,0 +1,5 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function test_bluer_objects_web_where_am_i() {
4
+ bluer_objects_web_where_am_i
5
+ }
@@ -3,19 +3,43 @@
3
3
  function bluer_objects_upload() {
4
4
  local options=$1
5
5
  local filename=$(bluer_ai_option "$options" filename)
6
+ local public=$(bluer_ai_option_int "$options" public 0)
7
+ local do_zip=$(bluer_ai_option_int "$options" zip 0)
6
8
 
7
9
  local object_name=$(bluer_ai_clarify_object $2 .)
8
10
  local object_path=$ABCLI_OBJECT_ROOT/$object_name
9
11
 
10
12
  rm -rf $object_path/auxiliary
11
13
 
14
+ if [[ "$do_zip" == 1 ]]; then
15
+ local zip_filename=$ABCLI_OBJECT_ROOT/$object_name.tar.gz
16
+
17
+ [[ -f "$zip_filename" ]] &&
18
+ rm -v $zip_filename
19
+
20
+ bluer_ai_eval - \
21
+ tar -czvf \
22
+ $zip_filename \
23
+ -C $ABCLI_OBJECT_ROOT $object_name
24
+ [[ $? -ne 0 ]] && return 1
25
+
26
+ python3 -m bluer_objects.storage \
27
+ upload \
28
+ --object_name $object_name \
29
+ --zip 1 \
30
+ --public $public
31
+
32
+ return
33
+ fi
34
+
12
35
  python3 -m bluer_objects.storage \
13
36
  upload \
14
37
  --object_name $object_name \
15
- --filename "$filename"
38
+ --filename "$filename" \
39
+ --public $public
16
40
  [[ $? -ne 0 ]] && return 1
17
41
 
18
- if [[ -z "$filename" ]]; then
42
+ if [[ -z "$filename" ]] && [[ "$public" == 0 ]]; then
19
43
  bluer_objects_mlflow_log_run $object_name
20
44
  fi
21
45
  }
@@ -0,0 +1,15 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function bluer_objects_web() {
4
+ local task=$1
5
+
6
+ local function_name=bluer_objects_web_$task
7
+ if [[ $(type -t $function_name) == "function" ]]; then
8
+ $function_name "${@:2}"
9
+ return
10
+ fi
11
+
12
+ python3 -m bluer_objects.web "$@"
13
+ }
14
+
15
+ bluer_ai_source_caller_suffix_path /web
@@ -0,0 +1,13 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function bluer_objects_web_is_accessible() {
4
+ local url=$1
5
+ if [[ -z "$url" ]]; then
6
+ bluer_ai_log_error "url not found."
7
+ return 1
8
+ fi
9
+
10
+ python3 -m bluer_objects.web \
11
+ is_accessible \
12
+ --url $url
13
+ }
@@ -0,0 +1,5 @@
1
+ #! /usr/bin/env bash
2
+
3
+ function bluer_objects_web_where_am_i() {
4
+ curl ifconfig.co/json
5
+ }
@@ -30,16 +30,31 @@ def build_me() -> bool:
30
30
  ),
31
31
  )
32
32
  for path in [
33
+ "../docs/aliases",
34
+ "../docs",
33
35
  "../..",
34
36
  ".",
35
- # aliases
36
- "../docs/aliases/clone.md",
37
- "../docs/aliases/download.md",
38
- "../docs/aliases/gif.md",
39
- "../docs/aliases/host.md",
40
- "../docs/aliases/ls.md",
41
- "../docs/aliases/metadata.md",
42
- "../docs/aliases/mlflow.md",
43
- "../docs/aliases/upload.md",
37
+ ]
38
+ + [
39
+ f"../docs/aliases/{alias}.md"
40
+ for alias in [
41
+ "assets",
42
+ "clone",
43
+ "download",
44
+ "file",
45
+ "gif",
46
+ "host",
47
+ "ls",
48
+ "metadata",
49
+ "mlflow",
50
+ "pdf",
51
+ "upload",
52
+ ]
53
+ ]
54
+ + [
55
+ f"../mlflow/{module_name}"
56
+ for module_name in [
57
+ "lock",
58
+ ]
44
59
  ]
45
60
  )
@@ -0,0 +1,56 @@
1
+ from typing import List
2
+ import importlib
3
+ from pathlib import Path
4
+ import os
5
+ import re
6
+
7
+ from bluer_objects import file
8
+
9
+
10
+ def list_of_aliases(
11
+ module_name: str,
12
+ log: bool = False,
13
+ as_markdown: bool = True,
14
+ itemized: bool = False,
15
+ ) -> List[str]:
16
+ module = importlib.import_module(module_name)
17
+ module_path = str(Path(module.__file__).parent)
18
+
19
+ alias_sh_path = os.path.join(
20
+ module_path,
21
+ ".abcli/alias.sh",
22
+ )
23
+
24
+ output: List[str] = []
25
+
26
+ success, content = file.load_text(
27
+ alias_sh_path,
28
+ ignore_error=True,
29
+ log=log,
30
+ )
31
+ if not success:
32
+ return output
33
+
34
+ content = (
35
+ lambda content, marker: (
36
+ content[: content.index(marker)] if marker in content else content
37
+ )
38
+ )(content, "# ignore")
39
+
40
+ def extract_alias_name(s: str) -> str:
41
+ m = re.fullmatch(r"alias\s+@([^=]+)=.+", s.strip())
42
+ return m.group(1) if m else ""
43
+
44
+ return [
45
+ (
46
+ (
47
+ f"- [@{alias_name}](./{alias_name}.md)"
48
+ if itemized
49
+ else f"[@{alias_name}](./bluer_agent/docs/aliases/{alias_name}.md) "
50
+ )
51
+ if as_markdown
52
+ else alias_name
53
+ )
54
+ for alias_name in sorted([extract_alias_name(line) for line in content])
55
+ if alias_name
56
+ ]
@@ -0,0 +1,39 @@
1
+ import os
2
+ from typing import Union
3
+
4
+ from bluer_objects.env import abcli_path_git
5
+
6
+ github_kamangir = "https://github.com/kamangir"
7
+ designs_repo = f"{github_kamangir}/bluer-designs/"
8
+
9
+
10
+ def designs_url(suffix: str) -> str:
11
+ return f"{designs_repo}/blob/main/{suffix}"
12
+
13
+
14
+ def assets_url(
15
+ suffix: str = "",
16
+ volume: Union[str, int] = "",
17
+ ) -> str:
18
+ return "{}/assets{}/raw/main{}".format(
19
+ github_kamangir,
20
+ str(volume),
21
+ f"/{suffix}" if suffix else "",
22
+ )
23
+
24
+
25
+ assets = assets_url(volume="")
26
+ assets2 = assets_url(volume="2")
27
+
28
+
29
+ def assets_path(
30
+ suffix: str = "",
31
+ volume: Union[str, int] = "",
32
+ ) -> str:
33
+ return os.path.join(
34
+ abcli_path_git,
35
+ "assets{}{}".format(
36
+ str(volume),
37
+ f"/{suffix}" if suffix else "",
38
+ ),
39
+ )