dcicutils 8.8.1.1b5__py3-none-any.whl → 8.8.1.1b7__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- dcicutils/structured_data.py +8 -1
- {dcicutils-8.8.1.1b5.dist-info → dcicutils-8.8.1.1b7.dist-info}/METADATA +1 -1
- {dcicutils-8.8.1.1b5.dist-info → dcicutils-8.8.1.1b7.dist-info}/RECORD +6 -6
- {dcicutils-8.8.1.1b5.dist-info → dcicutils-8.8.1.1b7.dist-info}/LICENSE.txt +0 -0
- {dcicutils-8.8.1.1b5.dist-info → dcicutils-8.8.1.1b7.dist-info}/WHEEL +0 -0
- {dcicutils-8.8.1.1b5.dist-info → dcicutils-8.8.1.1b7.dist-info}/entry_points.txt +0 -0
dcicutils/structured_data.py
CHANGED
@@ -91,6 +91,7 @@ class StructuredDataSet:
|
|
91
91
|
self._errors = {}
|
92
92
|
self._resolved_refs = set()
|
93
93
|
self._validated = False
|
94
|
+
self._nrows = 0
|
94
95
|
self._autoadd_properties = autoadd if isinstance(autoadd, dict) and autoadd else None
|
95
96
|
self._norefs = True if norefs is True else False
|
96
97
|
self._debug_sleep = None
|
@@ -116,10 +117,11 @@ class StructuredDataSet:
|
|
116
117
|
ref_lookup_strategy: Optional[Callable] = None,
|
117
118
|
ref_lookup_nocache: bool = False,
|
118
119
|
norefs: bool = False,
|
120
|
+
progress: Optional[Callable] = None,
|
119
121
|
debug_sleep: Optional[str] = None) -> StructuredDataSet:
|
120
122
|
return StructuredDataSet(file=file, portal=portal, schemas=schemas, autoadd=autoadd, order=order, prune=prune,
|
121
123
|
ref_lookup_strategy=ref_lookup_strategy, ref_lookup_nocache=ref_lookup_nocache,
|
122
|
-
norefs=norefs, debug_sleep=debug_sleep)
|
124
|
+
norefs=norefs, progress=progress, debug_sleep=debug_sleep)
|
123
125
|
|
124
126
|
def validate(self, force: bool = False) -> None:
|
125
127
|
def data_without_deleted_properties(data: dict) -> dict:
|
@@ -194,6 +196,10 @@ class StructuredDataSet:
|
|
194
196
|
upload_file["path"] = file_path
|
195
197
|
return upload_files
|
196
198
|
|
199
|
+
@property
|
200
|
+
def nrows(self) -> int:
|
201
|
+
return self._nrows
|
202
|
+
|
197
203
|
def compare(self, progress: Optional[Callable] = None) -> dict:
|
198
204
|
def get_counts() -> int:
|
199
205
|
ntypes = 0
|
@@ -328,6 +334,7 @@ class StructuredDataSet:
|
|
328
334
|
noschema = False
|
329
335
|
structured_row_template = None
|
330
336
|
for row in reader:
|
337
|
+
self._nrows += 1
|
331
338
|
if self._debug_sleep:
|
332
339
|
time.sleep(float(self._debug_sleep))
|
333
340
|
if not structured_row_template: # Delay creation just so we don't reference schema if there are no rows.
|
@@ -62,15 +62,15 @@ dcicutils/secrets_utils.py,sha256=8dppXAsiHhJzI6NmOcvJV5ldvKkQZzh3Fl-cb8Wm7MI,19
|
|
62
62
|
dcicutils/sheet_utils.py,sha256=VlmzteONW5VF_Q4vo0yA5vesz1ViUah1MZ_yA1rwZ0M,33629
|
63
63
|
dcicutils/snapshot_utils.py,sha256=ymP7PXH6-yEiXAt75w0ldQFciGNqWBClNxC5gfX2FnY,22961
|
64
64
|
dcicutils/ssl_certificate_utils.py,sha256=F0ifz_wnRRN9dfrfsz7aCp4UDLgHEY8LaK7PjnNvrAQ,9707
|
65
|
-
dcicutils/structured_data.py,sha256=
|
65
|
+
dcicutils/structured_data.py,sha256=tnxilT_CBN58hEmvH-wMRM47RJiQTPQYiP2O_JrO41Q,59323
|
66
66
|
dcicutils/task_utils.py,sha256=MF8ujmTD6-O2AC2gRGPHyGdUrVKgtr8epT5XU8WtNjk,8082
|
67
67
|
dcicutils/tmpfile_utils.py,sha256=n95XF8dZVbQRSXBZTGToXXfSs3JUVRyN6c3ZZ0nhAWI,1403
|
68
68
|
dcicutils/trace_utils.py,sha256=g8kwV4ebEy5kXW6oOrEAUsurBcCROvwtZqz9fczsGRE,1769
|
69
69
|
dcicutils/validation_utils.py,sha256=cMZIU2cY98FYtzK52z5WUYck7urH6JcqOuz9jkXpqzg,14797
|
70
70
|
dcicutils/variant_utils.py,sha256=2H9azNx3xAj-MySg-uZ2SFqbWs4kZvf61JnK6b-h4Qw,4343
|
71
71
|
dcicutils/zip_utils.py,sha256=rnjNv_k6L9jT2SjDSgVXp4BEJYLtz9XN6Cl2Fy-tqnM,2027
|
72
|
-
dcicutils-8.8.1.
|
73
|
-
dcicutils-8.8.1.
|
74
|
-
dcicutils-8.8.1.
|
75
|
-
dcicutils-8.8.1.
|
76
|
-
dcicutils-8.8.1.
|
72
|
+
dcicutils-8.8.1.1b7.dist-info/LICENSE.txt,sha256=qnwSmfnEWMl5l78VPDEzAmEbLVrRqQvfUQiHT0ehrOo,1102
|
73
|
+
dcicutils-8.8.1.1b7.dist-info/METADATA,sha256=0bVW0YQ9uJnm4u110RRhzXeCQQ0V1N3v42jxYTnsNGU,3356
|
74
|
+
dcicutils-8.8.1.1b7.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
|
75
|
+
dcicutils-8.8.1.1b7.dist-info/entry_points.txt,sha256=51Q4F_2V10L0282W7HFjP4jdzW4K8lnWDARJQVFy_hw,270
|
76
|
+
dcicutils-8.8.1.1b7.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|