plexus-python-common 1.0.73__py3-none-any.whl → 1.0.74__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- plexus/common/utils/tagutils.py +18 -1
- {plexus_python_common-1.0.73.dist-info → plexus_python_common-1.0.74.dist-info}/METADATA +1 -1
- {plexus_python_common-1.0.73.dist-info → plexus_python_common-1.0.74.dist-info}/RECORD +5 -5
- {plexus_python_common-1.0.73.dist-info → plexus_python_common-1.0.74.dist-info}/WHEEL +0 -0
- {plexus_python_common-1.0.73.dist-info → plexus_python_common-1.0.74.dist-info}/top_level.txt +0 -0
plexus/common/utils/tagutils.py
CHANGED
|
@@ -38,6 +38,8 @@ from plexus.common.utils.ormutils import clone_sequence_model_instance, make_bas
|
|
|
38
38
|
from plexus.common.utils.sqlutils import escape_sql_like
|
|
39
39
|
|
|
40
40
|
__all__ = [
|
|
41
|
+
"versioned_identifier",
|
|
42
|
+
"split_versioned_identifier",
|
|
41
43
|
"RichDesc",
|
|
42
44
|
"Tag",
|
|
43
45
|
"BoundTag",
|
|
@@ -60,6 +62,21 @@ __all__ = [
|
|
|
60
62
|
]
|
|
61
63
|
|
|
62
64
|
|
|
65
|
+
def versioned_identifier(identifier: str | None, version: str | None) -> str | None:
|
|
66
|
+
if identifier is None or version is None:
|
|
67
|
+
return identifier
|
|
68
|
+
return f"{identifier}@{version}"
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def split_versioned_identifier(s: str | None) -> tuple[str | None, str | None]:
|
|
72
|
+
if s is None:
|
|
73
|
+
return None, None
|
|
74
|
+
if "@" not in s:
|
|
75
|
+
return s, None
|
|
76
|
+
identifier, version = s.rsplit("@", 1)
|
|
77
|
+
return identifier, version
|
|
78
|
+
|
|
79
|
+
|
|
63
80
|
@dataclasses.dataclass(frozen=True, eq=True, order=True)
|
|
64
81
|
class RichDesc(object):
|
|
65
82
|
type: str
|
|
@@ -331,7 +348,7 @@ def predefined_tagsets() -> dict[str, Tagset]:
|
|
|
331
348
|
else:
|
|
332
349
|
latest_targets[tagset.namespace] = (version, tagset)
|
|
333
350
|
|
|
334
|
-
tagsets[
|
|
351
|
+
tagsets[versioned_identifier(tagset.namespace, tagset.version)] = tagset
|
|
335
352
|
|
|
336
353
|
for _, tagset in latest_targets.values():
|
|
337
354
|
tagsets[tagset.namespace] = tagset
|
|
@@ -21,9 +21,9 @@ plexus/common/utils/pathutils.py,sha256=hGJqSLj08tuOeZ7WeC5d4BtjnPI732BuntVQBQsq
|
|
|
21
21
|
plexus/common/utils/s3utils.py,sha256=zlO4kGs-c2gUeOfPfiKIE5liQZsbYxqAZYCwA8kL0Lo,36017
|
|
22
22
|
plexus/common/utils/sqlutils.py,sha256=D6kTBjhO5YlNRt3uFlPt6z3uH61m9ajEzPYmsI6NoFc,231
|
|
23
23
|
plexus/common/utils/strutils.py,sha256=O9Inv4ffUTf6Xjc5ftoZwbIua1NeG7itCT9S3zjZxBc,16436
|
|
24
|
-
plexus/common/utils/tagutils.py,sha256=
|
|
24
|
+
plexus/common/utils/tagutils.py,sha256=4r-g4JQ_zmJI4ttJHvlKq-iQuqA6GSPb3PQwaJfnBkg,61632
|
|
25
25
|
plexus/common/utils/testutils.py,sha256=N8ijLu7X-hlQlHzvv0TtSsQpIF4T1hbr-AjkILoV2Ac,6152
|
|
26
|
-
plexus_python_common-1.0.
|
|
27
|
-
plexus_python_common-1.0.
|
|
28
|
-
plexus_python_common-1.0.
|
|
29
|
-
plexus_python_common-1.0.
|
|
26
|
+
plexus_python_common-1.0.74.dist-info/METADATA,sha256=2RyK_d-GgT_5C4ojTgb5ONTTE0Oi11FB7Mz1Ub7ssyo,1481
|
|
27
|
+
plexus_python_common-1.0.74.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
28
|
+
plexus_python_common-1.0.74.dist-info/top_level.txt,sha256=ug_g7CVwaMQuas5UzAXbHUrQvKGCn8ezc6ZNvvRlJOE,7
|
|
29
|
+
plexus_python_common-1.0.74.dist-info/RECORD,,
|
|
File without changes
|
{plexus_python_common-1.0.73.dist-info → plexus_python_common-1.0.74.dist-info}/top_level.txt
RENAMED
|
File without changes
|