dcicutils 8.14.0.1b5__py3-none-any.whl → 8.14.0.1b6__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -251,7 +251,6 @@ def _post_or_patch_or_upsert(portal: Portal, file_or_directory: str,
251
251
  elif isinstance(data, list):
252
252
  if debug:
253
253
  _print(f"DEBUG: File ({file}) contains a list of objects of type: {schema_name}")
254
- import pdb ; pdb.set_trace() # noqa
255
254
  data = _impose_special_ordering(data, schema_name)
256
255
  for index, item in enumerate(data):
257
256
  update_function(portal, item, schema_name, file=file, index=index,
@@ -347,19 +347,18 @@ def _get_portal_object(portal: Portal, uuid: str,
347
347
  schema_data = response[schema_name]
348
348
  file_name = f"{to_snake_case(schema_name)}.json"
349
349
  file_path = os.path.join(output_directory, file_name)
350
+ message_verb = "Writing"
350
351
  if os.path.exists(file_path):
352
+ message_verb = "Overwriting"
351
353
  if os.path.isdir(file_path):
352
354
  _print(f"WARNING: Output file already exists as a directory. SKIPPING: {file_path}")
353
355
  continue
354
- if force:
355
- if verbose:
356
- _print(f"Overwriting extant file (per --force option): {file_path}")
357
- else:
356
+ if not force:
358
357
  _print(f"Output file already exists: {file_path}")
359
- if (not force) and not yes_or_no(f"Overwrite this file?"):
360
- continue
358
+ if not yes_or_no(f"Overwrite this file?"):
359
+ continue
361
360
  if verbose:
362
- _print(f"Writing {schema_name} (object{'s' if len(schema_data) != 1 else ''}:"
361
+ _print(f"{message_verb} {schema_name} (object{'s' if len(schema_data) != 1 else ''}:"
363
362
  f" {len(schema_data)}) file: {file_path}")
364
363
  with io.open(file_path, "w") as f:
365
364
  json.dump(schema_data, f, indent=4)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dcicutils
3
- Version: 8.14.0.1b5
3
+ Version: 8.14.0.1b6
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
@@ -60,8 +60,8 @@ 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=bkadJlw3pJGLid8GXrNiZG0PWD9hvy4klGUNQhgjRhI,22610
64
- dcicutils/scripts/view_portal_object.py,sha256=RgNlX-AObLlOQ8flc3MxFAxsaXqMsswkH_jLsGLUScE,35778
63
+ dcicutils/scripts/update_portal_object.py,sha256=5ET0RtwSgIPt5z7WiSf_UuEow-J2Bs-GEpmvria09Pg,22557
64
+ dcicutils/scripts/view_portal_object.py,sha256=kgnw3HhSBTD1it2W54dLq2igoae2GkwK-Ebj3KQm8Po,35712
65
65
  dcicutils/secrets_utils.py,sha256=8dppXAsiHhJzI6NmOcvJV5ldvKkQZzh3Fl-cb8Wm7MI,19745
66
66
  dcicutils/sheet_utils.py,sha256=VlmzteONW5VF_Q4vo0yA5vesz1ViUah1MZ_yA1rwZ0M,33629
67
67
  dcicutils/snapshot_utils.py,sha256=YDeI3vD-MhAtHwKDzfEm2q-n3l-da2yRpRR3xp0Ah1M,23021
@@ -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.1b5.dist-info/LICENSE.txt,sha256=qnwSmfnEWMl5l78VPDEzAmEbLVrRqQvfUQiHT0ehrOo,1102
79
- dcicutils-8.14.0.1b5.dist-info/METADATA,sha256=V2K3KDP_z_RIjiAwxfAfxg3t0X-htcbhpo-1EmJtH5I,3439
80
- dcicutils-8.14.0.1b5.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
81
- dcicutils-8.14.0.1b5.dist-info/entry_points.txt,sha256=W6kEWdUJk9tQ4myAgpehPdebcwvCAZ7UgB-wyPgDUMg,335
82
- dcicutils-8.14.0.1b5.dist-info/RECORD,,
78
+ dcicutils-8.14.0.1b6.dist-info/LICENSE.txt,sha256=qnwSmfnEWMl5l78VPDEzAmEbLVrRqQvfUQiHT0ehrOo,1102
79
+ dcicutils-8.14.0.1b6.dist-info/METADATA,sha256=QQ8SkV0WUakZ5gvmx54fyeVABChklVyyVtMtmY_AoBg,3439
80
+ dcicutils-8.14.0.1b6.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
81
+ dcicutils-8.14.0.1b6.dist-info/entry_points.txt,sha256=W6kEWdUJk9tQ4myAgpehPdebcwvCAZ7UgB-wyPgDUMg,335
82
+ dcicutils-8.14.0.1b6.dist-info/RECORD,,