dcicutils 8.7.1.1b11__py3-none-any.whl → 8.7.1.1b12__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/schema_utils.py +2 -2
- dcicutils/structured_data.py +11 -9
- {dcicutils-8.7.1.1b11.dist-info → dcicutils-8.7.1.1b12.dist-info}/METADATA +1 -1
- {dcicutils-8.7.1.1b11.dist-info → dcicutils-8.7.1.1b12.dist-info}/RECORD +7 -7
- {dcicutils-8.7.1.1b11.dist-info → dcicutils-8.7.1.1b12.dist-info}/LICENSE.txt +0 -0
- {dcicutils-8.7.1.1b11.dist-info → dcicutils-8.7.1.1b12.dist-info}/WHEEL +0 -0
- {dcicutils-8.7.1.1b11.dist-info → dcicutils-8.7.1.1b12.dist-info}/entry_points.txt +0 -0
dcicutils/schema_utils.py
CHANGED
@@ -189,9 +189,9 @@ def get_one_of_formats(schema: Dict[str, Any]) -> List[str]:
|
|
189
189
|
|
190
190
|
class Schema:
|
191
191
|
|
192
|
-
def __init__(self, schema: dict,
|
192
|
+
def __init__(self, schema: dict, type: Optional[str] = None) -> None:
|
193
193
|
self._data = schema if isinstance(schema, dict) else (schema.data if isinstance(schema, Schema) else {})
|
194
|
-
self._type = (isinstance(
|
194
|
+
self._type = (type if isinstance(type, str) else "") or Schema.type_name(self._data.get("title", ""))
|
195
195
|
|
196
196
|
@property
|
197
197
|
def data(self) -> dict:
|
dcicutils/structured_data.py
CHANGED
@@ -16,6 +16,7 @@ from dcicutils.misc_utils import (create_dict, create_readonly_object, load_json
|
|
16
16
|
split_string, to_boolean, to_enum, to_float, to_integer, VirtualApp)
|
17
17
|
from dcicutils.portal_object_utils import PortalObject
|
18
18
|
from dcicutils.portal_utils import Portal as PortalBase
|
19
|
+
from dcicutils.schema_utils import Schema as SchemaBase
|
19
20
|
from dcicutils.zip_utils import unpack_gz_file_to_temporary_file, unpack_files
|
20
21
|
|
21
22
|
|
@@ -363,11 +364,12 @@ class _StructuredRowTemplate:
|
|
363
364
|
return structured_row_template
|
364
365
|
|
365
366
|
|
366
|
-
class Schema:
|
367
|
+
class Schema(SchemaBase):
|
367
368
|
|
368
369
|
def __init__(self, schema_json: dict, portal: Optional[Portal] = None) -> None:
|
369
|
-
|
370
|
-
|
370
|
+
super().__init__(schema_json)
|
371
|
+
# self._data = schema_json if isinstance(schema_json, dict) else {}
|
372
|
+
# self._type = Schema.type_name(schema_json.get("title", ""))
|
371
373
|
self._portal = portal # Needed only to resolve linkTo references.
|
372
374
|
self._map_value_functions = {
|
373
375
|
"boolean": self._map_function_boolean,
|
@@ -380,13 +382,13 @@ class Schema:
|
|
380
382
|
self._unresolved_refs = []
|
381
383
|
self._typeinfo = self._create_typeinfo(schema_json)
|
382
384
|
|
383
|
-
|
384
|
-
|
385
|
-
|
385
|
+
# @property
|
386
|
+
# def data(self) -> dict:
|
387
|
+
# return self._data
|
386
388
|
|
387
|
-
|
388
|
-
|
389
|
-
|
389
|
+
# @property
|
390
|
+
# def type(self) -> str:
|
391
|
+
# return self._type
|
390
392
|
|
391
393
|
@staticmethod
|
392
394
|
def load_by_name(name: str, portal: Portal) -> Optional[dict]:
|
@@ -52,22 +52,22 @@ dcicutils/qa_utils.py,sha256=TT0SiJWiuxYvbsIyhK9VO4uV_suxhB6CpuC4qPacCzQ,160208
|
|
52
52
|
dcicutils/redis_tools.py,sha256=qkcSNMtvqkpvts-Cm9gWhneK523Q_oHwhNUud1be1qk,7055
|
53
53
|
dcicutils/redis_utils.py,sha256=VJ-7g8pOZqR1ZCtdcjKz3-6as2DMUcs1b1zG6wSprH4,6462
|
54
54
|
dcicutils/s3_utils.py,sha256=LauLFQGvZLfpBJ81tYMikjLd3SJRz2R_FrL1n4xSlyI,28868
|
55
|
-
dcicutils/schema_utils.py,sha256=
|
55
|
+
dcicutils/schema_utils.py,sha256=Ky1KCrHYbDR4qd1prHBKJvO8Z_1x1xVUup1SsQsVP24,10002
|
56
56
|
dcicutils/scripts/publish_to_pypi.py,sha256=LFzNHIQK2EXFr88YcfctyA_WKEBFc1ElnSjWrCXedPM,13889
|
57
57
|
dcicutils/scripts/run_license_checker.py,sha256=z2keYnRDZsHQbTeo1XORAXSXNJK5axVzL5LjiNqZ7jE,4184
|
58
58
|
dcicutils/secrets_utils.py,sha256=8dppXAsiHhJzI6NmOcvJV5ldvKkQZzh3Fl-cb8Wm7MI,19745
|
59
59
|
dcicutils/sheet_utils.py,sha256=VlmzteONW5VF_Q4vo0yA5vesz1ViUah1MZ_yA1rwZ0M,33629
|
60
60
|
dcicutils/snapshot_utils.py,sha256=ymP7PXH6-yEiXAt75w0ldQFciGNqWBClNxC5gfX2FnY,22961
|
61
61
|
dcicutils/ssl_certificate_utils.py,sha256=F0ifz_wnRRN9dfrfsz7aCp4UDLgHEY8LaK7PjnNvrAQ,9707
|
62
|
-
dcicutils/structured_data.py,sha256=
|
62
|
+
dcicutils/structured_data.py,sha256=OzT6BZoh7LDw3Tw7mjPJ-SscCyCDQjJ_-yFOWV3jOf8,37319
|
63
63
|
dcicutils/task_utils.py,sha256=MF8ujmTD6-O2AC2gRGPHyGdUrVKgtr8epT5XU8WtNjk,8082
|
64
64
|
dcicutils/tmpfile_utils.py,sha256=n95XF8dZVbQRSXBZTGToXXfSs3JUVRyN6c3ZZ0nhAWI,1403
|
65
65
|
dcicutils/trace_utils.py,sha256=g8kwV4ebEy5kXW6oOrEAUsurBcCROvwtZqz9fczsGRE,1769
|
66
66
|
dcicutils/validation_utils.py,sha256=cMZIU2cY98FYtzK52z5WUYck7urH6JcqOuz9jkXpqzg,14797
|
67
67
|
dcicutils/variant_utils.py,sha256=2H9azNx3xAj-MySg-uZ2SFqbWs4kZvf61JnK6b-h4Qw,4343
|
68
68
|
dcicutils/zip_utils.py,sha256=rnjNv_k6L9jT2SjDSgVXp4BEJYLtz9XN6Cl2Fy-tqnM,2027
|
69
|
-
dcicutils-8.7.1.
|
70
|
-
dcicutils-8.7.1.
|
71
|
-
dcicutils-8.7.1.
|
72
|
-
dcicutils-8.7.1.
|
73
|
-
dcicutils-8.7.1.
|
69
|
+
dcicutils-8.7.1.1b12.dist-info/LICENSE.txt,sha256=qnwSmfnEWMl5l78VPDEzAmEbLVrRqQvfUQiHT0ehrOo,1102
|
70
|
+
dcicutils-8.7.1.1b12.dist-info/METADATA,sha256=TX64_N_gAD4az9l4pcyZDOHOT8ahGQqp9eTA-LQXDCM,3315
|
71
|
+
dcicutils-8.7.1.1b12.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
|
72
|
+
dcicutils-8.7.1.1b12.dist-info/entry_points.txt,sha256=8wbw5csMIgBXhkwfgsgJeuFcoUc0WsucUxmOyml2aoA,209
|
73
|
+
dcicutils-8.7.1.1b12.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|