bluer-objects 6.104.1__tar.gz → 6.107.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.104.1/bluer_objects.egg-info → bluer_objects-6.107.1}/PKG-INFO +2 -2
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/README.md +1 -1
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/__init__.py +1 -1
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/file/load.py +2 -9
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/file/save.py +1 -19
- bluer_objects-6.107.1/bluer_objects/tests/test_file_load_save_text.py +46 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1/bluer_objects.egg-info}/PKG-INFO +2 -2
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects.egg-info/SOURCES.txt +1 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/LICENSE +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/MANIFEST.in +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/abcli.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/actions.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/aka.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/alias.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/bluer_objects.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/clone.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/download.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/file.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/gif.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/host.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/ls.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/metadata/get.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/metadata/post.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/metadata.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/mlflow/browse.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/mlflow/cache.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/mlflow/deploy.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/mlflow/list_registered_models.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/mlflow/log_artifacts.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/mlflow/log_run.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/mlflow/run.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/mlflow/tags/clone.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/mlflow/tags/get.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/mlflow/tags/search.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/mlflow/tags/set.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/mlflow/tags.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/mlflow/test.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/mlflow/transition.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/mlflow.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/object.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/select.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/storage/clear.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/storage/download_file.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/storage/exists.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/storage/list.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/storage/rm.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/storage/status.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/storage.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/tests/README.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/tests/clone.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/tests/gif.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/tests/help.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/tests/host.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/tests/ls.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/tests/metadata.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/tests/mlflow_cache.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/tests/mlflow_logging.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/tests/mlflow_tags.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/tests/mlflow_test.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/tests/storage.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/tests/version.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/upload.sh +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/README/__init__.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/README/functions.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/README/items.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/__main__.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/config.env +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/env.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/file/__init__.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/file/__main__.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/file/classes.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/file/functions.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/graphics/__init__.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/graphics/__main__.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/graphics/frame.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/graphics/gif.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/graphics/screen.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/graphics/signature.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/graphics/text.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/help/__init__.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/help/__main__.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/help/clone.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/help/download.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/help/functions.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/help/gif.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/help/host.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/help/ls.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/help/metadata.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/help/mlflow/__init__.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/help/mlflow/cache.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/help/mlflow/tags.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/help/upload.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/host/__init__.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/host/__main__.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/host/functions.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/logger/__init__.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/logger/matrix.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/markdown.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/metadata/__init__.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/metadata/__main__.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/metadata/enums.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/metadata/get.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/metadata/post.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/mlflow/__init__.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/mlflow/__main__.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/mlflow/cache.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/mlflow/logging.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/mlflow/models.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/mlflow/objects.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/mlflow/runs.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/mlflow/tags.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/mlflow/testing.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/objects.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/path.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/sample.env +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/storage/WebDAV.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/storage/WebDAVzip.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/storage/__init__.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/storage/__main__.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/storage/base.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/testing/__init__.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/testing/__main__.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/testing/functions.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/tests/__init__.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/tests/test_README.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/tests/test_env.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/tests/test_file_load_save.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/tests/test_fullname.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/tests/test_graphics.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/tests/test_graphics_frame.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/tests/test_graphics_gif.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/tests/test_graphics_screen.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/tests/test_graphics_signature.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/tests/test_graphics_text.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/tests/test_logger.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/tests/test_logger_matrix.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/tests/test_markdown.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/tests/test_metadata.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/tests/test_mlflow.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/tests/test_objects.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/tests/test_path.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/tests/test_storage.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/tests/test_testing.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/tests/test_version.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/urls.py +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects.egg-info/dependency_links.txt +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects.egg-info/requires.txt +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects.egg-info/top_level.txt +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/pyproject.toml +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/requirements.txt +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.1}/setup.cfg +0 -0
- {bluer_objects-6.104.1 → bluer_objects-6.107.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.107.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
|
[](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)
|
|
65
65
|
|
|
66
|
-
built by 🌀 [`bluer README`](https://github.com/kamangir/bluer-objects/tree/main/bluer_objects/README), based on 🌀 [`bluer_objects-6.
|
|
66
|
+
built by 🌀 [`bluer README`](https://github.com/kamangir/bluer-objects/tree/main/bluer_objects/README), based on 🌀 [`bluer_objects-6.107.1`](https://github.com/kamangir/bluer-objects).
|
|
67
67
|
|
|
68
68
|
built by 🌀 [`blueness-3.118.1`](https://github.com/kamangir/blueness).
|
|
@@ -30,4 +30,4 @@ pip install bluer-objects
|
|
|
30
30
|
|
|
31
31
|
[](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)
|
|
32
32
|
|
|
33
|
-
built by 🌀 [`bluer README`](https://github.com/kamangir/bluer-objects/tree/main/bluer_objects/README), based on 🌀 [`bluer_objects-6.
|
|
33
|
+
built by 🌀 [`bluer README`](https://github.com/kamangir/bluer-objects/tree/main/bluer_objects/README), based on 🌀 [`bluer_objects-6.107.1`](https://github.com/kamangir/bluer-objects).
|
|
@@ -149,21 +149,14 @@ def load_matrix(
|
|
|
149
149
|
def load_text(
|
|
150
150
|
filename,
|
|
151
151
|
ignore_error=False,
|
|
152
|
-
count=-1,
|
|
153
152
|
log=False,
|
|
154
153
|
) -> Tuple[bool, List[str]]:
|
|
155
154
|
success = True
|
|
156
155
|
text = []
|
|
157
156
|
|
|
158
157
|
try:
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
text = fp.read()
|
|
162
|
-
text = text.split("\n")
|
|
163
|
-
else:
|
|
164
|
-
# https://stackoverflow.com/a/1767589/10917551
|
|
165
|
-
with open(filename) as fp:
|
|
166
|
-
text = [next(fp) for _ in range(count)]
|
|
158
|
+
with open(filename, "r") as fp:
|
|
159
|
+
text = fp.read().splitlines()
|
|
167
160
|
except:
|
|
168
161
|
success = False
|
|
169
162
|
if not ignore_error:
|
|
@@ -13,7 +13,6 @@ from bluer_options.host import is_jupyter
|
|
|
13
13
|
from bluer_objects import NAME
|
|
14
14
|
from bluer_objects.file.classes import JsonEncoder
|
|
15
15
|
from bluer_objects.file.functions import path as file_path
|
|
16
|
-
from bluer_objects.file.load import load_text
|
|
17
16
|
from bluer_objects.path import create as path_create
|
|
18
17
|
from bluer_objects.logger import logger
|
|
19
18
|
|
|
@@ -214,32 +213,15 @@ def save_matrix(
|
|
|
214
213
|
def save_text(
|
|
215
214
|
filename: str,
|
|
216
215
|
text: List[str],
|
|
217
|
-
if_different: bool = False,
|
|
218
216
|
log: bool = False,
|
|
219
|
-
remove_empty_lines: bool = False,
|
|
220
217
|
) -> bool:
|
|
221
|
-
if remove_empty_lines:
|
|
222
|
-
text = [
|
|
223
|
-
line
|
|
224
|
-
for line, next_line in zip(text, text[1:] + ["x"])
|
|
225
|
-
if line.strip() or next_line.strip()
|
|
226
|
-
]
|
|
227
|
-
|
|
228
|
-
if if_different:
|
|
229
|
-
_, content = load_text(filename, ignore_error=True)
|
|
230
|
-
|
|
231
|
-
if "|".join([line for line in content if line]) == "|".join(
|
|
232
|
-
[line for line in text if line]
|
|
233
|
-
):
|
|
234
|
-
return True
|
|
235
|
-
|
|
236
218
|
if not prepare_for_saving(filename):
|
|
237
219
|
return False
|
|
238
220
|
|
|
239
221
|
success = True
|
|
240
222
|
try:
|
|
241
223
|
with open(filename, "w") as fp:
|
|
242
|
-
fp.writelines(
|
|
224
|
+
fp.writelines(string + "\n" for string in text)
|
|
243
225
|
except:
|
|
244
226
|
success = False
|
|
245
227
|
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import pytest
|
|
2
|
+
|
|
3
|
+
from bluer_options import string
|
|
4
|
+
|
|
5
|
+
from bluer_objects import file, objects
|
|
6
|
+
from bluer_objects.file.load import load_text
|
|
7
|
+
from bluer_objects.file.save import save_text
|
|
8
|
+
from bluer_objects.tests.test_objects import test_object
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@pytest.mark.parametrize(
|
|
12
|
+
[
|
|
13
|
+
"filename",
|
|
14
|
+
],
|
|
15
|
+
[
|
|
16
|
+
["test.json"],
|
|
17
|
+
["test.yaml"],
|
|
18
|
+
["test.yaml"],
|
|
19
|
+
],
|
|
20
|
+
)
|
|
21
|
+
def test_file_load_save_text(
|
|
22
|
+
test_object,
|
|
23
|
+
filename: str,
|
|
24
|
+
):
|
|
25
|
+
filename_input = objects.path_of(
|
|
26
|
+
object_name=test_object,
|
|
27
|
+
filename=filename,
|
|
28
|
+
)
|
|
29
|
+
success, text_input = load_text(filename_input)
|
|
30
|
+
assert success
|
|
31
|
+
|
|
32
|
+
filename_test = file.add_suffix(
|
|
33
|
+
filename_input,
|
|
34
|
+
string.random(),
|
|
35
|
+
)
|
|
36
|
+
assert save_text(
|
|
37
|
+
filename_test,
|
|
38
|
+
text_input,
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
success, text_output = load_text(filename_test)
|
|
42
|
+
assert success
|
|
43
|
+
|
|
44
|
+
assert len(text_input) == len(text_output)
|
|
45
|
+
for line_input, line_output in zip(text_input, text_output):
|
|
46
|
+
assert line_input == line_output
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bluer_objects
|
|
3
|
-
Version: 6.
|
|
3
|
+
Version: 6.107.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
|
[](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)
|
|
65
65
|
|
|
66
|
-
built by 🌀 [`bluer README`](https://github.com/kamangir/bluer-objects/tree/main/bluer_objects/README), based on 🌀 [`bluer_objects-6.
|
|
66
|
+
built by 🌀 [`bluer README`](https://github.com/kamangir/bluer-objects/tree/main/bluer_objects/README), based on 🌀 [`bluer_objects-6.107.1`](https://github.com/kamangir/bluer-objects).
|
|
67
67
|
|
|
68
68
|
built by 🌀 [`blueness-3.118.1`](https://github.com/kamangir/blueness).
|
|
@@ -130,6 +130,7 @@ bluer_objects/tests/__init__.py
|
|
|
130
130
|
bluer_objects/tests/test_README.py
|
|
131
131
|
bluer_objects/tests/test_env.py
|
|
132
132
|
bluer_objects/tests/test_file_load_save.py
|
|
133
|
+
bluer_objects/tests/test_file_load_save_text.py
|
|
133
134
|
bluer_objects/tests/test_fullname.py
|
|
134
135
|
bluer_objects/tests/test_graphics.py
|
|
135
136
|
bluer_objects/tests/test_graphics_frame.py
|
|
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.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/mlflow/log_artifacts.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
|
{bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/storage/download_file.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
|
{bluer_objects-6.104.1 → bluer_objects-6.107.1}/bluer_objects/.abcli/tests/mlflow_logging.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
|
{bluer_objects-6.104.1 → bluer_objects-6.107.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
|
|
File without changes
|