dcicutils 8.14.0__tar.gz → 8.14.0.1b3__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/PKG-INFO +1 -1
  2. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/scripts/update_portal_object.py +30 -3
  3. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/scripts/view_portal_object.py +33 -5
  4. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/pyproject.toml +1 -1
  5. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/LICENSE.txt +0 -0
  6. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/README.rst +0 -0
  7. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/__init__.py +0 -0
  8. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/base.py +0 -0
  9. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/beanstalk_utils.py +0 -0
  10. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/bundle_utils.py +0 -0
  11. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/captured_output.py +0 -0
  12. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/cloudformation_utils.py +0 -0
  13. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/codebuild_utils.py +0 -0
  14. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/command_utils.py +0 -0
  15. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/common.py +0 -0
  16. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/contribution_scripts.py +0 -0
  17. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/contribution_utils.py +0 -0
  18. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/creds_utils.py +0 -0
  19. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/data_readers.py +0 -0
  20. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/data_utils.py +0 -0
  21. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/datetime_utils.py +0 -0
  22. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/deployment_utils.py +0 -0
  23. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/diff_utils.py +0 -0
  24. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/docker_utils.py +0 -0
  25. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/ecr_scripts.py +0 -0
  26. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/ecr_utils.py +0 -0
  27. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/ecs_utils.py +0 -0
  28. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/env_base.py +0 -0
  29. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/env_manager.py +0 -0
  30. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/env_scripts.py +0 -0
  31. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/env_utils.py +0 -0
  32. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/env_utils_legacy.py +0 -0
  33. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/es_utils.py +0 -0
  34. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/exceptions.py +0 -0
  35. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/ff_mocks.py +0 -0
  36. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/ff_utils.py +0 -0
  37. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/file_utils.py +0 -0
  38. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/function_cache_decorator.py +0 -0
  39. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/glacier_utils.py +0 -0
  40. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/hack_for_elasticsearch_numpy_usage.py +0 -0
  41. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/http_utils.py +0 -0
  42. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/jh_utils.py +0 -0
  43. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/kibana/dashboards.json +0 -0
  44. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/kibana/readme.md +0 -0
  45. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/lang_utils.py +0 -0
  46. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/license_policies/c4-infrastructure.jsonc +0 -0
  47. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/license_policies/c4-python-infrastructure.jsonc +0 -0
  48. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/license_policies/park-lab-common-server.jsonc +0 -0
  49. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/license_policies/park-lab-common.jsonc +0 -0
  50. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/license_policies/park-lab-gpl-pipeline.jsonc +0 -0
  51. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/license_policies/park-lab-pipeline.jsonc +0 -0
  52. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/license_utils.py +0 -0
  53. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/log_utils.py +0 -0
  54. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/misc_utils.py +0 -0
  55. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/obfuscation_utils.py +0 -0
  56. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/opensearch_utils.py +0 -0
  57. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/portal_object_utils.py +0 -0
  58. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/portal_utils.py +0 -0
  59. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/progress_bar.py +0 -0
  60. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/project_utils.py +0 -0
  61. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/qa_checkers.py +0 -0
  62. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/qa_utils.py +0 -0
  63. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/redis_tools.py +0 -0
  64. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/redis_utils.py +0 -0
  65. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/s3_utils.py +0 -0
  66. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/schema_utils.py +0 -0
  67. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/scripts/publish_to_pypi.py +0 -0
  68. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/scripts/run_license_checker.py +0 -0
  69. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/secrets_utils.py +0 -0
  70. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/sheet_utils.py +0 -0
  71. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/snapshot_utils.py +0 -0
  72. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/ssl_certificate_utils.py +0 -0
  73. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/structured_data.py +0 -0
  74. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/submitr/progress_constants.py +0 -0
  75. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/submitr/ref_lookup_strategy.py +0 -0
  76. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/task_utils.py +0 -0
  77. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/tmpfile_utils.py +0 -0
  78. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/trace_utils.py +0 -0
  79. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/validation_utils.py +0 -0
  80. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/variant_utils.py +0 -0
  81. {dcicutils-8.14.0 → dcicutils-8.14.0.1b3}/dcicutils/zip_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dcicutils
3
- Version: 8.14.0
3
+ Version: 8.14.0.1b3
4
4
  Summary: Utility package for interacting with the 4DN Data Portal and other 4DN resources
5
5
  Home-page: https://github.com/4dn-dcic/utils
6
6
  License: MIT
@@ -19,7 +19,7 @@ from typing import Callable, List, Optional, Tuple, Union
19
19
  from dcicutils.command_utils import yes_or_no
20
20
  from dcicutils.common import ORCHESTRATED_APPS, APP_SMAHT
21
21
  from dcicutils.ff_utils import delete_metadata, purge_metadata
