bluer-objects 6.29.1__tar.gz → 6.30.1__tar.gz
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-6.29.1/bluer_objects.egg-info → bluer_objects-6.30.1}/PKG-INFO +2 -2
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/README.md +1 -1
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/tests/gif.sh +1 -1
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/__init__.py +1 -1
- bluer_objects-6.30.1/bluer_objects/config.env +5 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/env.py +0 -4
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/metadata/post.py +1 -1
- bluer_objects-6.30.1/bluer_objects/objects.py +87 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/storage/WebDAVzip.py +8 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/tests/test_env.py +0 -4
- bluer_objects-6.30.1/bluer_objects/tests/test_graphics.py +13 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/tests/test_graphics_gif.py +7 -10
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/tests/test_storage.py +2 -2
- {bluer_objects-6.29.1 → bluer_objects-6.30.1/bluer_objects.egg-info}/PKG-INFO +2 -2
- bluer_objects-6.29.1/bluer_objects/config.env +0 -9
- bluer_objects-6.29.1/bluer_objects/objects.py +0 -163
- bluer_objects-6.29.1/bluer_objects/tests/test_graphics.py +0 -29
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/LICENSE +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/MANIFEST.in +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/abcli.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/actions.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/aka.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/alias.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/bluer_objects.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/cache.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/clone.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/download.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/file.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/gif.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/host.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/ls.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/metadata/get.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/metadata/post.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/metadata.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/mlflow/browse.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/mlflow/cache.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/mlflow/list_registered_models.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/mlflow/log_artifacts.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/mlflow/log_run.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/mlflow/run.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/mlflow/tags/clone.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/mlflow/tags/get.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/mlflow/tags/search.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/mlflow/tags/set.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/mlflow/tags.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/mlflow/test.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/mlflow/transition.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/mlflow.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/object.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/publish.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/select.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/storage/clear.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/storage/download_file.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/storage/exists.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/storage/list.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/storage/rm.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/storage/status.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/storage.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/tests/README.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/tests/clone.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/tests/help.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/tests/host.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/tests/ls.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/tests/metadata.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/tests/mlflow_cache.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/tests/mlflow_logging.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/tests/mlflow_tags.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/tests/mlflow_test.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/tests/storage.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/tests/version.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/upload.sh +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/README/__init__.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/README/functions.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/README/items.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/__main__.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/file/__init__.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/file/__main__.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/file/classes.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/file/functions.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/file/load.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/file/save.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/graphics/__init__.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/graphics/__main__.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/graphics/frame.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/graphics/gif.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/graphics/screen.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/graphics/signature.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/graphics/text.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/help/__init__.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/help/__main__.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/help/download.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/help/functions.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/help/upload.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/host/__init__.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/host/__main__.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/host/functions.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/logger/__init__.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/logger/matrix.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/markdown.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/metadata/__init__.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/metadata/__main__.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/metadata/enums.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/metadata/get.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/mlflow/__init__.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/mlflow/__main__.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/mlflow/cache.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/mlflow/logging.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/mlflow/models.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/mlflow/objects.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/mlflow/runs.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/mlflow/tags.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/mlflow/testing.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/path.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/sample.env +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/storage/WebDAV.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/storage/__init__.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/storage/__main__.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/storage/base.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/tests/__init__.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/tests/test_README.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/tests/test_file_load_save.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/tests/test_fullname.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/tests/test_graphics_frame.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/tests/test_graphics_screen.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/tests/test_graphics_signature.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/tests/test_graphics_text.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/tests/test_logger.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/tests/test_logger_matrix.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/tests/test_markdown.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/tests/test_metadata.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/tests/test_mlflow.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/tests/test_objects.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/tests/test_path.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/tests/test_version.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/urls.py +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects.egg-info/SOURCES.txt +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects.egg-info/dependency_links.txt +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects.egg-info/requires.txt +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects.egg-info/top_level.txt +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/pyproject.toml +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/requirements.txt +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/setup.cfg +0 -0
- {bluer_objects-6.29.1 → bluer_objects-6.30.1}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bluer_objects
|
|
3
|
-
Version: 6.
|
|
3
|
+
Version: 6.30.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.28.1`](https://github.com/kamangir/awesome-bash-cli), based on 🌀 [`bluer_objects-6.
|
|
56
|
+
built by 🌀 [`bluer_options-5.28.1`](https://github.com/kamangir/awesome-bash-cli), based on 🌀 [`bluer_objects-6.30.1`](https://github.com/kamangir/bluer-objects).
|
|
57
57
|
|
|
58
58
|
built by 🌀 [`blueness-3.96.1`](https://github.com/kamangir/blueness).
|
|
@@ -19,4 +19,4 @@ Also home to [blue README](./bluer_objects/README/).
|
|
|
19
19
|
|
|
20
20
|
[](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)
|
|
21
21
|
|
|
22
|
-
built by 🌀 [`bluer_options-5.28.1`](https://github.com/kamangir/awesome-bash-cli), based on 🌀 [`bluer_objects-6.
|
|
22
|
+
built by 🌀 [`bluer_options-5.28.1`](https://github.com/kamangir/awesome-bash-cli), based on 🌀 [`bluer_objects-6.30.1`](https://github.com/kamangir/bluer-objects).
|
|
@@ -30,13 +30,9 @@ abcli_path_git = get_env(
|
|
|
30
30
|
|
|
31
31
|
ABCLI_PATH_STATIC = get_env("ABCLI_PATH_STATIC")
|
|
32
32
|
|
|
33
|
-
VANWATCH_TEST_OBJECT = get_env("VANWATCH_TEST_OBJECT")
|
|
34
|
-
|
|
35
33
|
# https://www.randomtextgenerator.com/
|
|
36
34
|
DUMMY_TEXT = "This is some dummy text. This is some dummy text. This is some dummy text. This is some dummy text. This is some dummy text. This is some dummy text. This is some dummy text. This is some dummy text. This is some dummy text. This is some dummy text."
|
|
37
35
|
|
|
38
|
-
DATABRICKS_WORKSPACE = get_env("DATABRICKS_WORKSPACE")
|
|
39
|
-
|
|
40
36
|
ABCLI_MLFLOW_EXPERIMENT_PREFIX = get_env("ABCLI_MLFLOW_EXPERIMENT_PREFIX")
|
|
41
37
|
|
|
42
38
|
ABCLI_S3_OBJECT_PREFIX = "to-be-removed"
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import os
|
|
2
|
+
|
|
3
|
+
from bluer_options import string
|
|
4
|
+
|
|
5
|
+
from bluer_objects import file, path
|
|
6
|
+
from bluer_objects.env import (
|
|
7
|
+
ABCLI_OBJECT_ROOT,
|
|
8
|
+
abcli_object_name,
|
|
9
|
+
ABCLI_S3_OBJECT_PREFIX,
|
|
10
|
+
)
|
|
11
|
+
from bluer_objects.host import shell
|
|
12
|
+
from bluer_objects.logger import logger
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def list_of_files(
|
|
16
|
+
object_name: str,
|
|
17
|
+
cloud: bool = False,
|
|
18
|
+
**kwargs,
|
|
19
|
+
):
|
|
20
|
+
if cloud:
|
|
21
|
+
# TODO
|
|
22
|
+
return []
|
|
23
|
+
|
|
24
|
+
return file.list_of(
|
|
25
|
+
os.path.join(
|
|
26
|
+
ABCLI_OBJECT_ROOT,
|
|
27
|
+
object_name,
|
|
28
|
+
"*",
|
|
29
|
+
),
|
|
30
|
+
**kwargs,
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def object_path(
|
|
35
|
+
object_name=".",
|
|
36
|
+
create=False,
|
|
37
|
+
):
|
|
38
|
+
output = os.path.join(
|
|
39
|
+
ABCLI_OBJECT_ROOT,
|
|
40
|
+
abcli_object_name if object_name == "." else object_name,
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
if create:
|
|
44
|
+
os.makedirs(output, exist_ok=True)
|
|
45
|
+
|
|
46
|
+
return output
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def path_of(
|
|
50
|
+
filename,
|
|
51
|
+
object_name=".",
|
|
52
|
+
create=False,
|
|
53
|
+
):
|
|
54
|
+
return os.path.join(
|
|
55
|
+
object_path(object_name, create),
|
|
56
|
+
filename,
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def signature(info=None, object_name="."):
|
|
61
|
+
return [
|
|
62
|
+
"{}{}".format(
|
|
63
|
+
abcli_object_name if object_name == "." else object_name,
|
|
64
|
+
"" if info is None else f"/{str(info)}",
|
|
65
|
+
),
|
|
66
|
+
string.pretty_date(include_time=False),
|
|
67
|
+
string.pretty_date(include_date=False, include_zone=True),
|
|
68
|
+
]
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def unique_object(
|
|
72
|
+
prefix: str = "",
|
|
73
|
+
include_time: bool = True,
|
|
74
|
+
):
|
|
75
|
+
object_name = string.pretty_date(
|
|
76
|
+
as_filename=True,
|
|
77
|
+
include_time=include_time,
|
|
78
|
+
unique=True,
|
|
79
|
+
)
|
|
80
|
+
if prefix:
|
|
81
|
+
object_name = f"{prefix}-{object_name}"
|
|
82
|
+
|
|
83
|
+
path.create(object_path(object_name))
|
|
84
|
+
|
|
85
|
+
logger.info(f"📂 {object_name}")
|
|
86
|
+
|
|
87
|
+
return object_name
|
|
@@ -31,6 +31,14 @@ class WebDAVzipInterface(StorageInterface):
|
|
|
31
31
|
object_path = objects.object_path(object_name=object_name)
|
|
32
32
|
zip_filename = f"{object_path}.zip"
|
|
33
33
|
|
|
34
|
+
try:
|
|
35
|
+
if not self.client.check(remote_path=f"{object_name}.zip"):
|
|
36
|
+
logger.warning(f"{object_name} doesn't exist.")
|
|
37
|
+
return True
|
|
38
|
+
except Exception as e:
|
|
39
|
+
logger.error(e)
|
|
40
|
+
return False
|
|
41
|
+
|
|
34
42
|
try:
|
|
35
43
|
self.client.download_sync(
|
|
36
44
|
remote_path=f"{object_name}.zip",
|
|
@@ -3,28 +3,25 @@ import glob
|
|
|
3
3
|
|
|
4
4
|
from bluer_objects import objects
|
|
5
5
|
from bluer_objects import storage
|
|
6
|
+
from bluer_objects.tests.test_objects import test_object
|
|
6
7
|
from bluer_objects.graphics.gif import generate_animated_gif
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
@pytest.mark.parametrize(
|
|
10
|
-
["
|
|
11
|
+
["scale"],
|
|
11
12
|
[
|
|
12
|
-
[
|
|
13
|
-
[
|
|
13
|
+
[1],
|
|
14
|
+
[2],
|
|
14
15
|
],
|
|
15
16
|
)
|
|
16
17
|
def test_graphics_gif_generate_animated_gif(
|
|
17
|
-
|
|
18
|
+
test_object,
|
|
18
19
|
scale: int,
|
|
19
20
|
):
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
list_of_images = list(glob.glob(objects.path_of("*.png", object_name)))
|
|
23
|
-
if object_name != "void":
|
|
24
|
-
assert list_of_images
|
|
21
|
+
list_of_images = list(glob.glob(objects.path_of("*.png", test_object)))
|
|
25
22
|
|
|
26
23
|
assert generate_animated_gif(
|
|
27
24
|
list_of_images,
|
|
28
|
-
objects.path_of("test.gif",
|
|
25
|
+
objects.path_of("test.gif", test_object),
|
|
29
26
|
scale=scale,
|
|
30
27
|
)
|
|
@@ -35,7 +35,7 @@ def test_storage():
|
|
|
35
35
|
filename=filename,
|
|
36
36
|
)
|
|
37
37
|
|
|
38
|
-
assert
|
|
38
|
+
assert storage.upload(object_name=object_name)
|
|
39
39
|
|
|
40
40
|
for filename in [
|
|
41
41
|
"this.yaml",
|
|
@@ -46,4 +46,4 @@ def test_storage():
|
|
|
46
46
|
filename=filename,
|
|
47
47
|
)
|
|
48
48
|
|
|
49
|
-
assert
|
|
49
|
+
assert storage.download(object_name=object_name)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bluer_objects
|
|
3
|
-
Version: 6.
|
|
3
|
+
Version: 6.30.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.28.1`](https://github.com/kamangir/awesome-bash-cli), based on 🌀 [`bluer_objects-6.
|
|
56
|
+
built by 🌀 [`bluer_options-5.28.1`](https://github.com/kamangir/awesome-bash-cli), based on 🌀 [`bluer_objects-6.30.1`](https://github.com/kamangir/bluer-objects).
|
|
57
57
|
|
|
58
58
|
built by 🌀 [`blueness-3.96.1`](https://github.com/kamangir/blueness).
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
|
|
3
|
-
from bluer_options import string
|
|
4
|
-
|
|
5
|
-
from bluer_objects import file, path
|
|
6
|
-
from bluer_objects.env import (
|
|
7
|
-
ABCLI_OBJECT_ROOT,
|
|
8
|
-
abcli_object_name,
|
|
9
|
-
ABCLI_S3_OBJECT_PREFIX,
|
|
10
|
-
)
|
|
11
|
-
from bluer_objects.host import shell
|
|
12
|
-
from bluer_objects.logger import logger
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
def download(
|
|
16
|
-
object_name: str,
|
|
17
|
-
filename: str = "",
|
|
18
|
-
overwrite: bool = False,
|
|
19
|
-
) -> bool:
|
|
20
|
-
if not ABCLI_S3_OBJECT_PREFIX:
|
|
21
|
-
logger.error("ABCLI_S3_OBJECT_PREFIX is not set.")
|
|
22
|
-
return False
|
|
23
|
-
|
|
24
|
-
if not object_name:
|
|
25
|
-
logger.error("object_name not found.")
|
|
26
|
-
return False
|
|
27
|
-
|
|
28
|
-
if (
|
|
29
|
-
filename
|
|
30
|
-
and not overwrite
|
|
31
|
-
and file.exists(
|
|
32
|
-
path_of(
|
|
33
|
-
object_name=object_name,
|
|
34
|
-
filename=filename,
|
|
35
|
-
)
|
|
36
|
-
)
|
|
37
|
-
):
|
|
38
|
-
return True
|
|
39
|
-
|
|
40
|
-
return (
|
|
41
|
-
shell(
|
|
42
|
-
"aws s3 cp {}/{}/{} {}".format(
|
|
43
|
-
ABCLI_S3_OBJECT_PREFIX,
|
|
44
|
-
object_name,
|
|
45
|
-
filename,
|
|
46
|
-
object_path(object_name, create=True),
|
|
47
|
-
)
|
|
48
|
-
)
|
|
49
|
-
if filename
|
|
50
|
-
else shell(
|
|
51
|
-
"aws s3 sync {}/{}/ {}".format(
|
|
52
|
-
ABCLI_S3_OBJECT_PREFIX,
|
|
53
|
-
object_name,
|
|
54
|
-
object_path(object_name, create=True),
|
|
55
|
-
)
|
|
56
|
-
)
|
|
57
|
-
)
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
def list_of_files(
|
|
61
|
-
object_name: str,
|
|
62
|
-
cloud: bool = False,
|
|
63
|
-
**kwargs,
|
|
64
|
-
):
|
|
65
|
-
if cloud:
|
|
66
|
-
# TODO
|
|
67
|
-
return []
|
|
68
|
-
|
|
69
|
-
return file.list_of(
|
|
70
|
-
os.path.join(
|
|
71
|
-
ABCLI_OBJECT_ROOT,
|
|
72
|
-
object_name,
|
|
73
|
-
"*",
|
|
74
|
-
),
|
|
75
|
-
**kwargs,
|
|
76
|
-
)
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
def object_path(
|
|
80
|
-
object_name=".",
|
|
81
|
-
create=False,
|
|
82
|
-
):
|
|
83
|
-
output = os.path.join(
|
|
84
|
-
ABCLI_OBJECT_ROOT,
|
|
85
|
-
abcli_object_name if object_name == "." else object_name,
|
|
86
|
-
)
|
|
87
|
-
|
|
88
|
-
if create:
|
|
89
|
-
os.makedirs(output, exist_ok=True)
|
|
90
|
-
|
|
91
|
-
return output
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
def path_of(
|
|
95
|
-
filename,
|
|
96
|
-
object_name=".",
|
|
97
|
-
create=False,
|
|
98
|
-
):
|
|
99
|
-
return os.path.join(
|
|
100
|
-
object_path(object_name, create),
|
|
101
|
-
filename,
|
|
102
|
-
)
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
def signature(info=None, object_name="."):
|
|
106
|
-
return [
|
|
107
|
-
"{}{}".format(
|
|
108
|
-
abcli_object_name if object_name == "." else object_name,
|
|
109
|
-
"" if info is None else f"/{str(info)}",
|
|
110
|
-
),
|
|
111
|
-
string.pretty_date(include_time=False),
|
|
112
|
-
string.pretty_date(include_date=False, include_zone=True),
|
|
113
|
-
]
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
def unique_object(
|
|
117
|
-
prefix: str = "",
|
|
118
|
-
include_time: bool = True,
|
|
119
|
-
):
|
|
120
|
-
object_name = string.pretty_date(
|
|
121
|
-
as_filename=True,
|
|
122
|
-
include_time=include_time,
|
|
123
|
-
unique=True,
|
|
124
|
-
)
|
|
125
|
-
if prefix:
|
|
126
|
-
object_name = f"{prefix}-{object_name}"
|
|
127
|
-
|
|
128
|
-
path.create(object_path(object_name))
|
|
129
|
-
|
|
130
|
-
logger.info(f"📂 {object_name}")
|
|
131
|
-
|
|
132
|
-
return object_name
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
def upload(
|
|
136
|
-
object_name: str,
|
|
137
|
-
filename: str = "",
|
|
138
|
-
) -> bool:
|
|
139
|
-
if not ABCLI_S3_OBJECT_PREFIX:
|
|
140
|
-
logger.error("ABCLI_S3_OBJECT_PREFIX is not set.")
|
|
141
|
-
return False
|
|
142
|
-
|
|
143
|
-
if not object_name:
|
|
144
|
-
logger.error("object_name not found.")
|
|
145
|
-
return False
|
|
146
|
-
|
|
147
|
-
return (
|
|
148
|
-
shell(
|
|
149
|
-
"aws s3 cp {} {}/{}/".format(
|
|
150
|
-
path_of(filename=filename, object_name=object_name),
|
|
151
|
-
ABCLI_S3_OBJECT_PREFIX,
|
|
152
|
-
object_name,
|
|
153
|
-
)
|
|
154
|
-
)
|
|
155
|
-
if filename
|
|
156
|
-
else shell(
|
|
157
|
-
"aws s3 sync {} {}/{}/".format(
|
|
158
|
-
object_path(object_name, create=True),
|
|
159
|
-
ABCLI_S3_OBJECT_PREFIX,
|
|
160
|
-
object_name,
|
|
161
|
-
)
|
|
162
|
-
)
|
|
163
|
-
)
|
|
@@ -1,29 +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
|
-
from bluer_objects.env import VANWATCH_TEST_OBJECT
|
|
8
|
-
from bluer_objects.logger import logger
|
|
9
|
-
|
|
10
|
-
NAME = module.name(__file__, NAME)
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
@pytest.fixture
|
|
14
|
-
def test_image():
|
|
15
|
-
object_name = VANWATCH_TEST_OBJECT
|
|
16
|
-
|
|
17
|
-
assert storage.download(object_name)
|
|
18
|
-
|
|
19
|
-
success, matrix = file.load_image(
|
|
20
|
-
objects.path_of(
|
|
21
|
-
"Victoria41East.jpg",
|
|
22
|
-
object_name,
|
|
23
|
-
)
|
|
24
|
-
)
|
|
25
|
-
assert success
|
|
26
|
-
|
|
27
|
-
yield matrix
|
|
28
|
-
|
|
29
|
-
logger.info(f"deleting {NAME}.test_object ...")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/.abcli/mlflow/list_registered_models.sh
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bluer_objects-6.29.1 → bluer_objects-6.30.1}/bluer_objects/tests/test_graphics_signature.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|