bluer-objects 6.129.1__py3-none-any.whl → 6.133.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 CHANGED
@@ -4,7 +4,7 @@ ICON = "🌀"
4
4
 
5
5
  DESCRIPTION = f"{ICON} Object management in Bash."
6
6
 
7
- VERSION = "6.129.1"
7
+ VERSION = "6.133.1"
8
8
 
9
9
  REPO_NAME = "bluer-objects"
10
10
 
@@ -150,6 +150,8 @@ def download(
150
150
  return True
151
151
 
152
152
  try:
153
+ os.makedirs(path(filename), exist_ok=True)
154
+
153
155
  # https://stackoverflow.com/a/27406501
154
156
  with urllib3.PoolManager().request(
155
157
  "GET", url, preload_content=False
@@ -0,0 +1,25 @@
1
+ import pytest
2
+
3
+ from bluer_objects import objects, file
4
+
5
+
6
+ @pytest.mark.parametrize(
7
+ ["url"],
8
+ [
9
+ ["https://raw.githubusercontent.com/jbrownlee/Datasets/master/shampoo.csv"],
10
+ ],
11
+ )
12
+ def test_file_download(url: str):
13
+ object_name = objects.unique_object("test_file_download")
14
+
15
+ filename = objects.path_of(
16
+ object_name=object_name,
17
+ filename=url.split("/")[-1],
18
+ )
19
+
20
+ assert file.download(
21
+ url=url,
22
+ filename=filename,
23
+ )
24
+
25
+ assert file.exists(filename)
@@ -94,7 +94,7 @@ def test_file_load_save_matrix(
94
94
  size: Tuple[int, ...],
95
95
  dtype: Union[np.dtype, type],
96
96
  ) -> None:
97
- object_name = objects.unique_object(test_file_load_save_matrix)
97
+ object_name = objects.unique_object("test_file_load_save_matrix")
98
98
 
99
99
  test_matrix = (
100
100
  np.random.randint(0, 256, size=size, dtype=dtype)
@@ -18,7 +18,7 @@ def test_log_matrix(
18
18
  test_image,
19
19
  verbose: bool,
20
20
  ):
21
- object_name = objects.unique_object()
21
+ object_name = objects.unique_object("test_log_matrix")
22
22
 
23
23
  assert log_matrix(
24
24
  matrix=test_image,
@@ -58,7 +58,7 @@ def test_log_matrix_hist(
58
58
  test_image,
59
59
  verbose: bool,
60
60
  ):
61
- object_name = objects.unique_object()
61
+ object_name = objects.unique_object("test_log_matrix_hist")
62
62
 
63
63
  assert log_matrix_hist(
64
64
  matrix=test_image,
@@ -77,7 +77,8 @@ def test_metadata(
77
77
  get_source: Callable[[str], str],
78
78
  get_source_type: MetadataSourceType,
79
79
  ):
80
- object_name = unique_object()
80
+ object_name = unique_object("test_metadata")
81
+
81
82
  key = random()
82
83
  value = random()
83
84
 
@@ -98,7 +99,8 @@ def test_metadata(
98
99
 
99
100
 
100
101
  def test_metadata_dict():
101
- object_name = unique_object()
102
+ object_name = unique_object("test_metadata_dict")
103
+
102
104
  key = random()
103
105
  value = {random(): random() for _ in range(10)}
104
106
 
@@ -138,7 +140,8 @@ def test_metadata_dict():
138
140
 
139
141
 
140
142
  def test_metadata_file():
141
- object_name = unique_object()
143
+ object_name = unique_object("test_metadata_file")
144
+
142
145
  key = random()
143
146
  value = random()
144
147
 
@@ -153,7 +156,8 @@ def test_metadata_file():
153
156
 
154
157
 
155
158
  def test_metadata_object():
156
- object_name = unique_object()
159
+ object_name = unique_object("test_metadata_object")
160
+
157
161
  key = random()
158
162
  value = random()
159
163
 
@@ -163,7 +167,8 @@ def test_metadata_object():
163
167
 
164
168
 
165
169
  def test_metadata_path():
166
- object_name = unique_object()
170
+ object_name = unique_object("test_metadata_path")
171
+
167
172
  key = random()
168
173
  value = random()
169
174
 
@@ -175,7 +180,8 @@ def test_metadata_path():
175
180
 
176
181
 
177
182
  def test_metadata_upload():
178
- object_name = unique_object()
183
+ object_name = unique_object("test_metadata_upload")
184
+
179
185
  key = random()
180
186
  value = random()
181
187
 
@@ -11,7 +11,7 @@ from bluer_objects.mlflow import testing
11
11
 
12
12
 
13
13
  def test_from_and_to_experiment_name():
14
- object_name = unique_object()
14
+ object_name = unique_object("test_from_and_to_experiment_name")
15
15
 
16
16
  assert (
17
17
  objects.to_object_name(objects.to_experiment_name(object_name)) == object_name
@@ -27,7 +27,7 @@ def test_mlflow_testing():
27
27
  [["x=1,y=2,z=3"]],
28
28
  )
29
29
  def test_mlflow_tag_set_get(tags_str: str):
30
- object_name = unique_object("test_mlflow_tag_set")
30
+ object_name = unique_object("test_mlflow_tag_set_get")
31
31
 
32
32
  assert tags.set_tags(
33
33
  object_name,
@@ -41,6 +41,7 @@ def test_objects_list_of_files(
41
41
 
42
42
  def test_object_object_path():
43
43
  object_name = objects.unique_object("test_object_object_path")
44
+
44
45
  object_path = objects.object_path(object_name, create=True)
45
46
  assert object_path
46
47
  assert path.exists(object_path)
@@ -61,5 +62,6 @@ def test_objects_path_of(test_object):
61
62
  )
62
63
  def test_objects_unique_object(prefix: str):
63
64
  object_name = objects.unique_object(prefix)
65
+
64
66
  assert object_name
65
67
  assert object_name.startswith(prefix)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bluer_objects
3
- Version: 6.129.1
3
+ Version: 6.133.1
4
4
  Summary: 🌀 Object management in Bash.
5
5
  Home-page: https://github.com/kamangir/bluer-objects
6
6
  Author: Arash Abadpour (Kamangir)
@@ -63,6 +63,6 @@ pip install bluer-objects
63
63
 
64
64
  [![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)
65
65
 
66
- built by 🌀 [`bluer README`](https://github.com/kamangir/bluer-objects/tree/main/bluer_objects/README), based on 🌀 [`bluer_objects-6.129.1`](https://github.com/kamangir/bluer-objects).
66
+ built by 🌀 [`bluer README`](https://github.com/kamangir/bluer-objects/tree/main/bluer_objects/README), based on 🌀 [`bluer_objects-6.133.1`](https://github.com/kamangir/bluer-objects).
67
67
 
68
68
  built by 🌀 [`blueness-3.118.1`](https://github.com/kamangir/blueness).
@@ -1,4 +1,4 @@
1
- bluer_objects/__init__.py,sha256=QwE0nTd3RYTVIXgiJdMtSIfXOgFnYDJCLGn_FiOZQww,315
1
+ bluer_objects/__init__.py,sha256=774USgP5qvl-GrE6IkJmQkJsNTe9H7euzkIuZxe20ig,315
2
2
  bluer_objects/__main__.py,sha256=Yqfov833_hJuRne19WrGhT5DWAPtdffpoMxeSXS7EGw,359
3
3
  bluer_objects/config.env,sha256=OskMqZi0CuvYM4TDq_wzrG7UonxvV0pV6zwObwHaLTI,90
4
4
  bluer_objects/env.py,sha256=J5LklWyWT-Yvvoe8MVCZQ3iqRqyDutq6IbNYNj9A1VM,1183
@@ -65,7 +65,7 @@ bluer_objects/README/items.py,sha256=-XaNCr5b_NGRkZVfIQ6hBFgJw5GIVcMJdktT3hWoam4
65
65
  bluer_objects/file/__init__.py,sha256=c_79ipBkKl6OFDimOev0vnaVdpUk-Bl3oJUapOreMXc,681
66
66
  bluer_objects/file/__main__.py,sha256=v2IXWvZeh_B2sGYWzv1CiUY-7HWHXXghZM5M4IPjbu4,1277
67
67
  bluer_objects/file/classes.py,sha256=TRgeRP2yxInPkBnywhuB4BsoBcBRA3UmQzX1dI43UxU,872
68
- bluer_objects/file/functions.py,sha256=CiHZLK9Mz8M3-U_dpQSlfEIAl52zPBWyQDepLoll6Ow,6389
68
+ bluer_objects/file/functions.py,sha256=H4cgKtCTpbY3dR7kAOvbAbq8xSEHR9s6MQ_3W-Pb6Ng,6441
69
69
  bluer_objects/file/load.py,sha256=1zt5xC95HFr89G9lsi3gCJMSvC4Bt0vVeeUEf3NjpOQ,4281
70
70
  bluer_objects/file/save.py,sha256=dl-3qfrh3ZmD42_JFmaBXWcoXdZ-cipt_LTGrHyaV7I,4997
71
71
  bluer_objects/graphics/__init__.py,sha256=Dd0kQqN7Ldvp1N9oyIirPZ6W3IdUtfPj2u21Bf4W_MI,213
@@ -119,7 +119,8 @@ bluer_objects/testing/functions.py,sha256=AXAfzWLcEPkbSYTehdahshjKJ45C4IJkRs_Tgr
119
119
  bluer_objects/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
120
120
  bluer_objects/tests/test_README.py,sha256=5D4UV8VcjbeAPThsYVynYtVFuP8gwMAhIjEWuOQZsWs,89
121
121
  bluer_objects/tests/test_env.py,sha256=MFm1IYkpAZzaCQCKvP3ADkORww0nmAIV6ZZdR48qMRU,655
122
- bluer_objects/tests/test_file_load_save.py,sha256=mNCo3ay55ktc5L6SPpNyrpsJrGfVpYi66EgunlAN-Uw,2406
122
+ bluer_objects/tests/test_file_download.py,sha256=1_adHYqgSifkdP-I7TQVW0t8MLCujQ61fvRbcrSkcmg,512
123
+ bluer_objects/tests/test_file_load_save.py,sha256=5uUBjyiBglzNn9sAWmjQ8zLnElJ6osJQe2lnQgKk9FQ,2408
123
124
  bluer_objects/tests/test_file_load_save_text.py,sha256=3XnBGlv3KZvheHY-RlX1Su6LOBkkn57pkf9_dXR81r8,1017
124
125
  bluer_objects/tests/test_fullname.py,sha256=xWFf9qqzDQ-4RxRyvyR9GWZyU5qNrKxru94UUKMJfPk,80
125
126
  bluer_objects/tests/test_graphics.py,sha256=mEuk0rWLwr7b2nv4FH6f-RphwfqP23xe2pkjhWe0HgU,238
@@ -129,11 +130,11 @@ bluer_objects/tests/test_graphics_screen.py,sha256=26GMDxImz57oWb8mFrNBtiGnctfjO
129
130
  bluer_objects/tests/test_graphics_signature.py,sha256=CVV257E3A5KBwqEDpRXShN-ful1zFwV9S-z-06oFkxM,1588
130
131
  bluer_objects/tests/test_graphics_text.py,sha256=_jLZVuAcQQYlKpATeQCBpPMa8UhKQ__bFYR1bedO5EE,314
131
132
  bluer_objects/tests/test_logger.py,sha256=DdkZqj8YOErKf6T-SWEPtU21LGfQf_O3GKrCn3H0Ujs,88
132
- bluer_objects/tests/test_logger_matrix.py,sha256=krJPUdlQTLD8P8EjkrlmJVw6Iylwbl8cBfj8yv8egWg,1664
133
+ bluer_objects/tests/test_logger_matrix.py,sha256=qedidEDGusMWQM04kgk3mt74yFm4iU3jIyjE4gRi_FQ,1703
133
134
  bluer_objects/tests/test_markdown.py,sha256=KtCWKIDs4U1M3qAGFMYhzVpdGiDV2VU8z7dCaU3s3Ec,217
134
- bluer_objects/tests/test_metadata.py,sha256=jT39xsP4u3dq6ZWmmVwHlk0D_33Uv_-McNBdy_ba2DM,4264
135
- bluer_objects/tests/test_mlflow.py,sha256=B7CvITThv6YmDB1la9_H2sF2VLt8urpNDQ0YnC1n8HU,1381
136
- bluer_objects/tests/test_objects.py,sha256=4yv8QL2s6pw2nIOMPEaCn1p_HxUfRb84j_L0Kl0gHIs,1439
135
+ bluer_objects/tests/test_metadata.py,sha256=Qy-Zp5yFrHmZ5tjujuLNcvI2YEyzNuAFXgy0L7sJOJ0,4389
136
+ bluer_objects/tests/test_mlflow.py,sha256=Ee6T7r2qT1fvUv2ommC3Wl5Gwz1olURvMvhoaM0779M,1419
137
+ bluer_objects/tests/test_objects.py,sha256=pqdXvnAJ5WPlHvqqaKrd9-vqktrE9GOVxSgqHs8yK8w,1441
137
138
  bluer_objects/tests/test_path.py,sha256=JjONWyhZyMM_u1SzD1RI_iZ5vYJDUe-B51fbbHczIig,85
138
139
  bluer_objects/tests/test_storage.py,sha256=3kFq4lVuvHIpHYob6YprqNdiPaZKgSdMJSsCZ-nvXdI,822
139
140
  bluer_objects/tests/test_storage_base.py,sha256=ieuuuldGWdximvckpiP-y5bUe3tQd-1hatCyxYPTtfg,949
@@ -141,8 +142,8 @@ bluer_objects/tests/test_storage_webdav_request.py,sha256=hJVwUBcu4fo1rsRRjk0U4c
141
142
  bluer_objects/tests/test_storage_webdav_zip.py,sha256=aFwqREkbEIvJRvkC0Wyfirl_f4tRhtSD3lpNSmQ_BeI,953
142
143
  bluer_objects/tests/test_testing.py,sha256=d2NH435yqJBl9wmfMqGGd-f0Y0jsL2QhHUXkty9AwPA,235
143
144
  bluer_objects/tests/test_version.py,sha256=Lyf3PMcA22e17BNRk_2VgPrtao6dWEgVoXo68Uds8SE,75
144
- bluer_objects-6.129.1.dist-info/licenses/LICENSE,sha256=ogEPNDSH0_dhiv_lT3ifVIdgIzHAqNA_SemnxUfPBJk,7048
145
- bluer_objects-6.129.1.dist-info/METADATA,sha256=QN0wQsDNrg-DSQIKJnt4hN4vrLfLJnPZ2Azxg2-xGZ8,3554
146
- bluer_objects-6.129.1.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
147
- bluer_objects-6.129.1.dist-info/top_level.txt,sha256=RX2TpddbnRkurda3G_pAdyeTztP2IhhRPx949GlEvQo,14
148
- bluer_objects-6.129.1.dist-info/RECORD,,
145
+ bluer_objects-6.133.1.dist-info/licenses/LICENSE,sha256=ogEPNDSH0_dhiv_lT3ifVIdgIzHAqNA_SemnxUfPBJk,7048
146
+ bluer_objects-6.133.1.dist-info/METADATA,sha256=589H6252yUINWWFRERwjv_N_cDUvOxFU-WDC1qUMDpA,3554
147
+ bluer_objects-6.133.1.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
148
+ bluer_objects-6.133.1.dist-info/top_level.txt,sha256=RX2TpddbnRkurda3G_pAdyeTztP2IhhRPx949GlEvQo,14
149
+ bluer_objects-6.133.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.7.1)
2
+ Generator: setuptools (80.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5