22
- from dcicutils.misc_utils import get_error_message, PRINT
22
+ from dcicutils.misc_utils import get_error_message, ignored, PRINT
23
23
  from dcicutils.portal_utils import Portal as PortalFromUtils
24
24
 
25
25
 
@@ -40,7 +40,7 @@ _DEFAULT_APP = "smaht"
40
40
  _SMAHT_ENV_ENVIRON_NAME = "SMAHT_ENV"
41
41
 
42
42
  # Schema properties to ignore (by default) for the view schema usage.
43
- _SCHEMAS_IGNORE_PROPERTIES = [
43
+ _IGNORE_PROPERTIES_ON_UPDATE = [
44
44
  "date_created",
45
45
  "last_modified",
46
46
  "principals_allowed",
@@ -122,6 +122,9 @@ def main():
122
122
  parser.add_argument("--upsert", type=str, required=False, default=None, help="Upsert data.")
123
123
  parser.add_argument("--delete", type=str, required=False, default=None, help="Delete data.")
124
124
  parser.add_argument("--purge", type=str, required=False, default=None, help="Purge data.")
125
+ parser.add_argument("--noignore", action="store_true", required=False, default=False,
126
+ help="Do not ignore standard fields on update(s).")
127
+ parser.add_argument("--ignore", nargs="+", help="Ignore these additional fields.")
125
128
  parser.add_argument("--confirm", action="store_true", required=False, default=False, help="Confirm before action.")
126
129
  parser.add_argument("--verbose", action="store_true", required=False, default=False, help="Verbose output.")
127
130
  parser.add_argument("--quiet", action="store_true", required=False, default=False, help="Quiet output.")
@@ -156,6 +159,7 @@ def main():
156
159
  explicit_schema_name=explicit_schema_name,
157
160
  update_function=post_data,
158
161
  update_action_name="POST",
162
+ noignore=args.noignore, ignore=args.ignore,
159
163
  confirm=args.confirm, verbose=args.verbose, quiet=args.quiet, debug=args.debug)
160
164
  if args.patch:
161
165
  _post_or_patch_or_upsert(portal=portal,
@@ -164,6 +168,7 @@ def main():
164
168
  update_function=patch_data,
165
169
  update_action_name="PATCH",
166
170
  patch_delete_fields=args.delete,
171
+ noignore=args.noignore, ignore=args.ignore,
167
172
  confirm=args.confirm, verbose=args.verbose, quiet=args.quiet, debug=args.debug)
168
173
  args.delete = None
169
174
  if args.upsert:
@@ -173,6 +178,7 @@ def main():
173
178
  update_function=upsert_data,
174
179
  update_action_name="UPSERT",
175
180
  patch_delete_fields=args.delete,
181
+ noignore=args.noignore, ignore=args.ignore,
176
182
  confirm=args.confirm, verbose=args.verbose, quiet=args.quiet, debug=args.debug)
177
183
  args.delete = None
178
184
 
@@ -196,6 +202,7 @@ def _post_or_patch_or_upsert(portal: Portal, file_or_directory: str,
196
202
  explicit_schema_name: str,
197
203
  update_function: Callable, update_action_name: str,
198
204
  patch_delete_fields: Optional[str] = None,
205
+ noignore: bool = False, ignore: Optional[List[str]] = None,
199
206
  confirm: bool = False, verbose: bool = False,
200
207
  quiet: bool = False, debug: bool = False) -> None:
201
208
 
