bluer-objects 6.27.1__py3-none-any.whl → 6.28.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} data objects for Bash."
6
6
 
7
- VERSION = "6.27.1"
7
+ VERSION = "6.28.1"
8
8
 
9
9
  REPO_NAME = "bluer-objects"
10
10
 
@@ -0,0 +1,49 @@
1
+ from bluer_options import string
2
+
3
+ from bluer_objects import file, objects
4
+ from bluer_objects import storage
5
+
6
+
7
+ def test_storage():
8
+ object_name = objects.unique_object("test_storage")
9
+
10
+ depth = 10
11
+
12
+ for filename in [
13
+ "this.yaml",
14
+ "that.yaml",
15
+ "subfolder/this.yaml",
16
+ "subfolder/that.yaml",
17
+ ]:
18
+ assert file.save_yaml(
19
+ objects.path_of(
20
+ object_name=object_name,
21
+ filename=filename,
22
+ ),
23
+ {
24
+ string.random(length=depth): string.random(length=depth)
25
+ for _ in range(depth)
26
+ },
27
+ )
28
+
29
+ for filename in [
30
+ "this.yaml",
31
+ "subfolder/this.yaml",
32
+ ]:
33
+ assert storage.upload(
34
+ object_name=object_name,
35
+ filename=filename,
36
+ )
37
+
38
+ assert objects.upload(object_name=object_name)
39
+
40
+ for filename in [
41
+ "this.yaml",
42
+ "subfolder/this.yaml",
43
+ ]:
44
+ assert storage.download(
45
+ object_name=object_name,
46
+ filename=filename,
47
+ )
48
+
49
+ assert objects.download(object_name=object_name)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bluer_objects
3
- Version: 6.27.1
3
+ Version: 6.28.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.26.1`](https://github.com/kamangir/awesome-bash-cli), based on 🌀 [`bluer_objects-6.27.1`](https://github.com/kamangir/bluer-objects).
56
+ built by 🌀 [`bluer_options-5.26.1`](https://github.com/kamangir/awesome-bash-cli), based on 🌀 [`bluer_objects-6.28.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=N2SlJDQfbpZ_fsG1igtoHltqGxOIv2Vd4b245QVxOKs,310
1
+ bluer_objects/__init__.py,sha256=uxaYf4faUBZpZ32PFrCGVbQ2s8iQszcLi1sOn8SzlSE,310
2
2
  bluer_objects/__main__.py,sha256=Yqfov833_hJuRne19WrGhT5DWAPtdffpoMxeSXS7EGw,359
3
3
  bluer_objects/config.env,sha256=eGjonR_ifC-IdiRnsmV3cyVTEnJqWTMmSuniXw9bncE,193
4
4
  bluer_objects/env.py,sha256=6YennmzyRI52ldg6-J5XqMm_cPEVQKsON7Fj7n6eHPU,1430
@@ -107,7 +107,6 @@ 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_download.py,sha256=-Vey9IfGI-YZYNM0phOlY7N178cSOyRqA_wfTXz0Qac,1182
111
110
  bluer_objects/tests/test_env.py,sha256=PpeO40lad0uhZeeFqgaUniAY5IvRiEm9KMnv645vLkM,684
112
111
  bluer_objects/tests/test_file_load_save.py,sha256=LrakotJz-GPNoF8HCT-CRLWDif6lsKmnaLzOzlSwFp0,2312
113
112
  bluer_objects/tests/test_fullname.py,sha256=xWFf9qqzDQ-4RxRyvyR9GWZyU5qNrKxru94UUKMJfPk,80
@@ -124,10 +123,10 @@ bluer_objects/tests/test_metadata.py,sha256=jT39xsP4u3dq6ZWmmVwHlk0D_33Uv_-McNBd
124
123
  bluer_objects/tests/test_mlflow.py,sha256=B7CvITThv6YmDB1la9_H2sF2VLt8urpNDQ0YnC1n8HU,1381
125
124
  bluer_objects/tests/test_objects.py,sha256=r8GxsJFSzRw7uen7LBdqIO6KIqfNpo45ziIIWYrjIQs,1482
126
125
  bluer_objects/tests/test_path.py,sha256=JjONWyhZyMM_u1SzD1RI_iZ5vYJDUe-B51fbbHczIig,85
127
- bluer_objects/tests/test_upload.py,sha256=kK6WPMUPfQhlY8krO_JpvLS14K_FeliJwmDMoiRPKxE,1835
126
+ bluer_objects/tests/test_storage.py,sha256=pRXIStIDwo-7L-Z-cg1iEvv0tDh7cuW1-I2vY6Cm6lg,1127
128
127
  bluer_objects/tests/test_version.py,sha256=Lyf3PMcA22e17BNRk_2VgPrtao6dWEgVoXo68Uds8SE,75
