dcicutils 8.10.0.1b2__py3-none-any.whl → 8.10.0.1b3__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/structured_data.py +4 -0
- {dcicutils-8.10.0.1b2.dist-info → dcicutils-8.10.0.1b3.dist-info}/METADATA +1 -1
- {dcicutils-8.10.0.1b2.dist-info → dcicutils-8.10.0.1b3.dist-info}/RECORD +6 -6
- {dcicutils-8.10.0.1b2.dist-info → dcicutils-8.10.0.1b3.dist-info}/LICENSE.txt +0 -0
- {dcicutils-8.10.0.1b2.dist-info → dcicutils-8.10.0.1b3.dist-info}/WHEEL +0 -0
- {dcicutils-8.10.0.1b2.dist-info → dcicutils-8.10.0.1b3.dist-info}/entry_points.txt +0 -0
dcicutils/structured_data.py
CHANGED
@@ -57,6 +57,7 @@ class StructuredDataSet:
|
|
57
57
|
ref_lookup_nocache: bool = False,
|
58
58
|
norefs: bool = False, merge: bool = False,
|
59
59
|
progress: Optional[Callable] = None,
|
60
|
+
row_reader_hook: Optional[Callable] = None,
|
60
61
|
debug_sleep: Optional[str] = None) -> None:
|
61
62
|
self._progress = progress if callable(progress) else None
|
62
63
|
self._data = {}
|
@@ -75,6 +76,7 @@ class StructuredDataSet:
|
|
75
76
|
self._autoadd_properties = autoadd if isinstance(autoadd, dict) and autoadd else None
|
76
77
|
self._norefs = True if norefs is True else False
|
77
78
|
self._merge = True if merge is True else False # New merge functionality (2024-05-25)
|
79
|
+
self._row_reader_hook = row_reader_hook if callable(row_reader_hook) else None # Testing support (2024-06-12)
|
78
80
|
self._debug_sleep = None
|
79
81
|
if debug_sleep:
|
80
82
|
try:
|
@@ -377,6 +379,8 @@ class StructuredDataSet:
|
|
377
379
|
structured_row_template = _StructuredRowTemplate(reader.header, schema)
|
378
380
|
structured_row = structured_row_template.create_row()
|
379
381
|
for column_name, value in row.items():
|
382
|
+
if self._row_reader_hook:
|
383
|
+
value = self._row_reader_hook(reader.sheet_name, column_name, value)
|
380
384
|
structured_row_template.set_value(structured_row, column_name, value, reader.file, reader.row_number)
|
381
385
|
if self._autoadd_properties:
|
382
386
|
self._add_properties(structured_row, self._autoadd_properties, schema)
|
@@ -64,7 +64,7 @@ dcicutils/secrets_utils.py,sha256=8dppXAsiHhJzI6NmOcvJV5ldvKkQZzh3Fl-cb8Wm7MI,19
|
|
64
64
|
dcicutils/sheet_utils.py,sha256=VlmzteONW5VF_Q4vo0yA5vesz1ViUah1MZ_yA1rwZ0M,33629
|
65
65
|
dcicutils/snapshot_utils.py,sha256=ymP7PXH6-yEiXAt75w0ldQFciGNqWBClNxC5gfX2FnY,22961
|
66
66
|
dcicutils/ssl_certificate_utils.py,sha256=F0ifz_wnRRN9dfrfsz7aCp4UDLgHEY8LaK7PjnNvrAQ,9707
|
67
|
-
dcicutils/structured_data.py,sha256=
|
67
|
+
dcicutils/structured_data.py,sha256=TA7kJ-utVj_xa5XnVs7VaG_XQicl5MUWmrVkDm0N8qE,64471
|
68
68
|
dcicutils/submitr/progress_constants.py,sha256=5bxyX77ql8qEJearfHEvsvXl7D0GuUODW0T65mbRmnE,2895
|
69
69
|
dcicutils/submitr/ref_lookup_strategy.py,sha256=VJN-Oo0LLna6Vo2cu47eC-eU-yUC9NFlQP29xajejVU,4741
|
70
70
|
dcicutils/task_utils.py,sha256=MF8ujmTD6-O2AC2gRGPHyGdUrVKgtr8epT5XU8WtNjk,8082
|
@@ -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.10.0.
|
77
|
-
dcicutils-8.10.0.
|
78
|
-
dcicutils-8.10.0.
|
79
|
-
dcicutils-8.10.0.
|
80
|
-
dcicutils-8.10.0.
|
76
|
+
dcicutils-8.10.0.1b3.dist-info/LICENSE.txt,sha256=qnwSmfnEWMl5l78VPDEzAmEbLVrRqQvfUQiHT0ehrOo,1102
|
77
|
+
dcicutils-8.10.0.1b3.dist-info/METADATA,sha256=DqsvmelkT1xMo6l2zgHf5268TvWbJZ8JxzTUHFkt_H8,3440
|
78
|
+
dcicutils-8.10.0.1b3.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
|
79
|
+
dcicutils-8.10.0.1b3.dist-info/entry_points.txt,sha256=51Q4F_2V10L0282W7HFjP4jdzW4K8lnWDARJQVFy_hw,270
|
80
|
+
dcicutils-8.10.0.1b3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|