@@ -222,6 +229,7 @@ def _post_or_patch_or_upsert(portal: Portal, file_or_directory: str,
222
229
  _print(f"DEBUG: File ({file}) contains an object of type: {schema_name}")
223
230
  update_function(portal, data, schema_name, file=file,
224
231
  patch_delete_fields=patch_delete_fields,
232
+ noignore=noignore, ignore=ignore,
225
233
  confirm=confirm, verbose=verbose, debug=debug)
226
234
  elif is_schema_name_list(portal, list(data.keys())):
227
235
  if debug:
@@ -233,6 +241,7 @@ def _post_or_patch_or_upsert(portal: Portal, file_or_directory: str,
233
241
  for index, item in enumerate(schema_data):
234
242
  update_function(portal, item, schema_name, file=file, index=index,
235
243
  patch_delete_fields=patch_delete_fields,
244
+ noignore=noignore, ignore=ignore,
236
245
  confirm=confirm, verbose=verbose, debug=debug)
237
246
  else:
238
247
  _print(f"WARNING: File ({file}) contains schema item which is not a list: {schema_name}")
@@ -244,6 +253,7 @@ def _post_or_patch_or_upsert(portal: Portal, file_or_directory: str,
244
253
  for index, item in enumerate(data):
245
254
  update_function(portal, item, schema_name, file=file, index=index,
246
255
  patch_delete_fields=patch_delete_fields,
256
+ noignore=noignore, ignore=ignore,
247
257
  confirm=confirm, verbose=verbose, debug=debug)
248
258
  if debug:
249
259
  _print(f"DEBUG: Processing {update_action_name} file done: {file}")
@@ -278,8 +288,10 @@ def _post_or_patch_or_upsert(portal: Portal, file_or_directory: str,
278
288
 
279
289
  def post_data(portal: Portal, data: dict, schema_name: str,
280
290
  file: Optional[str] = None, index: int = 0,
281
- patch_delete_fields: Optional[str] = None, # unused here
291
+ patch_delete_fields: Optional[str] = None,
292
+ noignore: bool = False, ignore: Optional[List[str]] = None,
282
293
  confirm: bool = False, verbose: bool = False, debug: bool = False) -> None:
294
+ ignored(patch_delete_fields)
283
295
  if not (identifying_path := portal.get_identifying_path(data, portal_type=schema_name)):
284
296
  if isinstance(file, str) and isinstance(index, int):
285
297
  _print(f"ERROR: Item for POST has no identifying property: {file} (#{index + 1})")
@@ -294,6 +306,7 @@ def post_data(portal: Portal, data: dict, schema_name: str,
294
306
  if verbose:
295
307
  _print(f"POST {schema_name} item: {identifying_path}")
296
308
  try:
309
+ data = _prune_data_for_update(data, noignore=noignore, ignore=ignore)
297
310
  portal.post_metadata(schema_name, data)
298
311
  if debug:
299
312
  _print(f"DEBUG: POST {schema_name} item done: {identifying_path}")
@@ -306,6 +319,7 @@ def post_data(portal: Portal, data: dict, schema_name: str,
306
319
  def patch_data(portal: Portal, data: dict, schema_name: str,
307
320
  file: Optional[str] = None, index: int = 0,
308
321
  patch_delete_fields: Optional[str] = None,
322
+ noignore: bool = False, ignore: Optional[List[str]] = None,
309
323
  confirm: bool = False, verbose: bool = False, debug: bool = False) -> None:
310
324
  if not (identifying_path := portal.get_identifying_path(data, portal_type=schema_name)):
311
325
  if isinstance(file, str) and isinstance(index, int):
@@ -323,6 +337,7 @@ def patch_data(portal: Portal, data: dict, schema_name: str,
323
337
  try:
324
338
  if delete_fields := _parse_delete_fields(patch_delete_fields):
325
339
  identifying_path += f"?delete_fields={delete_fields}"
340
+ data = _prune_data_for_update(data, noignore=noignore, ignore=ignore)
326
341
  portal.patch_metadata(identifying_path, data)
327
342
  if debug:
328
343
  _print(f"DEBUG: PATCH {schema_name} item OK: {identifying_path}")
@@ -335,6 +350,7 @@ def patch_data(portal: Portal, data: dict, schema_name: str,
335
350
  def upsert_data(portal: Portal, data: dict, schema_name: str,
336
351
  file: Optional[str] = None, index: int = 0,
337
352
  patch_delete_fields: Optional[str] = None,
353
+ noignore: bool = False, ignore: Optional[List[str]] = None,
338
354
  confirm: bool = False, verbose: bool = False, debug: bool = False) -> None:
339
355
  if not (identifying_path := portal.get_identifying_path(data, portal_type=schema_name)):
340
356
  if isinstance(file, str) and isinstance(index, int):
@@ -349,10 +365,12 @@ def upsert_data(portal: Portal, data: dict, schema_name: str,
349
365
  _print(f"{'PATCH' if exists else 'POST'} {schema_name} item: {identifying_path}")
350
366
  try:
351
367
  if not exists:
368
+ data = _prune_data_for_update(data, noignore=noignore, ignore=ignore)
352
369
  portal.post_metadata(schema_name, data)
353
370
  else:
354
371
  if delete_fields := _parse_delete_fields(patch_delete_fields):
355
372
  identifying_path += f"?delete_fields={delete_fields}"
373
+ data = _prune_data_for_update(data, noignore=noignore, ignore=ignore)
356
374
  portal.patch_metadata(identifying_path, data)
357
375
  if debug:
358
376
  _print(f"DEBUG: UPSERT {schema_name} item OK: {identifying_path}")
@@ -362,6 +380,15 @@ def upsert_data(portal: Portal, data: dict, schema_name: str,
362
380
  return
363
381
 
364
382
 
383
+ def _prune_data_for_update(data: dict, noignore: bool = False, ignore: Optional[List[str]] = None) -> dict:
384
+ ignore_these_properties = [] if noignore is True else _IGNORE_PROPERTIES_ON_UPDATE
385
+ if isinstance(ignore, list):
386
+ ignore_these_properties = ignore_these_properties + ignore
387
+ if not ignore_these_properties:
388
+ return data
389
+ return {key: value for key, value in data.items() if key not in ignore_these_properties}
390
+
391
+
365
392
  def _create_portal(env: Optional[str] = None, app: Optional[str] = None,
366
393
  verbose: bool = False, debug: bool = False) -> Optional[Portal]:
367
394
 
@@ -104,6 +104,7 @@ def main():
104
104
  parser.add_argument("--raw", action="store_true", required=False, default=False, help="Raw output.")
105
105
  parser.add_argument("--inserts", action="store_true", required=False, default=False,
106
106
  help="Format output for subsequent inserts.")
107
+ parser.add_argument("--ignore", nargs="+", help="Ignore these fields for --inserts.")
107
108
  parser.add_argument("--tree", action="store_true", required=False, default=False, help="Tree output for schemas.")
108
109
  parser.add_argument("--database", action="store_true", required=False, default=False,
109
110
  help="Read from database output.")
@@ -191,7 +192,7 @@ def main():
191
192
  return
192
193
 
193
194
  data = _get_portal_object(portal=portal, uuid=args.uuid, raw=args.raw, inserts=args.inserts,
194
- database=args.database, check=args.bool, verbose=args.verbose)
195
+ ignore=args.ignore, database=args.database, check=args.bool, verbose=args.verbose)
195
196
  if args.bool:
196
197
  if data:
197
198
  _print(f"{args.uuid}: found")
@@ -242,7 +243,15 @@ def _create_portal(ini: str, env: Optional[str] = None,
242
243
 
243
244
  def _get_portal_object(portal: Portal, uuid: str,
244
245
  raw: bool = False, inserts: bool = False, database: bool = False,
246
+ ignore: Optional[List[str]] = None,
245
247
  check: bool = False, verbose: bool = False) -> dict:
248
+
249
+ def prune_data(data: dict) -> dict:
250
+ nonlocal ignore
251
+ if not isinstance(ignore, list) or not ignore:
252
+ return data
253
+ return {key: value for key, value in data.items() if key not in ignore}
254
+
246
255
  response = None
247
256
  try:
248
257
  if not uuid.startswith("/"):
@@ -279,13 +288,32 @@ def _get_portal_object(portal: Portal, uuid: str,
279
288
  if not ((supertypes := portal.get_schemas_super_type_map()) and (subtypes := supertypes.get(results_type))):
280
289
  subtypes = None
281
290
  response = {}
291
+ results_index = 0
292
+ results_total = len(results)
293
+ def get_metadata_for_individual_result_type(uuid: str) -> Optional[dict]: # noqa
294
+ # There can be a lot of individual results for which we may need to get the actual type,
295
+ # so do this in a function we were can give verbose output feedback.
296
+ nonlocal portal, results_index, results_total, verbose
297
+ if verbose:
298
+ _print(f"Getting actual type for {results_type} result:"
299
+ f" {uuid} [{results_index} of {results_total}]", end="")
300
+ result = portal.get_metadata(uuid, raise_exception=False)
301
+ if (isinstance(result_types := result.get("@type"), list) and
302
+ result_types and (result_type := result_types[0])): # noqa
303
+ if verbose:
304
+ _print(f" -> {result_type}")
305
+ return result_type
306
+ if verbose:
307
+ _print()
308
+ return None
282
309
  for result in results:
310
+ results_index += 1
283
311
  result.pop("schema_version", None)
312
+ result = prune_data(result)
284
313
  if (subtypes and
285
314
  (result_uuid := result.get("uuid")) and
286
- (individual_result := portal.get_metadata(result_uuid, raise_exception=False)) and
287
- isinstance(result_type:= individual_result.get("@type"), list) and result_type and result_type[0]): # noqa
288
- result_type = result_type[0]
315
+ (individual_result_type := get_metadata_for_individual_result_type(result_uuid))): # noqa
316
+ result_type = individual_result_type
289
317
  else:
290
318
  result_type = results_type
291
319
  if response.get(result_type):
@@ -295,7 +323,7 @@ def _get_portal_object(portal: Portal, uuid: str,
295
323
  # Get the result as non-raw so we can get its type.
296
324
  elif ((response_cooked := portal.get(path, database=database)) and
297
325
  (isinstance(response_type := response_cooked.json().get("@type"), list) and response_type)):
298
- response = {f"{response_type[0]}": [response]}
326
+ response = {f"{response_type[0]}": [prune_data(response)]}
299
327
  elif raw:
300
328
  response.pop("schema_version", None)
301
329
  return response
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "dcicutils"
3
- version = "8.14.0"
3
+ version = "8.14.0.1b3" # TODO: To become 8.14.1
4
4
  description = "Utility package for interacting with the 4DN Data Portal and other 4DN resources"
5
5
  authors = ["4DN-DCIC Team <support@4dnucleome.org>"]
6
6
  license = "MIT"
File without changes
File without changes