bluer-objects 6.40.1__py3-none-any.whl → 6.48.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.

@@ -19,7 +19,7 @@ alias @file=bluer_objects_file
19
19
 
20
20
  alias @host=bluer_objects_host
21
21
 
22
- alias @ls=bluer_ai_ls
22
+ alias @ls=bluer_objects_ls
23
23
 
24
24
  alias @metadata=bluer_objects_metadata
25
25
 
@@ -29,8 +29,6 @@ alias @mysql=abcli_mysql
29
29
 
30
30
  alias @objects=bluer_objects
31
31
 
32
- alias @publish=bluer_ai_publish
33
-
34
32
  alias @select=bluer_ai_select
35
33
 
36
34
  alias @upload=bluer_objects_upload
@@ -1,24 +1,18 @@
1
1
  #! /usr/bin/env bash
2
2
 
3
- function bluer_ai_ls() {
3
+ function bluer_objects_ls() {
4
4
  local options=$1
5
- local on_cloud=$(abcli_option_int "$options" cloud 0)
6
- local on_local=$(abcli_option_int "$options" local 0)
5
+ local where=$(abcli_option_choice "$options" cloud,local)
7
6
 
8
- [[ "$on_cloud" == 1 ]] ||
9
- [[ "$on_local" == 1 ]] &&
7
+ if [[ -z "$where" ]]; then
8
+ ls -1 "$@"
9
+ else
10
10
  local object_name=$(abcli_clarify_object $2 .)
11
11
 
12
- if [ "$on_cloud" == 1 ]; then
13
- abcli_eval - \
14
- aws s3 ls $ABCLI_S3_OBJECT_PREFIX/$object_name/
15
- elif [ "$on_local" == 1 ]; then
16
- abcli_eval - \
17
- ls -1lh $ABCLI_OBJECT_ROOT/$object_name
18
- else
19
- abcli_eval - \
20
- ls -1 "$@"
12
+ python3 -m bluer_objects.storage \
13
+ ls \
14
+ --object_name $object_name \
15
+ --where $where \
16
+ "${@:3}"
21
17
  fi
22
-
23
- return 0
24
18
  }
@@ -31,6 +31,8 @@ function test_bluer_objects_help() {
31
31
  \
32
32
  "@gif" \
33
33
  \
34
+ "@ls" \
35
+ \
34
36
  "@host" \
35
37
  "@host get" \
36
38
  "@host reboot" \
@@ -58,8 +60,6 @@ function test_bluer_objects_help() {
58
60
  "@mlflow test" \
59
61
  "@mlflow transition" \
60
62
  \
61
- "@publish" \
62
- \
63
63
  "@select" \
64
64
  \
65
65
  "@storage" \
@@ -1,13 +1,25 @@
1
1
  #! /usr/bin/env bash
2
2
 
3
3
  function test_bluer_objects_ls() {
4
- bluer_ai_select
4
+ local object_name=test_bluer_objects_ls-$(abcli_string_timestamp_short)
5
5
 
6
- bluer_objects_upload
6
+ python3 -m bluer_objects.testing \
7
+ create_test_asset \
8
+ --object_name $object_name
9
+ [[ $? -ne 0 ]] && return 1
10
+ abcli_hr
7
11
 
8
- bluer_ai_ls cloud
12
+ bluer_objects_upload - $object_name
13
+ [[ $? -ne 0 ]] && return 1
14
+ abcli_hr
9
15
 
10
- bluer_ai_ls local
16
+ bluer_objects_ls cloud $object_name
17
+ [[ $? -ne 0 ]] && return 1
18
+ abcli_hr
11
19
 
12
- bluer_ai_ls "$abcli_path_bash/tests/*.sh"
20
+ bluer_objects_ls local $object_name
21
+ [[ $? -ne 0 ]] && return 1
22
+ abcli_hr
23
+
24
+ bluer_objects_ls $abcli_path_bash/tests/
13
25
  }
bluer_objects/__init__.py CHANGED
@@ -4,7 +4,7 @@ ICON = "🌀"
4
4
 
5
5
  DESCRIPTION = f"{ICON} data objects for Bash."
6
6
 
7
- VERSION = "6.40.1"
7
+ VERSION = "6.48.1"
8
8
 
9
9
  REPO_NAME = "bluer-objects"
10
10
 
@@ -6,6 +6,7 @@ from bluer_objects.help.clone import help_clone
6
6
  from bluer_objects.help.download import help_download
7
7
  from bluer_objects.help.gif import help_gif
8
8
  from bluer_objects.help.host import help_functions as help_host
9
+ from bluer_objects.help.ls import help_ls
9
10
  from bluer_objects.help.metadata import help_functions as help_metadata
10
11
  from bluer_objects.help.mlflow import help_functions as help_mlflow
11
12
  from bluer_objects.help.upload import help_upload
@@ -19,6 +20,7 @@ help_functions.update(
19
20
  "download": help_download,
20
21
  "gif": help_gif,
21
22
  "host": help_host,
23
+ "ls": help_ls,
22
24
  "metadata": help_metadata,
23
25
  "mlflow": help_mlflow,
24
26
  "upload": help_upload,
@@ -0,0 +1,40 @@
1
+ from typing import List
2
+
3
+ from bluer_options.terminal import show_usage
4
+
5
+
6
+ def help_ls(
7
+ tokens: List[str],
8
+ mono: bool,
9
+ ) -> str:
10
+ args = [
11
+ "[--delim <space>]",
12
+ "[--log <0>]",
13
+ ]
14
+
15
+ usage_1 = show_usage(
16
+ [
17
+ "@ls",
18
+ "cloud | local",
19
+ "<object-name>",
20
+ ]
21
+ + args,
22
+ "ls <object-name>.",
23
+ mono=mono,
24
+ )
25
+
26
+ usage_2 = show_usage(
27
+ [
28
+ "@ls",
29
+ "<path>",
30
+ ],
31
+ "ls <path>.",
32
+ mono=mono,
33
+ )
34
+
35
+ return "\n".join(
36
+ [
37
+ usage_1,
38
+ usage_2,
39
+ ]
40
+ )
@@ -1,3 +1,4 @@
1
+ from typing import List, Tuple
1
2
  from webdav3.client import Client
2
3
 
3
4
  from bluer_objects.storage.base import StorageInterface
@@ -81,6 +82,13 @@ class WebDAVInterface(StorageInterface):
81
82
  log=log,
82
83
  )
83
84
 
85
+ def ls(
86
+ self,
87
+ object_name: str,
88
+ where: str = "local",
89
+ ) -> Tuple[bool, List[str]]:
90
+ assert False, "not implemented"
91
+
84
92
  def upload(
85
93
  self,
86
94
  object_name: str,
@@ -1,3 +1,6 @@
1
+ import glob
2
+ import os
3
+ from typing import Tuple, List
1
4
  from webdav3.client import Client
2
5
 
3
6
  from bluer_objects.storage.base import StorageInterface
@@ -60,6 +63,42 @@ class WebDAVzipInterface(StorageInterface):
60
63
  log=log,
61
64
  )
62
65
 
66
+ def ls(
67
+ self,
68
+ object_name: str,
69
+ where: str = "local",
70
+ ) -> Tuple[bool, List[str]]:
71
+ if where == "local":
72
+ object_path = objects.object_path(
73
+ object_name=object_name,
74
+ )
75
+
76
+ return True, [
77
+ os.path.relpath(filename, start=object_path)
78
+ for filename in glob.glob(
79
+ os.path.join(
80
+ object_path,
81
+ "**",
82
+ "*",
83
+ ),
84
+ recursive=True,
85
+ )
86
+ if os.path.isfile(filename)
87
+ ]
88
+
89
+ if where == "cloud":
90
+ try:
91
+ if self.client.check(remote_path=f"{object_name}.zip"):
92
+ return True, [f"{object_name}.zip"]
93
+ except Exception as e:
94
+ logger.error(e)
95
+ return False, []
96
+
97
+ return True, []
98
+
99
+ logger.error(f"Unknown 'where': {where}")
100
+ return False, []
101
+
63
102
  def upload(
64
103
  self,
65
104
  object_name: str,
@@ -1,3 +1,5 @@
1
+ from typing import Tuple, List
2
+
1
3
  from bluer_objects.storage.base import StorageInterface
2
4
  from bluer_objects.storage.WebDAV import WebDAVInterface
3
5
  from bluer_objects.storage.WebDAVzip import WebDAVzipInterface
@@ -27,6 +29,16 @@ def download(
27
29
  )
28
30
 
29
31
 
32
+ def ls(
33
+ object_name: str,
34
+ where: str = "local",
35
+ ) -> Tuple[bool, List[str]]:
36
+ return interface.ls(
37
+ object_name=object_name,
38
+ where=where,
39
+ )
40
+
41
+
30
42
  def upload(
31
43
  object_name: str,
32
44
  filename: str = "",
@@ -13,7 +13,7 @@ parser = argparse.ArgumentParser(NAME)
13
13
  parser.add_argument(
14
14
  "task",
15
15
  type=str,
16
- help="download | upload",
16
+ help="download | ls | upload",
17
17
  )
18
18
  parser.add_argument(
19
19
  "--object_name",
@@ -24,8 +24,26 @@ parser.add_argument(
24
24
  type=str,
25
25
  default="",
26
26
  )
27
+ parser.add_argument(
28
+ "--where",
29
+ type=str,
30
+ default="local",
31
+ help="local | cloud",
32
+ )
33
+ parser.add_argument(
34
+ "--log",
35
+ type=int,
36
+ default=1,
37
+ help="0|1",
38
+ )
39
+ parser.add_argument(
40
+ "--delim",
41
+ type=str,
42
+ default=",",
43
+ )
27
44
  args = parser.parse_args()
28
45
 
46
+ delim = " " if args.delim == "space" else args.delim
29
47
 
30
48
  success = False
31
49
  if args.task == "download":
@@ -33,6 +51,21 @@ if args.task == "download":
33
51
  object_name=args.object_name,
34
52
  filename=args.filename,
35
53
  )
54
+ elif args.task == "ls":
55
+ success, list_of_files = storage.ls(
56
+ object_name=args.object_name,
57
+ where=args.where,
58
+ )
59
+
60
+ if args.log:
61
+ logger.info(
62
+ "{:,} file(s).".format(len(list_of_files)),
63
+ )
64
+ for index, filename in enumerate(list_of_files):
65
+ logger.info(f"#{index+1: 4d} - {filename}")
66
+ else:
67
+ print(delim.join(list_of_files))
68
+
36
69
  elif args.task == "upload":
37
70
  success = storage.upload(
38
71
  object_name=args.object_name,
@@ -1,3 +1,5 @@
1
+ from typing import Tuple, List
2
+
1
3
  from bluer_objects.logger import logger
2
4
 
3
5
 
@@ -19,6 +21,13 @@ class StorageInterface:
19
21
 
20
22
  return True
21
23
 
24
+ def ls(
25
+ self,
26
+ object_name: str,
27
+ where: str = "local",
28
+ ) -> Tuple[bool, List[str]]:
29
+ return True, []
30
+
22
31
  def upload(
23
32
  self,
24
33
  object_name: str,
@@ -17,7 +17,7 @@ def create_test_asset(
17
17
  ) -> bool:
18
18
  logger.info(f"{NAME}.create_test_asset: {object_name}")
19
19
 
20
- for suffix in range(10):
20
+ for suffix in range(depth):
21
21
  if not file.save_image(
22
22
  objects.path_of(
23
23
  object_name=object_name,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bluer_objects
3
- Version: 6.40.1
3
+ Version: 6.48.1
4
4
  Summary: 🌀 data objects for Bash.
5
5
  Home-page: https://github.com/kamangir/bluer-objects
6
6
  Author: Arash Abadpour (Kamangir)
@@ -53,6 +53,6 @@ Also home to [blue README](https://github.com/kamangir/bluer-objects/blob/main/b
53
53
 
54
54
  [![pylint](https://github.com/kamangir/bluer-objects/actions/workflows/pylint.yml/badge.svg)](https://github.com/kamangir/bluer-objects/actions/workflows/pylint.yml) [![pytest](https://github.com/kamangir/bluer-objects/actions/workflows/pytest.yml/badge.svg)](https://github.com/kamangir/bluer-objects/actions/workflows/pytest.yml) [![bashtest](https://github.com/kamangir/bluer-objects/actions/workflows/bashtest.yml/badge.svg)](https://github.com/kamangir/bluer-objects/actions/workflows/bashtest.yml) [![PyPI version](https://img.shields.io/pypi/v/bluer-objects.svg)](https://pypi.org/project/bluer-objects/) [![PyPI - Downloads](https://img.shields.io/pypi/dd/bluer-objects)](https://pypistats.org/packages/bluer-objects)
55
55
 
56
- built by 🌀 [`bluer_options-5.42.1`](https://github.com/kamangir/awesome-bash-cli), based on 🌀 [`bluer_objects-6.40.1`](https://github.com/kamangir/bluer-objects).
56
+ built by 🌀 [`bluer_options-5.45.1`](https://github.com/kamangir/awesome-bash-cli), based on 🌀 [`bluer_objects-6.48.1`](https://github.com/kamangir/bluer-objects).
57
57
 
58
58
  built by 🌀 [`blueness-3.96.1`](https://github.com/kamangir/blueness).
@@ -1,4 +1,4 @@
1
- bluer_objects/__init__.py,sha256=lEt5u_yI_9e7dvfU-RqNTiOjf7Ll4_DuqBSw1ho52a0,310
1
+ bluer_objects/__init__.py,sha256=lY638IHPdlgGCWDydiVQtjCEk0pQhazpt3hB-gM69qg,310
2
2
  bluer_objects/__main__.py,sha256=Yqfov833_hJuRne19WrGhT5DWAPtdffpoMxeSXS7EGw,359
3
3
  bluer_objects/config.env,sha256=TzX3WyJjwEs9V-NzK3FBUyePhb0i2ZoCja-lhDF_xJU,116
4
4
  bluer_objects/env.py,sha256=4g_JNKr1uBh8bg39zXLYOCizlWD9_0fpDUYliNgpmj4,1225
@@ -10,18 +10,17 @@ bluer_objects/urls.py,sha256=paHaYlLMQOI46-EYNch5ohu9Q09BMkF2vvJy1QufrVI,19
10
10
  bluer_objects/.abcli/abcli.sh,sha256=8RDi_vCZfB6JOeGSJWcmmzZv2pS4o-_j250rFYG7Ljc,202
11
11
  bluer_objects/.abcli/actions.sh,sha256=HZI-X5KUy6bXEHmxywfBN1zbHalU0mcTblTQ2HvIfOE,236
12
12
  bluer_objects/.abcli/aka.sh,sha256=odRbw4KZb9Ld7uXny6H2pPi64_5kowKX3s68N6YvRmI,23
13
- bluer_objects/.abcli/alias.sh,sha256=Tgf-Z3Wjae-z860cJHI-DstslxdBu_ZM7S_6kThqOAQ,654
13
+ bluer_objects/.abcli/alias.sh,sha256=wroySjiDZ04QpTIO-MU9dVvJD26FlIbTf4WgF_IW5Jc,626
14
14
  bluer_objects/.abcli/bluer_objects.sh,sha256=24qMYZImMHREqtYRFdDwIP_TaRnb9RBtUL836RtZWG0,204
15
15
  bluer_objects/.abcli/clone.sh,sha256=8ri9hNdvP8-tjJLJzPxuNcqD8Phv0htMD1-bGsbFUiU,1945
16
16
  bluer_objects/.abcli/download.sh,sha256=eZVG2M6MjEhp4IEhuxYDSiKjEOr84zNUNTKI7xTOpMk,555
17
17
  bluer_objects/.abcli/file.sh,sha256=djcHSFS8fqlCsoDyZKmimNTzd-jOUnxbOFpL7xq_hGk,150
18
18
  bluer_objects/.abcli/gif.sh,sha256=UBfVV3fUCgg-hrR2afUQxXoMdhOs9x1pQI5lhth_dEg,779
19
19
  bluer_objects/.abcli/host.sh,sha256=T4oYR9vBJlQQr40XswEbVE4w0kMG6mNxIpz-VBHSdQg,564
20
- bluer_objects/.abcli/ls.sh,sha256=CG6tPvxkXxa7SqK9DwLJLyjaekqDpYJFLYdjuURzeIA,611
20
+ bluer_objects/.abcli/ls.sh,sha256=UaXfNgsy6-BJeHkhf__YYfMOf700oWFN3DAG2VlxuwM,411
21
21
  bluer_objects/.abcli/metadata.sh,sha256=BA1Mnf7_Zy7kiUp0UrDaJogTaBOtG-IwuTaeY8avbzI,374
22
22
  bluer_objects/.abcli/mlflow.sh,sha256=nlQP0-LTzVG5OsvCgC0ybVkP3enh4K00OFF4sHakxYs,660
23
23
  bluer_objects/.abcli/object.sh,sha256=nzXPfgS2nicI-3dNVjC-xw9QKdWN1mtUcy7VmLGyWR8,816
24
- bluer_objects/.abcli/publish.sh,sha256=jnLEA9y6yT8SU0wexXCbGWCoCOteHQQMmE27fF9ouOo,1878
25
24
  bluer_objects/.abcli/select.sh,sha256=oXT3KBaTDOd8xlurALDIxhzbOTVOFyGpLTseqPxtNqU,863
26
25
  bluer_objects/.abcli/storage.sh,sha256=iYHxdXJI9sGR-WKxDuYKOB06FccSQ0G0-uZn9UJQGnc,321
27
26
  bluer_objects/.abcli/upload.sh,sha256=hUqGDyUEFF9tj7KHqioBvvQU1vjN978eHz-DPecf1bY,523
@@ -49,9 +48,9 @@ bluer_objects/.abcli/storage/status.sh,sha256=4vV49LOFp7xoT2Wg9aNa44m69Z6xOsKcU7
49
48
  bluer_objects/.abcli/tests/README.sh,sha256=ToCOfpurKI1Zkl-bXzA-Yowc038jPn6Cx-_EuosgxCY,147
50
49
  bluer_objects/.abcli/tests/clone.sh,sha256=I3vp7n5RrmNXdi7c6jAI0I-8GG2f-1JN8uPfYVd6ZKk,510
51
50
  bluer_objects/.abcli/tests/gif.sh,sha256=i3wvd5Wn0XAhbSHUlVTJqLyQZgO_gTHAqr3LP60ZhNk,501
52
- bluer_objects/.abcli/tests/help.sh,sha256=qfURMCu5f7fsfKoMFBIuz5_phIvHr7C8jMVX_2bMLE4,1744
51
+ bluer_objects/.abcli/tests/help.sh,sha256=Sh7e3coLNszP98S_PZ-cQCpcFe-8Ej68zSxeXVfgZOo,1739
53
52
  bluer_objects/.abcli/tests/host.sh,sha256=lZUmJ8BIdZ-hCc8tzt-5YfHjXBhbnlwEBPMPAx22MIo,141
54
- bluer_objects/.abcli/tests/ls.sh,sha256=CbJUpEhAinnK606oWmqTumOYw0YywOMOOPh4hX5ZVAs,198
53
+ bluer_objects/.abcli/tests/ls.sh,sha256=C2HP_B1GXYWj6cM4ofE6iN-rCVy-zywvnaZS9w82BSM,583
55
54
  bluer_objects/.abcli/tests/metadata.sh,sha256=NsWYxHpBMFq9JpxsQS1u6lXYjBSZ41la49XtTrONMm8,1658
56
55
  bluer_objects/.abcli/tests/mlflow_cache.sh,sha256=Z-H_sq7nk4ltlco1kwDS-tPeiVPtCNjHTC2NzNGGFrg,379
57
56
  bluer_objects/.abcli/tests/mlflow_logging.sh,sha256=ADWs_etGq6EKxUUVE-iNvD9KH4oPv0o1IF8IlBhbooY,302
@@ -80,9 +79,10 @@ bluer_objects/help/__main__.py,sha256=Dxg-JpMOIlYWZklI_J2LyiHnRui5lUwWmfM7FLRzUX
80
79
  bluer_objects/help/assets.py,sha256=qOXKckbcl_4I-iUbUYAVOm9B6Cd3l1l0Z61hZU9G2fo,675
81
80
  bluer_objects/help/clone.py,sha256=PDnQs7zc4sqmoBHPjVRfX7jIaePiohPGCNA5bxeerik,553
82
81
  bluer_objects/help/download.py,sha256=1fw3ASOXUuXcNhm8y0AK7ZBmXzWwZvdo2hK9ZVbgteA,439
83
- bluer_objects/help/functions.py,sha256=lM_pQMIX4C2sMwkXqjfakyAYEhYOQ5CAjoNlWbjhHFA,918
82
+ bluer_objects/help/functions.py,sha256=y_k_koMMdDRj7sBhaugofrk1KGfNk_okNIFHZLRJSmM,983
84
83
  bluer_objects/help/gif.py,sha256=gKV6vNT4bEC2Ch3QIb3Yc5DqzAH_UvAVCsuvzXeF1Sc,564
85
84
  bluer_objects/help/host.py,sha256=4t4yrPGjTbnFtODcuBjfIzpA5pmmvc5s4QrjIqPPVsM,988
85
+ bluer_objects/help/ls.py,sha256=acvRLDxjJOzQ1a9ZQ4Mn9aBZ8Vf17IDHcAxC2O3R33Y,627
86
86
  bluer_objects/help/metadata.py,sha256=fk22NasBcZU1ffY4fu6AxrCzMQtTI28p_ghaSVRrrPM,2811
87
87
  bluer_objects/help/upload.py,sha256=p-nRw9d_S6PI7PcD0mBwWqQRPWQG4r3usjvOIzAbTeM,368
88
88
  bluer_objects/help/mlflow/__init__.py,sha256=RMYjQDHw-gBTi4PAw9Mgdq4s5N7E0h-1dJ80EaVh5Uw,3695
@@ -107,14 +107,14 @@ bluer_objects/mlflow/objects.py,sha256=aXYHLRCTt1FtDQoyPOG-doCFms7qF6Krz00Fg3kzJ
107
107
  bluer_objects/mlflow/runs.py,sha256=v1IKRvxbuKkengESnG-xdUXxxNSkALMeBmfMQwrUKSs,2416
108
108
  bluer_objects/mlflow/tags.py,sha256=8uBYRrE4weTLrwPqo-c4M21FEVRANf7SGCcxpoCPhuM,2475
109
109
  bluer_objects/mlflow/testing.py,sha256=cJH5Ki02fJN_Xos1j9yvwQChXvMkOa9i12vtDKmkbNc,842
110
- bluer_objects/storage/WebDAV.py,sha256=KPO8ZkxrheyB9j3f9WZJ1flAycPrN2PK7fXwTQAqlcw,2891
111
- bluer_objects/storage/WebDAVzip.py,sha256=xWQK8OKcd3_Q7W0DQMStvgRiICW3hsHdFZzdWpji2nw,2428
112
- bluer_objects/storage/__init__.py,sha256=9Fs7z8cDGvgZ13YFRTfSPOYFbedEoicyTl2slwqNPng,1001
113
- bluer_objects/storage/__main__.py,sha256=3PaNaWa6rbsuQEKMaEwBqp0YZQP6-HdnBp7cra6j4vU,866
114
- bluer_objects/storage/base.py,sha256=DLD7zqgWcJqXjq1l72pxX07uo7rc-Y0PqeOy9S4EZQw,859
110
+ bluer_objects/storage/WebDAV.py,sha256=bTq06MjTO9RffP3Uc4oEKwFaGx18DFb29VxD3jrPTz4,3078
111
+ bluer_objects/storage/WebDAVzip.py,sha256=kTx5tCsYD6bpGXM5modbiI5o3-Rj2XFHah9DzTUtyJA,3505
112
+ bluer_objects/storage/__init__.py,sha256=PDHaF4J4d6bxlpf_7_25sHE1hEbtwjNqMAZk75QpiSk,1205
113
+ bluer_objects/storage/__main__.py,sha256=fmdj5AXHnp8sdizD1grUqjRPiutWgTjgv09fH5Xvm68,1578
114
+ bluer_objects/storage/base.py,sha256=2A5Dy4q134z4aA4gAp5_K3Kw08pVNbElE5eN0NM6Uks,1031
115
115
  bluer_objects/testing/__init__.py,sha256=DWY5ZtvCnHG_t9BDiqy_ArLOZi-nlyAtPVMLA1PPAMU,62
116
116
  bluer_objects/testing/__main__.py,sha256=EfuNfx1TXLriW6HHf86L7qp1FXoEV5F4sxej1r_i95k,656
117
- bluer_objects/testing/functions.py,sha256=3E8pUOnr-daKD0jUDDCmozNm442nFK9IKWaZUsfFSe8,1352
117
+ bluer_objects/testing/functions.py,sha256=AXAfzWLcEPkbSYTehdahshjKJ45C4IJkRs_TgrHOntc,1355
118
118
  bluer_objects/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
119
119
  bluer_objects/tests/test_README.py,sha256=5D4UV8VcjbeAPThsYVynYtVFuP8gwMAhIjEWuOQZsWs,89
120
120
  bluer_objects/tests/test_env.py,sha256=Gjjb9FoQ6MPvFwX8pdx74aND8Ye_Bb-8XpaaKOZtw-4,547
@@ -136,8 +136,8 @@ bluer_objects/tests/test_path.py,sha256=JjONWyhZyMM_u1SzD1RI_iZ5vYJDUe-B51fbbHcz
136
136
  bluer_objects/tests/test_storage.py,sha256=2tJ6Hev9ShId9Qn-0FXDw41HWjcl3wymcB_Bv1FJWi4,1127
137
137
  bluer_objects/tests/test_testing.py,sha256=d2NH435yqJBl9wmfMqGGd-f0Y0jsL2QhHUXkty9AwPA,235
138
138
  bluer_objects/tests/test_version.py,sha256=Lyf3PMcA22e17BNRk_2VgPrtao6dWEgVoXo68Uds8SE,75
139
- bluer_objects-6.40.1.dist-info/licenses/LICENSE,sha256=ogEPNDSH0_dhiv_lT3ifVIdgIzHAqNA_SemnxUfPBJk,7048
140
- bluer_objects-6.40.1.dist-info/METADATA,sha256=b4Ys1bGQ6wJkqBmwOq7d7EIvoszvTs-EqxA1l0g_P6A,2748
141
- bluer_objects-6.40.1.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
142
- bluer_objects-6.40.1.dist-info/top_level.txt,sha256=RX2TpddbnRkurda3G_pAdyeTztP2IhhRPx949GlEvQo,14
143
- bluer_objects-6.40.1.dist-info/RECORD,,
139
+ bluer_objects-6.48.1.dist-info/licenses/LICENSE,sha256=ogEPNDSH0_dhiv_lT3ifVIdgIzHAqNA_SemnxUfPBJk,7048
140
+ bluer_objects-6.48.1.dist-info/METADATA,sha256=wRiX4i8LwFbEh8XKIoCw0L1wyC1j5QMQK8PW8rVWPLY,2748
141
+ bluer_objects-6.48.1.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
142
+ bluer_objects-6.48.1.dist-info/top_level.txt,sha256=RX2TpddbnRkurda3G_pAdyeTztP2IhhRPx949GlEvQo,14
143
+ bluer_objects-6.48.1.dist-info/RECORD,,
@@ -1,59 +0,0 @@
1
- #! /usr/bin/env bash
2
-
3
- function bluer_ai_publish() {
4
- local options=$1
5
- local do_download=$(abcli_option_int "$options" download 1)
6
- local do_tar=$(abcli_option_int "$options" tar 0)
7
- local prefix=$(abcli_option "$options" prefix)
8
- local suffix=$(abcli_option "$options" suffix)
9
-
10
- local object_name=$(abcli_clarify_object $2 .)
11
- [[ "$do_download" == 1 ]] &&
12
- bluer_objects_download - $object_name
13
-
14
- bluer_objects_mlflow_tags set $object_name published
15
-
16
- local public_object_name=$(abcli_option "$options" as $object_name)
17
-
18
- if [ "$do_tar" == 1 ]; then
19
- abcli_log "publishing $object_name -> $public_object_name.tar.gz"
20
-
21
- bluer_objects_upload ~open,solid $object_name
22
- aws s3 cp \
23
- $ABCLI_S3_OBJECT_PREFIX/$object_name.tar.gz \
24
- s3://$ABCLI_AWS_S3_PUBLIC_BUCKET_NAME/$public_object_name.tar.gz
25
- aws s3 rm \
26
- $ABCLI_S3_OBJECT_PREFIX/$object_name.tar.gz
27
-
28
- abcli_log "🔗 $ABCLI_PUBLIC_PREFIX/$public_object_name.tar.gz"
29
- return
30
- fi
31
-
32
- local object_path=$ABCLI_OBJECT_ROOT/$object_name
33
-
34
- if [[ -z "$prefix$suffix" ]]; then
35
- abcli_log "publishing $object_name -> $public_object_name"
36
-
37
- aws s3 sync \
38
- $object_path/ \
39
- s3://$ABCLI_AWS_S3_PUBLIC_BUCKET_NAME/$public_object_name/
40
-
41
- abcli_log "🔗 $ABCLI_PUBLIC_PREFIX/$public_object_name/"
42
- return
43
- fi
44
-
45
- abcli_log "publishing $object_name/$prefix*$suffix -> $public_object_name"
46
-
47
- pushd $object_path >/dev/null
48
- local filename
49
- for filename in $(ls *); do
50
- [[ "$filename" != "$prefix"*"$suffix" ]] && continue
51
-
52
- aws s3 cp \
53
- $filename \
54
- s3://$ABCLI_AWS_S3_PUBLIC_BUCKET_NAME/$public_object_name/$filename
55
-
56
- abcli_log "🔗 $ABCLI_PUBLIC_PREFIX/$public_object_name/$filename"
57
- done
58
- popd >/dev/null
59
- }