plexus-python-common 1.0.21__tar.gz → 1.0.22__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.
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/PKG-INFO +1 -1
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus/common/utils/s3utils.py +10 -8
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus_python_common.egg-info/PKG-INFO +1 -1
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/.editorconfig +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/.github/workflows/pr.yml +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/.github/workflows/push.yml +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/.gitignore +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/MANIFEST.in +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/README.md +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/VERSION +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/pyproject.toml +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/jsonutils/dummy.0.jsonl +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/jsonutils/dummy.1.jsonl +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/jsonutils/dummy.2.jsonl +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/s3utils/dir.baz/file.bar.baz +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/s3utils/dir.baz/file.foo.bar +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/s3utils/dir.baz/file.foo.baz +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/s3utils/dir.foo/dir.foo.bar/dir.foo.bar.baz/file.foo.bar.baz +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/s3utils/dir.foo/dir.foo.bar/file.bar.baz +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/s3utils/dir.foo/dir.foo.bar/file.foo.bar +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/s3utils/dir.foo/dir.foo.bar/file.foo.baz +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/s3utils/dir.foo/file.bar +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/s3utils/dir.foo/file.baz +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/s3utils/dir.foo/file.foo +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/shutils/0-dummy +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/shutils/1-dummy +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/shutils/2-dummy +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/shutils/dummy.0.0.jsonl +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/shutils/dummy.0.0.vol-0.jsonl +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/shutils/dummy.0.jsonl +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/shutils/dummy.1.1.jsonl +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/shutils/dummy.1.1.vol-1.jsonl +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/shutils/dummy.1.jsonl +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/shutils/dummy.2.2.jsonl +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/shutils/dummy.2.2.vol-2.jsonl +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/shutils/dummy.2.jsonl +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/shutils/dummy.csv.part0 +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/shutils/dummy.csv.part1 +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/shutils/dummy.csv.part2 +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/shutils/dummy.txt +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/setup.cfg +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/setup.py +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus/common/__init__.py +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus/common/carto/OSMFile.py +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus/common/carto/OSMNode.py +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus/common/carto/OSMTags.py +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus/common/carto/OSMWay.py +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus/common/carto/__init__.py +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus/common/config.py +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus/common/pose.py +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus/common/proj.py +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus/common/utils/__init__.py +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus/common/utils/bagutils.py +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus/common/utils/datautils.py +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus/common/utils/jsonutils.py +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus/common/utils/ormutils.py +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus/common/utils/shutils.py +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus/common/utils/strutils.py +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus_python_common.egg-info/SOURCES.txt +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus_python_common.egg-info/dependency_links.txt +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus_python_common.egg-info/not-zip-safe +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus_python_common.egg-info/requires.txt +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus_python_common.egg-info/top_level.txt +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/test/plexus_test.py +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/test/plexus_tests/__init__.py +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/test/plexus_tests/common/carto/osm_file_test.py +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/test/plexus_tests/common/carto/osm_tags_test.py +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/test/plexus_tests/common/pose_test.py +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/test/plexus_tests/common/proj_test.py +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/test/plexus_tests/common/utils/bagutils_test.py +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/test/plexus_tests/common/utils/datautils_test.py +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/test/plexus_tests/common/utils/jsonutils_test.py +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/test/plexus_tests/common/utils/ormutils_test.py +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/test/plexus_tests/common/utils/s3utils_test.py +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/test/plexus_tests/common/utils/shutils_test.py +0 -0
- {plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/test/plexus_tests/common/utils/strutils_test.py +0 -0
{plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus/common/utils/s3utils.py
RENAMED
|
@@ -9,10 +9,10 @@ import os.path
|
|
|
9
9
|
import tempfile
|
|
10
10
|
from collections.abc import Callable, Generator
|
|
11
11
|
from pathlib import Path
|
|
12
|
-
from typing import
|
|
12
|
+
from typing import Literal
|
|
13
13
|
|
|
14
14
|
import boto3
|
|
15
|
-
from cloudpathlib import
|
|
15
|
+
from cloudpathlib import CloudPath, S3Client, S3Path
|
|
16
16
|
from iker.common.utils.shutils import glob_match, listfile, path_depth
|
|
17
17
|
from iker.common.utils.strutils import is_empty, trim_to_none
|
|
18
18
|
from rich.progress import BarColumn, DownloadColumn, Progress, TaskID, TextColumn, TransferSpeedColumn
|
|
@@ -63,7 +63,7 @@ def s3_make_client(
|
|
|
63
63
|
yield S3Client(boto3_session=session, endpoint_url=trim_to_none(endpoint_url))
|
|
64
64
|
|
|
65
65
|
|
|
66
|
-
def s3_list_objects(client: S3Client, bucket: str, prefix: str, limit: int = None) ->
|
|
66
|
+
def s3_list_objects(client: S3Client, bucket: str, prefix: str, limit: int = None) -> Generator[S3ObjectMeta]:
|
|
67
67
|
"""
|
|
68
68
|
Lists all objects from the given S3 ``bucket`` and ``prefix``.
|
|
69
69
|
|
|
@@ -105,7 +105,7 @@ def s3_listfile(
|
|
|
105
105
|
include_patterns: list[str] | None = None,
|
|
106
106
|
exclude_patterns: list[str] | None = None,
|
|
107
107
|
depth: int = 0,
|
|
108
|
-
) ->
|
|
108
|
+
) -> Generator[S3ObjectMeta]:
|
|
109
109
|
"""
|
|
110
110
|
Lists all objects from the given S3 ``bucket`` and ``prefix``, filtered by patterns and directory depth.
|
|
111
111
|
|
|
@@ -323,7 +323,7 @@ class S3TransferCallbackClient(S3Client):
|
|
|
323
323
|
def __init__(
|
|
324
324
|
self,
|
|
325
325
|
*args,
|
|
326
|
-
transfer_callback: Callable[[CloudPath, TransferDirection, TransferState, int], None],
|
|
326
|
+
transfer_callback: Callable[[Path | CloudPath, TransferDirection, TransferState, int], None],
|
|
327
327
|
**kwargs,
|
|
328
328
|
):
|
|
329
329
|
super().__init__(*args, **kwargs)
|
|
@@ -367,10 +367,12 @@ class S3TransferCallbackClient(S3Client):
|
|
|
367
367
|
return cloud_path
|
|
368
368
|
|
|
369
369
|
|
|
370
|
-
def s3_make_progress_callback(
|
|
371
|
-
|
|
370
|
+
def s3_make_progress_callback(
|
|
371
|
+
progress: Progress,
|
|
372
|
+
) -> Callable[[Path | CloudPath, TransferDirection, TransferState, int], None]:
|
|
373
|
+
task_ids: dict[Path | CloudPath, TaskID] = {}
|
|
372
374
|
|
|
373
|
-
def progress_callback(path:
|
|
375
|
+
def progress_callback(path: Path | CloudPath, direction: TransferDirection, state: TransferState, bytes_sent: int):
|
|
374
376
|
if state == "start":
|
|
375
377
|
size = path.stat().st_size
|
|
376
378
|
task_ids[path] = progress.add_task(direction, total=size, filename=path.name)
|
|
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
|
{plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/shutils/0-dummy
RENAMED
|
File without changes
|
{plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/shutils/1-dummy
RENAMED
|
File without changes
|
{plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/shutils/2-dummy
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/shutils/dummy.0.jsonl
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/shutils/dummy.1.jsonl
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/shutils/dummy.2.jsonl
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/resources/unittest/shutils/dummy.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus/common/carto/OSMFile.py
RENAMED
|
File without changes
|
{plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus/common/carto/OSMNode.py
RENAMED
|
File without changes
|
{plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus/common/carto/OSMTags.py
RENAMED
|
File without changes
|
{plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus/common/carto/OSMWay.py
RENAMED
|
File without changes
|
{plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus/common/carto/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus/common/utils/__init__.py
RENAMED
|
File without changes
|
{plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus/common/utils/bagutils.py
RENAMED
|
File without changes
|
{plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus/common/utils/datautils.py
RENAMED
|
File without changes
|
{plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus/common/utils/jsonutils.py
RENAMED
|
File without changes
|
{plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus/common/utils/ormutils.py
RENAMED
|
File without changes
|
{plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus/common/utils/shutils.py
RENAMED
|
File without changes
|
{plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/src/plexus/common/utils/strutils.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
|
{plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/test/plexus_tests/common/pose_test.py
RENAMED
|
File without changes
|
{plexus_python_common-1.0.21 → plexus_python_common-1.0.22}/test/plexus_tests/common/proj_test.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
|