dcicutils 8.14.0.1b3__py3-none-any.whl → 8.14.0.1b4__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- dcicutils/scripts/update_portal_object.py +9 -0
- {dcicutils-8.14.0.1b3.dist-info → dcicutils-8.14.0.1b4.dist-info}/METADATA +1 -1
- {dcicutils-8.14.0.1b3.dist-info → dcicutils-8.14.0.1b4.dist-info}/RECORD +6 -6
- {dcicutils-8.14.0.1b3.dist-info → dcicutils-8.14.0.1b4.dist-info}/LICENSE.txt +0 -0
- {dcicutils-8.14.0.1b3.dist-info → dcicutils-8.14.0.1b4.dist-info}/WHEEL +0 -0
- {dcicutils-8.14.0.1b3.dist-info → dcicutils-8.14.0.1b4.dist-info}/entry_points.txt +0 -0
@@ -236,6 +236,7 @@ def _post_or_patch_or_upsert(portal: Portal, file_or_directory: str,
|
|
236
236
|
_print(f"DEBUG: File ({file}) contains a dictionary of schema names.")
|
237
237
|
for schema_name in data:
|
238
238
|
if isinstance(schema_data := data[schema_name], list):
|
239
|
+
schema_data = _impose_special_ordering(schema_data, schema_name)
|
239
240
|
if debug:
|
240
241
|
_print(f"DEBUG: Processing {update_action_name}s for type: {schema_name}")
|
241
242
|
for index, item in enumerate(schema_data):
|
@@ -250,6 +251,8 @@ def _post_or_patch_or_upsert(portal: Portal, file_or_directory: str,
|
|
250
251
|
elif isinstance(data, list):
|
251
252
|
if debug:
|
252
253
|
_print(f"DEBUG: File ({file}) contains a list of objects of type: {schema_name}")
|
254
|
+
import pdb ; pdb.set_trace() # noqa
|
255
|
+
data = _impose_special_ordering(data, schema_name)
|
253
256
|
for index, item in enumerate(data):
|
254
257
|
update_function(portal, item, schema_name, file=file, index=index,
|
255
258
|
patch_delete_fields=patch_delete_fields,
|
@@ -286,6 +289,12 @@ def _post_or_patch_or_upsert(portal: Portal, file_or_directory: str,
|
|
286
289
|
_print(f"ERROR: Cannot find file or directory: {file_or_directory}")
|
287
290
|
|
288
291
|
|
292
|
+
def _impose_special_ordering(data: List[dict], schema_name: str) -> List[dict]:
|
293
|
+
if schema_name == "FileFormat":
|
294
|
+
return sorted(data, key=lambda item: "extra_file_formats" in item)
|
295
|
+
return data
|
296
|
+
|
297
|
+
|
289
298
|
def post_data(portal: Portal, data: dict, schema_name: str,
|
290
299
|
file: Optional[str] = None, index: int = 0,
|
291
300
|
patch_delete_fields: Optional[str] = None,
|
@@ -60,7 +60,7 @@ dcicutils/s3_utils.py,sha256=h2B9ftOo-kxqfiKth5ZDC_cAUFy1Pbu7BrVanFnE5Iw,28839
|
|
60
60
|
dcicutils/schema_utils.py,sha256=GmRm-XqZKJ6qine16SQF1txcby9WougDav_sYmKNs9E,12400
|
61
61
|
dcicutils/scripts/publish_to_pypi.py,sha256=sMd4WASQGlxlh7uLrt2eGkFRXYgONVmvIg8mClMS5RQ,13903
|
62
62
|
dcicutils/scripts/run_license_checker.py,sha256=z2keYnRDZsHQbTeo1XORAXSXNJK5axVzL5LjiNqZ7jE,4184
|
63
|
-
dcicutils/scripts/update_portal_object.py,sha256=
|
63
|
+
dcicutils/scripts/update_portal_object.py,sha256=bkadJlw3pJGLid8GXrNiZG0PWD9hvy4klGUNQhgjRhI,22610
|
64
64
|
dcicutils/scripts/view_portal_object.py,sha256=6day_AXtFf9y4oYNvZC_fGa-h9xQKbNwUBuoluVcuiI,33691
|
65
65
|
dcicutils/secrets_utils.py,sha256=8dppXAsiHhJzI6NmOcvJV5ldvKkQZzh3Fl-cb8Wm7MI,19745
|
66
66
|
dcicutils/sheet_utils.py,sha256=VlmzteONW5VF_Q4vo0yA5vesz1ViUah1MZ_yA1rwZ0M,33629
|
@@ -75,8 +75,8 @@ dcicutils/trace_utils.py,sha256=g8kwV4ebEy5kXW6oOrEAUsurBcCROvwtZqz9fczsGRE,1769
|
|
75
75
|
dcicutils/validation_utils.py,sha256=cMZIU2cY98FYtzK52z5WUYck7urH6JcqOuz9jkXpqzg,14797
|
76
76
|
dcicutils/variant_utils.py,sha256=2H9azNx3xAj-MySg-uZ2SFqbWs4kZvf61JnK6b-h4Qw,4343
|
77
77
|
dcicutils/zip_utils.py,sha256=_Y9EmL3D2dUZhxucxHvrtmmlbZmK4FpSsHEb7rGSJLU,3265
|
78
|
-
dcicutils-8.14.0.
|
79
|
-
dcicutils-8.14.0.
|
80
|
-
dcicutils-8.14.0.
|
81
|
-
dcicutils-8.14.0.
|
82
|
-
dcicutils-8.14.0.
|
78
|
+
dcicutils-8.14.0.1b4.dist-info/LICENSE.txt,sha256=qnwSmfnEWMl5l78VPDEzAmEbLVrRqQvfUQiHT0ehrOo,1102
|
79
|
+
dcicutils-8.14.0.1b4.dist-info/METADATA,sha256=oCoIibABt6sbGex5upf6kouWpbqPgHubKlzmzPrmGKQ,3439
|
80
|
+
dcicutils-8.14.0.1b4.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
|
81
|
+
dcicutils-8.14.0.1b4.dist-info/entry_points.txt,sha256=W6kEWdUJk9tQ4myAgpehPdebcwvCAZ7UgB-wyPgDUMg,335
|
82
|
+
dcicutils-8.14.0.1b4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|