129
- bluer_objects-6.27.1.dist-info/licenses/LICENSE,sha256=ogEPNDSH0_dhiv_lT3ifVIdgIzHAqNA_SemnxUfPBJk,7048
130
- bluer_objects-6.27.1.dist-info/METADATA,sha256=MfsCJM792NRIDKAtqYFZpFr5g3Xiqt7apSKvMG3jag8,2748
131
- bluer_objects-6.27.1.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
132
- bluer_objects-6.27.1.dist-info/top_level.txt,sha256=RX2TpddbnRkurda3G_pAdyeTztP2IhhRPx949GlEvQo,14
133
- bluer_objects-6.27.1.dist-info/RECORD,,
128
+ bluer_objects-6.28.1.dist-info/licenses/LICENSE,sha256=ogEPNDSH0_dhiv_lT3ifVIdgIzHAqNA_SemnxUfPBJk,7048
129
+ bluer_objects-6.28.1.dist-info/METADATA,sha256=OLNmSX18EMe-3Wn3D4StdYqntraxv7dsxt_v3ffzsAk,2748
130
+ bluer_objects-6.28.1.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
131
+ bluer_objects-6.28.1.dist-info/top_level.txt,sha256=RX2TpddbnRkurda3G_pAdyeTztP2IhhRPx949GlEvQo,14
132
+ bluer_objects-6.28.1.dist-info/RECORD,,
@@ -1,52 +0,0 @@
1
- import pytest
2
-
3
-
4
- from bluer_objects import file, objects
5
- from bluer_objects import storage
6
-
7
-
8
- @pytest.mark.parametrize(
9
- ["object_name", "filename"],
10
- [[VANWATCH_TEST_OBJECT, "vancouver.geojson"]],
11
- )
12
- def test_objects_download(
13
- object_name: str,
14
- filename: str,
15
- ):
16
- filename_fullpath = objects.path_of(
17
- filename=filename,
18
- object_name=object_name,
19
- )
20
- if file.exists(filename_fullpath):
21
- assert file.delete(filename_fullpath)
22
-
23
- assert not file.exists(filename_fullpath)
24
-
25
- assert objects.storage(object_name=object_name)
26
-
27
- assert file.exists(filename_fullpath)
28
-
29
-
30
- @pytest.mark.parametrize(
31
- ["object_name", "filename"],
32
- [[VANWATCH_TEST_OBJECT, "vancouver.geojson"]],
33
- )
34
- def test_objects_download_filename(
35
- object_name: str,
36
- filename: str,
37
- ):
38
- filename_fullpath = objects.path_of(
39
- filename=filename,
40
- object_name=object_name,
41
- )
42
- if file.exists(filename_fullpath):
43
- assert file.delete(filename_fullpath)
44
-
45
- assert not file.exists(filename_fullpath)
46
-
47
- assert storage.download(
48
- object_name=object_name,
49
- filename=filename,
50
- )
51
-
52
- assert file.exists(filename_fullpath)
@@ -1,76 +0,0 @@
1
- import pytest
2
-
3
- from blueness import module
4
-
5
- from bluer_objects import file, objects, NAME
6
- from bluer_objects import storage
7
-
8
- NAME = module.name(__file__, NAME)
9
-
10
-
11
- @pytest.mark.parametrize(
12
- ["filename"],
13
- [["vancouver.geojson"]],
14
- )
15
- def test_objects_upload(
16
- filename: str,
17
- ):
18
- assert storage.download(object_name=VANWATCH_TEST_OBJECT)
19
-
20
- object_name = objects.unique_object("test_objects_upload_filename")
21
-
22
- source_filename = objects.path_of(
23
- filename=filename,
24
- object_name=VANWATCH_TEST_OBJECT,
25
- )
26
- destination_filename = objects.path_of(
27
- filename=filename,
28
- object_name=object_name,
29
- )
30
- assert file.copy(source_filename, destination_filename)
31
-
32
- assert objects.upload(object_name=object_name)
33
-
34
- assert file.delete(destination_filename)
35
- assert not file.exists(destination_filename)
36
-
37
- assert storage.download(object_name=object_name)
38
-
39
- assert file.exists(destination_filename)
40
-
41
-
42
- @pytest.mark.parametrize(
43
- ["filename"],
44
- [["vancouver.geojson"]],
45
- )
46
- def test_objects_upload_filename(
47
- filename: str,
48
- ):
49
- assert storage.download(object_name=VANWATCH_TEST_OBJECT)
50
-
51
- object_name = objects.unique_object("test_objects_upload_filename")
52
-
53
- source_filename = objects.path_of(
54
- filename=filename,
55
- object_name=VANWATCH_TEST_OBJECT,
56
- )
57
- destination_filename = objects.path_of(
58
- filename=filename,
59
- object_name=object_name,
60
- )
61
- assert file.copy(source_filename, destination_filename)
62
-
63
- assert objects.upload(
64
- object_name=object_name,
65
- filename=filename,
66
- )
67
-
68
- assert file.delete(destination_filename)
69
- assert not file.exists(destination_filename)
70
-
71
- assert storage.download(
72
- object_name=object_name,
73
- filename=filename,
74
- )
75
-
76
- assert file.exists(destination_filename)