plexus-python-common 1.0.63__tar.gz → 1.0.64__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.63 → plexus_python_common-1.0.64}/PKG-INFO +1 -1
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/utils/tagutils.py +53 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus_python_common.egg-info/PKG-INFO +1 -1
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/test/plexus_tests/common/utils/tagutils_test.py +175 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/.editorconfig +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/.github/workflows/pr.yml +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/.github/workflows/push.yml +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/.gitignore +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/MANIFEST.in +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/README.md +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/VERSION +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/pyproject.toml +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/jsonutils/dummy.0.jsonl +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/jsonutils/dummy.1.jsonl +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/jsonutils/dummy.2.jsonl +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/pathutils/0-dummy +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/pathutils/1-dummy +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/pathutils/2-dummy +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/pathutils/dummy.0.0.jsonl +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/pathutils/dummy.0.0.vol-0.jsonl +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/pathutils/dummy.0.jsonl +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/pathutils/dummy.1.1.jsonl +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/pathutils/dummy.1.1.vol-1.jsonl +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/pathutils/dummy.1.jsonl +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/pathutils/dummy.2.2.jsonl +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/pathutils/dummy.2.2.vol-2.jsonl +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/pathutils/dummy.2.jsonl +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/pathutils/dummy.csv.part0 +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/pathutils/dummy.csv.part1 +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/pathutils/dummy.csv.part2 +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/pathutils/dummy.txt +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/s3utils/dir.baz/file.bar.baz +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/s3utils/dir.baz/file.foo.bar +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/s3utils/dir.baz/file.foo.baz +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/s3utils/dir.foo/dir.foo.bar/dir.foo.bar.baz/file.foo.bar.baz +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/s3utils/dir.foo/dir.foo.bar/file.bar.baz +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/s3utils/dir.foo/dir.foo.bar/file.foo.bar +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/s3utils/dir.foo/dir.foo.bar/file.foo.baz +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/s3utils/dir.foo/file.bar +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/s3utils/dir.foo/file.baz +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/s3utils/dir.foo/file.foo +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/s3utils_archive/archive.compressed.zip +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/s3utils_archive/archive.uncompressed.zip +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/setup.cfg +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/setup.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/__init__.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/carto/OSMFile.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/carto/OSMNode.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/carto/OSMTags.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/carto/OSMWay.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/carto/__init__.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/resources/__init__.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/resources/tags/__init__.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/resources/tags/unittest-1.0.0.tagset.yaml +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/resources/tags/universal-1.0.0.tagset.yaml +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/utils/__init__.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/utils/apiutils.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/utils/bagutils.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/utils/config.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/utils/datautils.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/utils/dockerutils.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/utils/gisutils.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/utils/jsonutils.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/utils/ormutils.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/utils/pathutils.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/utils/s3utils.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/utils/sqlutils.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/utils/strutils.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/utils/testutils.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus_python_common.egg-info/SOURCES.txt +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus_python_common.egg-info/dependency_links.txt +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus_python_common.egg-info/not-zip-safe +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus_python_common.egg-info/requires.txt +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus_python_common.egg-info/top_level.txt +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/test/plexus_tests/__init__.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/test/plexus_tests/common/__init__.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/test/plexus_tests/common/carto/__init__.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/test/plexus_tests/common/carto/osm_file_test.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/test/plexus_tests/common/carto/osm_tags_test.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/test/plexus_tests/common/utils/__init__.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/test/plexus_tests/common/utils/bagutils_test.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/test/plexus_tests/common/utils/datautils_test.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/test/plexus_tests/common/utils/dockerutils_test.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/test/plexus_tests/common/utils/gisutils_test.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/test/plexus_tests/common/utils/jsonutils_test.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/test/plexus_tests/common/utils/ormutils_test.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/test/plexus_tests/common/utils/pathutils_test.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/test/plexus_tests/common/utils/s3utils_test.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/test/plexus_tests/common/utils/strutils_test.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/test/plexus_tests/common/utils/testutils_test.py +0 -0
- {plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/test/testenv.py +0 -0
{plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/utils/tagutils.py
RENAMED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import contextlib
|
|
2
2
|
import dataclasses
|
|
3
3
|
import datetime
|
|
4
|
+
import math
|
|
4
5
|
import os
|
|
5
6
|
import pathlib
|
|
6
7
|
import textwrap
|
|
@@ -16,6 +17,7 @@ import sqlalchemy as sa
|
|
|
16
17
|
import sqlalchemy.dialects.sqlite as sa_sqlite
|
|
17
18
|
import sqlalchemy.orm as sa_orm
|
|
18
19
|
from iker.common.utils.dbutils import ConnectionMaker
|
|
20
|
+
from iker.common.utils.dtutils import dt_from_ts_us, dt_to_ts_us
|
|
19
21
|
from iker.common.utils.funcutils import memorized, singleton
|
|
20
22
|
from iker.common.utils.iterutils import batched, head_or_none
|
|
21
23
|
from iker.common.utils.iterutils import dicttree
|
|
@@ -48,6 +50,8 @@ __all__ = [
|
|
|
48
50
|
"tag_cache_file_path",
|
|
49
51
|
"TagCache",
|
|
50
52
|
"tag_cache",
|
|
53
|
+
"standard_clip_duration_us",
|
|
54
|
+
"populate_clip_ranges",
|
|
51
55
|
]
|
|
52
56
|
|
|
53
57
|
|
|
@@ -1093,3 +1097,52 @@ def tag_cache(*, identifier: str | None = None, file_path: str | None = None) ->
|
|
|
1093
1097
|
if file_path is not None:
|
|
1094
1098
|
return TagCache(file_path=file_path)
|
|
1095
1099
|
return TagCache(file_path=tag_cache_file_path())
|
|
1100
|
+
|
|
1101
|
+
|
|
1102
|
+
|
|
1103
|
+
@singleton
|
|
1104
|
+
def standard_clip_duration_us() -> int:
|
|
1105
|
+
"""Duration of clips to split samples into, in microseconds, which is fixed to 20 seconds for now."""
|
|
1106
|
+
return 20 * 1_000_000 # 20 seconds
|
|
1107
|
+
|
|
1108
|
+
|
|
1109
|
+
|
|
1110
|
+
def populate_clip_ranges(
|
|
1111
|
+
data_begin_dt: datetime.datetime,
|
|
1112
|
+
data_end_dt: datetime.datetime,
|
|
1113
|
+
*,
|
|
1114
|
+
clip_duration_us: int = None
|
|
1115
|
+
) -> Generator[tuple[datetime.datetime, datetime.datetime, datetime.datetime, datetime.datetime]]:
|
|
1116
|
+
"""
|
|
1117
|
+
Generate clip begin datetime, clip data begin datetime, and clip data end datetime for each clip slot that overlaps
|
|
1118
|
+
with the given data begin and end datetimes.
|
|
1119
|
+
The clip begin datetime is the beginning of the clip slot, the clip data begin datetime is the maximum of the clip
|
|
1120
|
+
begin datetime and the data begin datetime, and the clip data end datetime is the minimum of the clip end datetime
|
|
1121
|
+
and the data end datetime.
|
|
1122
|
+
|
|
1123
|
+
:param data_begin_dt: The beginning datetime of the data.
|
|
1124
|
+
:param data_end_dt: The end datetime of the data.
|
|
1125
|
+
:param clip_duration_us: The duration of each clip in microseconds. If not provided,
|
|
1126
|
+
the standard clip duration will be used.
|
|
1127
|
+
:return: A generator of tuples containing the clip begin datetime, clip data begin datetime,
|
|
1128
|
+
and clip data end datetime
|
|
1129
|
+
"""
|
|
1130
|
+
clip_duration_us = clip_duration_us or standard_clip_duration_us()
|
|
1131
|
+
|
|
1132
|
+
if data_begin_dt == data_end_dt:
|
|
1133
|
+
clip_slot = math.floor(dt_to_ts_us(data_begin_dt) / clip_duration_us)
|
|
1134
|
+
clip_begin_dt = dt_from_ts_us(clip_slot * clip_duration_us)
|
|
1135
|
+
clip_end_dt = dt_from_ts_us((clip_slot + 1) * clip_duration_us)
|
|
1136
|
+
yield clip_begin_dt, clip_end_dt, data_begin_dt, data_end_dt
|
|
1137
|
+
return
|
|
1138
|
+
|
|
1139
|
+
begin_clip_slot = math.floor(dt_to_ts_us(data_begin_dt) / clip_duration_us)
|
|
1140
|
+
end_clip_slot = math.ceil(dt_to_ts_us(data_end_dt) / clip_duration_us)
|
|
1141
|
+
|
|
1142
|
+
for clip_slot in range(begin_clip_slot, end_clip_slot):
|
|
1143
|
+
clip_begin_dt = dt_from_ts_us(clip_slot * clip_duration_us)
|
|
1144
|
+
clip_end_dt = dt_from_ts_us((clip_slot + 1) * clip_duration_us)
|
|
1145
|
+
clip_data_begin_dt = max(clip_begin_dt, data_begin_dt)
|
|
1146
|
+
clip_data_end_dt = min(clip_end_dt, data_end_dt)
|
|
1147
|
+
|
|
1148
|
+
yield clip_begin_dt, clip_end_dt, clip_data_begin_dt, clip_data_end_dt
|
|
@@ -10,6 +10,7 @@ from iker.common.utils.iterutils import last
|
|
|
10
10
|
from iker.common.utils.jsonutils import JsonObject
|
|
11
11
|
|
|
12
12
|
from plexus.common.utils.tagutils import MutableTagset, Tag, TagCache, Tagset
|
|
13
|
+
from plexus.common.utils.tagutils import populate_clip_ranges
|
|
13
14
|
from plexus.common.utils.tagutils import predefined_tagsets, render_tagset_markdown_readme
|
|
14
15
|
from plexus.common.utils.tagutils import tag_cache_file_path
|
|
15
16
|
|
|
@@ -497,3 +498,177 @@ class TagUtilsTest(unittest.TestCase):
|
|
|
497
498
|
tag_records_count * 2 * (tags_count - tagset_tags_count) // tags_count)
|
|
498
499
|
self.assertEqual(len(list(dst_target_cache.iter_tags(tagsets=[tagset], tagset_inverted=False))),
|
|
499
500
|
tag_records_count * 2 * tagset_tags_count // tags_count)
|
|
501
|
+
|
|
502
|
+
data_populate_clip_ranges = [
|
|
503
|
+
(
|
|
504
|
+
dt_parse_iso("2023-01-01T00:00:00.000000+00:00"),
|
|
505
|
+
dt_parse_iso("2023-01-01T00:00:20.000000+00:00"),
|
|
506
|
+
[
|
|
507
|
+
(dt_parse_iso("2023-01-01T00:00:00.000000+00:00"),
|
|
508
|
+
dt_parse_iso("2023-01-01T00:00:20.000000+00:00"),
|
|
509
|
+
dt_parse_iso("2023-01-01T00:00:00.000000+00:00"),
|
|
510
|
+
dt_parse_iso("2023-01-01T00:00:20.000000+00:00")),
|
|
511
|
+
],
|
|
512
|
+
),
|
|
513
|
+
(
|
|
514
|
+
dt_parse_iso("2023-01-01T00:00:10.000000+00:00"),
|
|
515
|
+
dt_parse_iso("2023-01-01T00:00:50.000000+00:00"),
|
|
516
|
+
[
|
|
517
|
+
(dt_parse_iso("2023-01-01T00:00:00.000000+00:00"),
|
|
518
|
+
dt_parse_iso("2023-01-01T00:00:20.000000+00:00"),
|
|
519
|
+
dt_parse_iso("2023-01-01T00:00:10.000000+00:00"),
|
|
520
|
+
dt_parse_iso("2023-01-01T00:00:20.000000+00:00")),
|
|
521
|
+
(dt_parse_iso("2023-01-01T00:00:20.000000+00:00"),
|
|
522
|
+
dt_parse_iso("2023-01-01T00:00:40.000000+00:00"),
|
|
523
|
+
dt_parse_iso("2023-01-01T00:00:20.000000+00:00"),
|
|
524
|
+
dt_parse_iso("2023-01-01T00:00:40.000000+00:00")),
|
|
525
|
+
(dt_parse_iso("2023-01-01T00:00:40.000000+00:00"),
|
|
526
|
+
dt_parse_iso("2023-01-01T00:01:00.000000+00:00"),
|
|
527
|
+
dt_parse_iso("2023-01-01T00:00:40.000000+00:00"),
|
|
528
|
+
dt_parse_iso("2023-01-01T00:00:50.000000+00:00")),
|
|
529
|
+
],
|
|
530
|
+
),
|
|
531
|
+
(
|
|
532
|
+
dt_parse_iso("2023-01-01T00:00:10.000000+00:00"),
|
|
533
|
+
dt_parse_iso("2023-01-01T00:00:15.000000+00:00"),
|
|
534
|
+
[
|
|
535
|
+
(dt_parse_iso("2023-01-01T00:00:00.000000+00:00"),
|
|
536
|
+
dt_parse_iso("2023-01-01T00:00:20.000000+00:00"),
|
|
537
|
+
dt_parse_iso("2023-01-01T00:00:10.000000+00:00"),
|
|
538
|
+
dt_parse_iso("2023-01-01T00:00:15.000000+00:00")),
|
|
539
|
+
],
|
|
540
|
+
),
|
|
541
|
+
(
|
|
542
|
+
dt_parse_iso("2023-01-01T00:00:00.000000+00:00"),
|
|
543
|
+
dt_parse_iso("2023-01-01T00:00:30.000000+00:00"),
|
|
544
|
+
[
|
|
545
|
+
(dt_parse_iso("2023-01-01T00:00:00.000000+00:00"),
|
|
546
|
+
dt_parse_iso("2023-01-01T00:00:20.000000+00:00"),
|
|
547
|
+
dt_parse_iso("2023-01-01T00:00:00.000000+00:00"),
|
|
548
|
+
dt_parse_iso("2023-01-01T00:00:20.000000+00:00")),
|
|
549
|
+
(dt_parse_iso("2023-01-01T00:00:20.000000+00:00"),
|
|
550
|
+
dt_parse_iso("2023-01-01T00:00:40.000000+00:00"),
|
|
551
|
+
dt_parse_iso("2023-01-01T00:00:20.000000+00:00"),
|
|
552
|
+
dt_parse_iso("2023-01-01T00:00:30.000000+00:00")),
|
|
553
|
+
],
|
|
554
|
+
),
|
|
555
|
+
(
|
|
556
|
+
dt_parse_iso("2023-01-01T00:00:00.000000+00:00"),
|
|
557
|
+
dt_parse_iso("2023-01-01T00:00:00.000000+00:00"),
|
|
558
|
+
[
|
|
559
|
+
(dt_parse_iso("2023-01-01T00:00:00.000000+00:00"),
|
|
560
|
+
dt_parse_iso("2023-01-01T00:00:20.000000+00:00"),
|
|
561
|
+
dt_parse_iso("2023-01-01T00:00:00.000000+00:00"),
|
|
562
|
+
dt_parse_iso("2023-01-01T00:00:00.000000+00:00")),
|
|
563
|
+
],
|
|
564
|
+
),
|
|
565
|
+
(
|
|
566
|
+
dt_parse_iso("2023-01-01T00:00:05.000000+00:00"),
|
|
567
|
+
dt_parse_iso("2023-01-01T00:00:05.000000+00:00"),
|
|
568
|
+
[
|
|
569
|
+
(dt_parse_iso("2023-01-01T00:00:00.000000+00:00"),
|
|
570
|
+
dt_parse_iso("2023-01-01T00:00:20.000000+00:00"),
|
|
571
|
+
dt_parse_iso("2023-01-01T00:00:05.000000+00:00"),
|
|
572
|
+
dt_parse_iso("2023-01-01T00:00:05.000000+00:00")),
|
|
573
|
+
],
|
|
574
|
+
)
|
|
575
|
+
]
|
|
576
|
+
|
|
577
|
+
@ddt.idata(data_populate_clip_ranges)
|
|
578
|
+
@ddt.unpack
|
|
579
|
+
def test_populate_clip_ranges(self, data_begin_dt, data_end_dt, expected):
|
|
580
|
+
result = list(populate_clip_ranges(data_begin_dt, data_end_dt))
|
|
581
|
+
self.assertEqual(result, expected)
|
|
582
|
+
|
|
583
|
+
data_populate_clip_ranges__customized_duration = [
|
|
584
|
+
(
|
|
585
|
+
dt_parse_iso("2023-01-01T00:00:00.000000+00:00"),
|
|
586
|
+
dt_parse_iso("2023-01-01T00:00:20.000000+00:00"),
|
|
587
|
+
[
|
|
588
|
+
(dt_parse_iso("2023-01-01T00:00:00.000000+00:00"),
|
|
589
|
+
dt_parse_iso("2023-01-01T00:00:10.000000+00:00"),
|
|
590
|
+
dt_parse_iso("2023-01-01T00:00:00.000000+00:00"),
|
|
591
|
+
dt_parse_iso("2023-01-01T00:00:10.000000+00:00")),
|
|
592
|
+
(dt_parse_iso("2023-01-01T00:00:10.000000+00:00"),
|
|
593
|
+
dt_parse_iso("2023-01-01T00:00:20.000000+00:00"),
|
|
594
|
+
dt_parse_iso("2023-01-01T00:00:10.000000+00:00"),
|
|
595
|
+
dt_parse_iso("2023-01-01T00:00:20.000000+00:00")),
|
|
596
|
+
],
|
|
597
|
+
),
|
|
598
|
+
(
|
|
599
|
+
dt_parse_iso("2023-01-01T00:00:10.000000+00:00"),
|
|
600
|
+
dt_parse_iso("2023-01-01T00:00:50.000000+00:00"),
|
|
601
|
+
[
|
|
602
|
+
(dt_parse_iso("2023-01-01T00:00:10.000000+00:00"),
|
|
603
|
+
dt_parse_iso("2023-01-01T00:00:20.000000+00:00"),
|
|
604
|
+
dt_parse_iso("2023-01-01T00:00:10.000000+00:00"),
|
|
605
|
+
dt_parse_iso("2023-01-01T00:00:20.000000+00:00")),
|
|
606
|
+
(dt_parse_iso("2023-01-01T00:00:20.000000+00:00"),
|
|
607
|
+
dt_parse_iso("2023-01-01T00:00:30.000000+00:00"),
|
|
608
|
+
dt_parse_iso("2023-01-01T00:00:20.000000+00:00"),
|
|
609
|
+
dt_parse_iso("2023-01-01T00:00:30.000000+00:00")),
|
|
610
|
+
(dt_parse_iso("2023-01-01T00:00:30.000000+00:00"),
|
|
611
|
+
dt_parse_iso("2023-01-01T00:00:40.000000+00:00"),
|
|
612
|
+
dt_parse_iso("2023-01-01T00:00:30.000000+00:00"),
|
|
613
|
+
dt_parse_iso("2023-01-01T00:00:40.000000+00:00")),
|
|
614
|
+
(dt_parse_iso("2023-01-01T00:00:40.000000+00:00"),
|
|
615
|
+
dt_parse_iso("2023-01-01T00:00:50.000000+00:00"),
|
|
616
|
+
dt_parse_iso("2023-01-01T00:00:40.000000+00:00"),
|
|
617
|
+
dt_parse_iso("2023-01-01T00:00:50.000000+00:00")),
|
|
618
|
+
],
|
|
619
|
+
),
|
|
620
|
+
(
|
|
621
|
+
dt_parse_iso("2023-01-01T00:00:10.000000+00:00"),
|
|
622
|
+
dt_parse_iso("2023-01-01T00:00:15.000000+00:00"),
|
|
623
|
+
[
|
|
624
|
+
(dt_parse_iso("2023-01-01T00:00:10.000000+00:00"),
|
|
625
|
+
dt_parse_iso("2023-01-01T00:00:20.000000+00:00"),
|
|
626
|
+
dt_parse_iso("2023-01-01T00:00:10.000000+00:00"),
|
|
627
|
+
dt_parse_iso("2023-01-01T00:00:15.000000+00:00")),
|
|
628
|
+
],
|
|
629
|
+
),
|
|
630
|
+
(
|
|
631
|
+
dt_parse_iso("2023-01-01T00:00:00.000000+00:00"),
|
|
632
|
+
dt_parse_iso("2023-01-01T00:00:30.000000+00:00"),
|
|
633
|
+
[
|
|
634
|
+
(dt_parse_iso("2023-01-01T00:00:00.000000+00:00"),
|
|
635
|
+
dt_parse_iso("2023-01-01T00:00:10.000000+00:00"),
|
|
636
|
+
dt_parse_iso("2023-01-01T00:00:00.000000+00:00"),
|
|
637
|
+
dt_parse_iso("2023-01-01T00:00:10.000000+00:00")),
|
|
638
|
+
(dt_parse_iso("2023-01-01T00:00:10.000000+00:00"),
|
|
639
|
+
dt_parse_iso("2023-01-01T00:00:20.000000+00:00"),
|
|
640
|
+
dt_parse_iso("2023-01-01T00:00:10.000000+00:00"),
|
|
641
|
+
dt_parse_iso("2023-01-01T00:00:20.000000+00:00")),
|
|
642
|
+
(dt_parse_iso("2023-01-01T00:00:20.000000+00:00"),
|
|
643
|
+
dt_parse_iso("2023-01-01T00:00:30.000000+00:00"),
|
|
644
|
+
dt_parse_iso("2023-01-01T00:00:20.000000+00:00"),
|
|
645
|
+
dt_parse_iso("2023-01-01T00:00:30.000000+00:00")),
|
|
646
|
+
],
|
|
647
|
+
),
|
|
648
|
+
(
|
|
649
|
+
dt_parse_iso("2023-01-01T00:00:00.000000+00:00"),
|
|
650
|
+
dt_parse_iso("2023-01-01T00:00:00.000000+00:00"),
|
|
651
|
+
[
|
|
652
|
+
(dt_parse_iso("2023-01-01T00:00:00.000000+00:00"),
|
|
653
|
+
dt_parse_iso("2023-01-01T00:00:10.000000+00:00"),
|
|
654
|
+
dt_parse_iso("2023-01-01T00:00:00.000000+00:00"),
|
|
655
|
+
dt_parse_iso("2023-01-01T00:00:00.000000+00:00")),
|
|
656
|
+
],
|
|
657
|
+
),
|
|
658
|
+
(
|
|
659
|
+
dt_parse_iso("2023-01-01T00:00:05.000000+00:00"),
|
|
660
|
+
dt_parse_iso("2023-01-01T00:00:05.000000+00:00"),
|
|
661
|
+
[
|
|
662
|
+
(dt_parse_iso("2023-01-01T00:00:00.000000+00:00"),
|
|
663
|
+
dt_parse_iso("2023-01-01T00:00:10.000000+00:00"),
|
|
664
|
+
dt_parse_iso("2023-01-01T00:00:05.000000+00:00"),
|
|
665
|
+
dt_parse_iso("2023-01-01T00:00:05.000000+00:00")),
|
|
666
|
+
],
|
|
667
|
+
)
|
|
668
|
+
]
|
|
669
|
+
|
|
670
|
+
@ddt.idata(data_populate_clip_ranges__customized_duration)
|
|
671
|
+
@ddt.unpack
|
|
672
|
+
def test_populate_clip_ranges__customized_duration(self, data_begin_dt, data_end_dt, expected):
|
|
673
|
+
result = list(populate_clip_ranges(data_begin_dt, data_end_dt, clip_duration_us=10_000_000))
|
|
674
|
+
self.assertEqual(result, expected)
|
|
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.63 → plexus_python_common-1.0.64}/resources/unittest/pathutils/0-dummy
RENAMED
|
File without changes
|
{plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/pathutils/1-dummy
RENAMED
|
File without changes
|
{plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/pathutils/2-dummy
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
|
{plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/resources/unittest/pathutils/dummy.txt
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
|
{plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/carto/OSMFile.py
RENAMED
|
File without changes
|
{plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/carto/OSMNode.py
RENAMED
|
File without changes
|
{plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/carto/OSMTags.py
RENAMED
|
File without changes
|
{plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/carto/OSMWay.py
RENAMED
|
File without changes
|
{plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/carto/__init__.py
RENAMED
|
File without changes
|
{plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/resources/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/utils/__init__.py
RENAMED
|
File without changes
|
{plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/utils/apiutils.py
RENAMED
|
File without changes
|
{plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/utils/bagutils.py
RENAMED
|
File without changes
|
{plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/utils/config.py
RENAMED
|
File without changes
|
{plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/utils/datautils.py
RENAMED
|
File without changes
|
{plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/utils/dockerutils.py
RENAMED
|
File without changes
|
{plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/utils/gisutils.py
RENAMED
|
File without changes
|
{plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/utils/jsonutils.py
RENAMED
|
File without changes
|
{plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/utils/ormutils.py
RENAMED
|
File without changes
|
{plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/utils/pathutils.py
RENAMED
|
File without changes
|
{plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/utils/s3utils.py
RENAMED
|
File without changes
|
{plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/utils/sqlutils.py
RENAMED
|
File without changes
|
{plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/utils/strutils.py
RENAMED
|
File without changes
|
{plexus_python_common-1.0.63 → plexus_python_common-1.0.64}/src/plexus/common/utils/testutils.py
RENAMED
|
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.63 → plexus_python_common-1.0.64}/test/plexus_tests/common/__init__.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
|