bluer-objects 6.28.1__py3-none-any.whl → 6.29.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/__init__.py +1 -1
- bluer_objects/env.py +0 -3
- bluer_objects/tests/test_env.py +0 -2
- bluer_objects/tests/test_file_load_save.py +12 -5
- bluer_objects/tests/test_objects.py +39 -10
- {bluer_objects-6.28.1.dist-info → bluer_objects-6.29.1.dist-info}/METADATA +2 -2
- {bluer_objects-6.28.1.dist-info → bluer_objects-6.29.1.dist-info}/RECORD +10 -10
- {bluer_objects-6.28.1.dist-info → bluer_objects-6.29.1.dist-info}/WHEEL +0 -0
- {bluer_objects-6.28.1.dist-info → bluer_objects-6.29.1.dist-info}/licenses/LICENSE +0 -0
- {bluer_objects-6.28.1.dist-info → bluer_objects-6.29.1.dist-info}/top_level.txt +0 -0
bluer_objects/__init__.py
CHANGED
bluer_objects/env.py
CHANGED
|
@@ -37,9 +37,6 @@ DUMMY_TEXT = "This is some dummy text. This is some dummy text. This is some dum
|
|
|
37
37
|
|
|
38
38
|
DATABRICKS_WORKSPACE = get_env("DATABRICKS_WORKSPACE")
|
|
39
39
|
|
|
40
|
-
DATABRICKS_HOST = get_env("DATABRICKS_HOST")
|
|
41
|
-
DATABRICKS_TOKEN = get_env("DATABRICKS_TOKEN")
|
|
42
|
-
|
|
43
40
|
ABCLI_MLFLOW_EXPERIMENT_PREFIX = get_env("ABCLI_MLFLOW_EXPERIMENT_PREFIX")
|
|
44
41
|
|
|
45
42
|
ABCLI_S3_OBJECT_PREFIX = "to-be-removed"
|
bluer_objects/tests/test_env.py
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import pytest
|
|
2
|
-
from typing import Callable, Union, Tuple
|
|
2
|
+
from typing import Callable, Union, Tuple
|
|
3
3
|
import numpy as np
|
|
4
4
|
|
|
5
5
|
from bluer_options import string
|
|
6
6
|
|
|
7
|
-
from bluer_objects import file, objects
|
|
7
|
+
from bluer_objects import file, objects
|
|
8
8
|
from bluer_objects.file.load import (
|
|
9
9
|
load_image,
|
|
10
10
|
load_json,
|
|
11
11
|
load_matrix,
|
|
12
12
|
load_text,
|
|
13
|
+
load_yaml,
|
|
13
14
|
)
|
|
14
15
|
from bluer_objects.file.save import (
|
|
15
16
|
save_image,
|
|
16
17
|
save_json,
|
|
17
18
|
save_matrix,
|
|
18
19
|
save_text,
|
|
20
|
+
save_yaml,
|
|
19
21
|
)
|
|
20
22
|
from bluer_objects.tests.test_objects import test_object
|
|
21
23
|
|
|
@@ -29,19 +31,24 @@ from bluer_objects.tests.test_objects import test_object
|
|
|
29
31
|
[
|
|
30
32
|
[
|
|
31
33
|
load_image,
|
|
32
|
-
"
|
|
34
|
+
"test-00.png",
|
|
33
35
|
save_image,
|
|
34
36
|
],
|
|
35
37
|
[
|
|
36
38
|
load_json,
|
|
37
|
-
"
|
|
39
|
+
"test.json",
|
|
38
40
|
save_json,
|
|
39
41
|
],
|
|
40
42
|
[
|
|
41
43
|
load_text,
|
|
42
|
-
"
|
|
44
|
+
"test.yaml",
|
|
43
45
|
save_text,
|
|
44
46
|
],
|
|
47
|
+
[
|
|
48
|
+
load_yaml,
|
|
49
|
+
"test.yaml",
|
|
50
|
+
save_yaml,
|
|
51
|
+
],
|
|
45
52
|
],
|
|
46
53
|
)
|
|
47
54
|
def test_file_load_save(
|
|
@@ -1,24 +1,49 @@
|
|
|
1
1
|
import pytest
|
|
2
|
+
import numpy as np
|
|
2
3
|
|
|
3
|
-
from
|
|
4
|
+
from bluer_options import string
|
|
4
5
|
|
|
5
|
-
from bluer_objects import file, path, objects
|
|
6
|
+
from bluer_objects import file, path, objects
|
|
6
7
|
from bluer_objects import storage
|
|
7
|
-
from bluer_objects.env import VANWATCH_TEST_OBJECT
|
|
8
8
|
from bluer_objects.logger import logger
|
|
9
9
|
|
|
10
|
-
NAME = module.name(__file__, NAME)
|
|
11
|
-
|
|
12
10
|
|
|
13
11
|
@pytest.fixture
|
|
14
12
|
def test_object():
|
|
15
|
-
object_name =
|
|
13
|
+
object_name = objects.unique_object("test_object")
|
|
14
|
+
for suffix in range(10):
|
|
15
|
+
assert file.save_image(
|
|
16
|
+
objects.path_of(
|
|
17
|
+
object_name=object_name,
|
|
18
|
+
filename=f"test-{suffix:02d}.png",
|
|
19
|
+
),
|
|
20
|
+
(np.random.rand(512, 512, 3) * 255).astype(np.uint8),
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
depth = 10
|
|
24
|
+
data = {
|
|
25
|
+
string.random(length=depth): string.random(length=depth) for _ in range(depth)
|
|
26
|
+
}
|
|
16
27
|
|
|
17
|
-
assert
|
|
28
|
+
assert file.save_yaml(
|
|
29
|
+
objects.path_of(
|
|
30
|
+
object_name=object_name,
|
|
31
|
+
filename="test.yaml",
|
|
32
|
+
),
|
|
33
|
+
data,
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
assert file.save_json(
|
|
37
|
+
objects.path_of(
|
|
38
|
+
object_name=object_name,
|
|
39
|
+
filename="test.json",
|
|
40
|
+
),
|
|
41
|
+
data,
|
|
42
|
+
)
|
|
18
43
|
|
|
19
44
|
yield object_name
|
|
20
45
|
|
|
21
|
-
logger.info(f"deleting
|
|
46
|
+
logger.info(f"deleting test_object ...")
|
|
22
47
|
|
|
23
48
|
|
|
24
49
|
@pytest.mark.parametrize(
|
|
@@ -29,6 +54,10 @@ def test_objects_list_of_files(
|
|
|
29
54
|
test_object,
|
|
30
55
|
cloud: bool,
|
|
31
56
|
):
|
|
57
|
+
if cloud:
|
|
58
|
+
# TODO: enable when implemented
|
|
59
|
+
return
|
|
60
|
+
|
|
32
61
|
list_of_files = [
|
|
33
62
|
file.name_and_extension(filename)
|
|
34
63
|
for filename in objects.list_of_files(
|
|
@@ -37,7 +66,7 @@ def test_objects_list_of_files(
|
|
|
37
66
|
)
|
|
38
67
|
]
|
|
39
68
|
|
|
40
|
-
assert "
|
|
69
|
+
assert "test-00.png" in list_of_files
|
|
41
70
|
|
|
42
71
|
|
|
43
72
|
def test_object_object_path():
|
|
@@ -51,7 +80,7 @@ def test_objects_path_of(test_object):
|
|
|
51
80
|
assert file.exists(
|
|
52
81
|
objects.path_of(
|
|
53
82
|
object_name=test_object,
|
|
54
|
-
filename="
|
|
83
|
+
filename="test-00.png",
|
|
55
84
|
)
|
|
56
85
|
)
|
|
57
86
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bluer_objects
|
|
3
|
-
Version: 6.
|
|
3
|
+
Version: 6.29.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
|
[](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)
|
|
55
55
|
|
|
56
|
-
built by 🌀 [`bluer_options-5.
|
|
56
|
+
built by 🌀 [`bluer_options-5.28.1`](https://github.com/kamangir/awesome-bash-cli), based on 🌀 [`bluer_objects-6.29.1`](https://github.com/kamangir/bluer-objects).
|
|
57
57
|
|
|
58
58
|
built by 🌀 [`blueness-3.96.1`](https://github.com/kamangir/blueness).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
bluer_objects/__init__.py,sha256=
|
|
1
|
+
bluer_objects/__init__.py,sha256=vOYHFwxCmf0GZnqlNpeVRfaFJTjASYtfPiyXEcm7pMI,310
|
|
2
2
|
bluer_objects/__main__.py,sha256=Yqfov833_hJuRne19WrGhT5DWAPtdffpoMxeSXS7EGw,359
|
|
3
3
|
bluer_objects/config.env,sha256=eGjonR_ifC-IdiRnsmV3cyVTEnJqWTMmSuniXw9bncE,193
|
|
4
|
-
bluer_objects/env.py,sha256=
|
|
4
|
+
bluer_objects/env.py,sha256=t_eG6SGEuuKXWtpOvFwuzL8H0SnaKEhOFIwWoIKzymo,1337
|
|
5
5
|
bluer_objects/markdown.py,sha256=PhAwCTHIisO9qOpKHeb63U5oD9Zi8LnIQKTx_OWS4wE,938
|
|
6
6
|
bluer_objects/objects.py,sha256=TWbb6jeVvHJcLPutftXb724zxIiAy6aq3q4SLYgvPns,3462
|
|
7
7
|
bluer_objects/path.py,sha256=9uspZqObI29NerVDF30uILLaouDtloASh0Mywyq2_ew,3946
|
|
@@ -107,8 +107,8 @@ bluer_objects/storage/__main__.py,sha256=3PaNaWa6rbsuQEKMaEwBqp0YZQP6-HdnBp7cra6
|
|
|
107
107
|
bluer_objects/storage/base.py,sha256=DLD7zqgWcJqXjq1l72pxX07uo7rc-Y0PqeOy9S4EZQw,859
|
|
108
108
|
bluer_objects/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
109
109
|
bluer_objects/tests/test_README.py,sha256=5D4UV8VcjbeAPThsYVynYtVFuP8gwMAhIjEWuOQZsWs,89
|
|
110
|
-
bluer_objects/tests/test_env.py,sha256=
|
|
111
|
-
bluer_objects/tests/test_file_load_save.py,sha256=
|
|
110
|
+
bluer_objects/tests/test_env.py,sha256=w5wj96nK8iQkct1As-ztINJAOTFvBv-BQtX4UcyggLo,621
|
|
111
|
+
bluer_objects/tests/test_file_load_save.py,sha256=mNCo3ay55ktc5L6SPpNyrpsJrGfVpYi66EgunlAN-Uw,2406
|
|
112
112
|
bluer_objects/tests/test_fullname.py,sha256=xWFf9qqzDQ-4RxRyvyR9GWZyU5qNrKxru94UUKMJfPk,80
|
|
113
113
|
bluer_objects/tests/test_graphics.py,sha256=2YKD-PTIo5e_FHgGaMsTm2MGfgd2KzmSJhOFOTzstYc,598
|
|
114
114
|
bluer_objects/tests/test_graphics_frame.py,sha256=wRW3MjnfS8edNHiWi_BFJBULoLs1JlJhpFeuCoW5I6A,267
|
|
@@ -121,12 +121,12 @@ bluer_objects/tests/test_logger_matrix.py,sha256=krJPUdlQTLD8P8EjkrlmJVw6Iylwbl8
|
|
|
121
121
|
bluer_objects/tests/test_markdown.py,sha256=KtCWKIDs4U1M3qAGFMYhzVpdGiDV2VU8z7dCaU3s3Ec,217
|
|
122
122
|
bluer_objects/tests/test_metadata.py,sha256=jT39xsP4u3dq6ZWmmVwHlk0D_33Uv_-McNBdy_ba2DM,4264
|
|
123
123
|
bluer_objects/tests/test_mlflow.py,sha256=B7CvITThv6YmDB1la9_H2sF2VLt8urpNDQ0YnC1n8HU,1381
|
|
124
|
-
bluer_objects/tests/test_objects.py,sha256=
|
|
124
|
+
bluer_objects/tests/test_objects.py,sha256=kFgD8HZbjaCUOjkaHqR5cnePz0V_sntrrQO9qijVwA4,2137
|
|
125
125
|
bluer_objects/tests/test_path.py,sha256=JjONWyhZyMM_u1SzD1RI_iZ5vYJDUe-B51fbbHczIig,85
|
|
126
126
|
bluer_objects/tests/test_storage.py,sha256=pRXIStIDwo-7L-Z-cg1iEvv0tDh7cuW1-I2vY6Cm6lg,1127
|
|
127
127
|
bluer_objects/tests/test_version.py,sha256=Lyf3PMcA22e17BNRk_2VgPrtao6dWEgVoXo68Uds8SE,75
|
|
128
|
-
bluer_objects-6.
|
|
129
|
-
bluer_objects-6.
|
|
130
|
-
bluer_objects-6.
|
|
131
|
-
bluer_objects-6.
|
|
132
|
-
bluer_objects-6.
|
|
128
|
+
bluer_objects-6.29.1.dist-info/licenses/LICENSE,sha256=ogEPNDSH0_dhiv_lT3ifVIdgIzHAqNA_SemnxUfPBJk,7048
|
|
129
|
+
bluer_objects-6.29.1.dist-info/METADATA,sha256=z8bpGNUdJ8oJjWRSSHH-fIKZnLX9uzAFoqHKH71moKc,2748
|
|
130
|
+
bluer_objects-6.29.1.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
131
|
+
bluer_objects-6.29.1.dist-info/top_level.txt,sha256=RX2TpddbnRkurda3G_pAdyeTztP2IhhRPx949GlEvQo,14
|
|
132
|
+
bluer_objects-6.29.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|