dcicutils 8.8.6.1b7__py3-none-any.whl → 8.8.6.1b8__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.
- dcicutils/portal_object_utils.py +2 -5
- dcicutils/portal_utils.py +2 -6
- {dcicutils-8.8.6.1b7.dist-info → dcicutils-8.8.6.1b8.dist-info}/METADATA +1 -1
- {dcicutils-8.8.6.1b7.dist-info → dcicutils-8.8.6.1b8.dist-info}/RECORD +7 -7
- {dcicutils-8.8.6.1b7.dist-info → dcicutils-8.8.6.1b8.dist-info}/LICENSE.txt +0 -0
- {dcicutils-8.8.6.1b7.dist-info → dcicutils-8.8.6.1b8.dist-info}/WHEEL +0 -0
- {dcicutils-8.8.6.1b7.dist-info → dcicutils-8.8.6.1b8.dist-info}/entry_points.txt +0 -0
dcicutils/portal_object_utils.py
CHANGED
@@ -145,15 +145,12 @@ class PortalObject:
|
|
145
145
|
return diffs
|
146
146
|
|
147
147
|
@lru_cache(maxsize=1)
|
148
|
-
def _get_identifying_paths(self,
|
149
|
-
ref_lookup_strategy: Optional[Callable] = None) -> Optional[List[str]]:
|
148
|
+
def _get_identifying_paths(self, ref_lookup_strategy: Optional[Callable] = None) -> Optional[List[str]]:
|
150
149
|
if not self._portal and (uuid := self.uuid):
|
151
|
-
if all is True and (type := self.type):
|
152
|
-
return [f"/{type}/{uuid}", f"/{uuid}"]
|
153
150
|
return [f"/{uuid}"]
|
154
151
|
# Migrating to and unifying this in portal_utils.Portal.get_identifying_paths (2024-05-26).
|
155
152
|
return self._portal.get_identifying_paths(self._data,
|
156
|
-
portal_type=self.schema,
|
153
|
+
portal_type=self.schema,
|
157
154
|
lookup_strategy=ref_lookup_strategy) if self._portal else None
|
158
155
|
|
159
156
|
def _normalized_refs(self, refs: List[dict]) -> Tuple[PortalObject, int]:
|
dcicutils/portal_utils.py
CHANGED
@@ -407,7 +407,7 @@ class Portal:
|
|
407
407
|
|
408
408
|
@function_cache(maxsize=100, serialize_key=True)
|
409
409
|
def get_identifying_paths(self, portal_object: dict, portal_type: Optional[Union[str, dict]] = None,
|
410
|
-
|
410
|
+
lookup_strategy: Optional[Union[Callable, bool]] = None) -> List[str]:
|
411
411
|
"""
|
412
412
|
Returns the list of the identifying Portal (URL) paths for the given Portal object. Favors any uuid
|
413
413
|
and identifier based paths and defavors aliases based paths (ala self.get_identifying_property_names);
|
@@ -467,15 +467,11 @@ class Portal:
|
|
467
467
|
# And note the disction of just using /{uuid} here rather than /{type}/{uuid} as in the else
|
468
468
|
# statement below is not really necessary; just here for emphasis that this is all that's needed.
|
469
469
|
#
|
470
|
-
if all is True:
|
471
|
-
results.append(f"/{portal_type}/{identifying_value}")
|
472
470
|
results.append(f"/{identifying_value}")
|
473
471
|
elif isinstance(identifying_value, list):
|
474
472
|
for identifying_value_item in identifying_value:
|
475
473
|
if identifying_value_item:
|
476
474
|
results.append(f"/{portal_type}/{identifying_value_item}")
|
477
|
-
if all is True:
|
478
|
-
results.append(f"/{identifying_value_item}")
|
479
475
|
else:
|
480
476
|
lookup_options = Portal.LOOKUP_UNDEFINED
|
481
477
|
if schema := self.get_schema(portal_type):
|
@@ -542,7 +538,7 @@ class Portal:
|
|
542
538
|
@staticmethod
|
543
539
|
def _lookup_strategy(portal: Portal, type_name: str, schema: dict, value: str) -> (int, Optional[str]):
|
544
540
|
#
|
545
|
-
# Note this
|
541
|
+
# Note this slightly odd situation WRT object lookups by submitted_id and accession:
|
546
542
|
# -----------------------------+-----------------------------------------------+---------------+
|
547
543
|
# PATH | EXAMPLE | LOOKUP RESULT |
|
548
544
|
# -----------------------------+-----------------------------------------------+---------------+
|
@@ -47,8 +47,8 @@ dcicutils/log_utils.py,sha256=7pWMc6vyrorUZQf-V-M3YC6zrPgNhuV_fzm9xqTPph0,10883
|
|
47
47
|
dcicutils/misc_utils.py,sha256=zHwsxxEn24muLBP7mDvMa8I9VdMejwW8HMuCL5xbhhw,107690
|
48
48
|
dcicutils/obfuscation_utils.py,sha256=fo2jOmDRC6xWpYX49u80bVNisqRRoPskFNX3ymFAmjw,5963
|
49
49
|
dcicutils/opensearch_utils.py,sha256=V2exmFYW8Xl2_pGFixF4I2Cc549Opwe4PhFi5twC0M8,1017
|
50
|
-
dcicutils/portal_object_utils.py,sha256=
|
51
|
-
dcicutils/portal_utils.py,sha256=
|
50
|
+
dcicutils/portal_object_utils.py,sha256=Az3n1aL-PQkN5gOFE6ZqC2XkYsqiwKlq7-tZggs1QN4,11062
|
51
|
+
dcicutils/portal_utils.py,sha256=lsS_Pvjr0ecUpyHu3R_QcnjrwUHApr2qo8Wmp9COwks,43827
|
52
52
|
dcicutils/progress_bar.py,sha256=UT7lxb-rVF_gp4yjY2Tg4eun1naaH__hB4_v3O85bcE,19468
|
53
53
|
dcicutils/project_utils.py,sha256=qPdCaFmWUVBJw4rw342iUytwdQC0P-XKpK4mhyIulMM,31250
|
54
54
|
dcicutils/qa_checkers.py,sha256=cdXjeL0jCDFDLT8VR8Px78aS10hwNISOO5G_Zv2TZ6M,20534
|
@@ -73,8 +73,8 @@ dcicutils/trace_utils.py,sha256=g8kwV4ebEy5kXW6oOrEAUsurBcCROvwtZqz9fczsGRE,1769
|
|
73
73
|
dcicutils/validation_utils.py,sha256=cMZIU2cY98FYtzK52z5WUYck7urH6JcqOuz9jkXpqzg,14797
|
74
74
|
dcicutils/variant_utils.py,sha256=2H9azNx3xAj-MySg-uZ2SFqbWs4kZvf61JnK6b-h4Qw,4343
|
75
75
|
dcicutils/zip_utils.py,sha256=_Y9EmL3D2dUZhxucxHvrtmmlbZmK4FpSsHEb7rGSJLU,3265
|
76
|
-
dcicutils-8.8.6.
|
77
|
-
dcicutils-8.8.6.
|
78
|
-
dcicutils-8.8.6.
|
79
|
-
dcicutils-8.8.6.
|
80
|
-
dcicutils-8.8.6.
|
76
|
+
dcicutils-8.8.6.1b8.dist-info/LICENSE.txt,sha256=qnwSmfnEWMl5l78VPDEzAmEbLVrRqQvfUQiHT0ehrOo,1102
|
77
|
+
dcicutils-8.8.6.1b8.dist-info/METADATA,sha256=f5e7Y4rOGWnLReByHQbOEKbpTPLMLTjzs9pzhHUM_jA,3439
|
78
|
+
dcicutils-8.8.6.1b8.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
|
79
|
+
dcicutils-8.8.6.1b8.dist-info/entry_points.txt,sha256=51Q4F_2V10L0282W7HFjP4jdzW4K8lnWDARJQVFy_hw,270
|
80
|
+
dcicutils-8.8.6.1b8.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|