dcicutils 8.8.1.1b2__py3-none-any.whl → 8.8.1.1b4__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 +6 -3
- {dcicutils-8.8.1.1b2.dist-info → dcicutils-8.8.1.1b4.dist-info}/METADATA +1 -1
- {dcicutils-8.8.1.1b2.dist-info → dcicutils-8.8.1.1b4.dist-info}/RECORD +6 -6
- {dcicutils-8.8.1.1b2.dist-info → dcicutils-8.8.1.1b4.dist-info}/LICENSE.txt +0 -0
- {dcicutils-8.8.1.1b2.dist-info → dcicutils-8.8.1.1b4.dist-info}/WHEEL +0 -0
- {dcicutils-8.8.1.1b2.dist-info → dcicutils-8.8.1.1b4.dist-info}/entry_points.txt +0 -0
dcicutils/structured_data.py
CHANGED
@@ -99,7 +99,7 @@ class StructuredDataSet:
|
|
99
99
|
self._debug_sleep = float(debug_sleep)
|
100
100
|
except Exception:
|
101
101
|
self._debug_sleep = None
|
102
|
-
self.
|
102
|
+
self.load_file(file) if file else None
|
103
103
|
|
104
104
|
@property
|
105
105
|
def data(self) -> dict:
|
@@ -239,7 +239,7 @@ class StructuredDataSet:
|
|
239
239
|
progress({"finish": True})
|
240
240
|
return diffs
|
241
241
|
|
242
|
-
def
|
242
|
+
def load_file(self, file: str) -> None:
|
243
243
|
# Returns a dictionary where each property is the name (i.e. the type) of the data,
|
244
244
|
# and the value is array of dictionaries for the data itself. Handle these kinds of files:
|
245
245
|
# 1. Single CSV, TSV, or JSON file, where the (base) name of the file is the data type name.
|
@@ -252,6 +252,9 @@ class StructuredDataSet:
|
|
252
252
|
return self._load_normal_file(file)
|
253
253
|
return self._load_normal_file(file)
|
254
254
|
|
255
|
+
def _load_file(self, file: str) -> None:
|
256
|
+
return self.load_file(file)
|
257
|
+
|
255
258
|
def _load_normal_file(self, file: str) -> None:
|
256
259
|
if file.endswith(".csv") or file.endswith(".tsv"):
|
257
260
|
self._load_csv_file(file)
|
@@ -264,7 +267,7 @@ class StructuredDataSet:
|
|
264
267
|
|
265
268
|
def _load_packed_file(self, file: str) -> None:
|
266
269
|
for file in unpack_files(file, suffixes=ACCEPTABLE_FILE_SUFFIXES):
|
267
|
-
self.
|
270
|
+
self.load_file(file)
|
268
271
|
|
269
272
|
def _load_csv_file(self, file: str) -> None:
|
270
273
|
self._load_reader(CsvReader(file), type_name=Schema.type_name(file))
|
@@ -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=bc0sTFQQTldLM0HIV9-o_DHIY4kjEdHBPybcrfiuowM,58004
|
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.1b4.dist-info/LICENSE.txt,sha256=qnwSmfnEWMl5l78VPDEzAmEbLVrRqQvfUQiHT0ehrOo,1102
|
73
|
+
dcicutils-8.8.1.1b4.dist-info/METADATA,sha256=e5E4t8Ati-ECkMU0nNomHXag-7iXXz7G7DBJqfz0MSE,3356
|
74
|
+
dcicutils-8.8.1.1b4.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
|
75
|
+
dcicutils-8.8.1.1b4.dist-info/entry_points.txt,sha256=51Q4F_2V10L0282W7HFjP4jdzW4K8lnWDARJQVFy_hw,270
|
76
|
+
dcicutils-8.8.1.1b4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|