dcicutils 8.14.0.1b14__tar.gz → 8.14.0.1b16__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.1b14 → dcicutils-8.14.0.1b16}/PKG-INFO +1 -1
  2. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/scripts/update_portal_object.py +90 -62
  3. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/pyproject.toml +1 -1
  4. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/LICENSE.txt +0 -0
  5. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/README.rst +0 -0
  6. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/__init__.py +0 -0
  7. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/base.py +0 -0
  8. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/beanstalk_utils.py +0 -0
  9. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/bundle_utils.py +0 -0
  10. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/captured_output.py +0 -0
  11. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/cloudformation_utils.py +0 -0
  12. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/codebuild_utils.py +0 -0
  13. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/command_utils.py +0 -0
  14. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/common.py +0 -0
  15. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/contribution_scripts.py +0 -0
  16. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/contribution_utils.py +0 -0
  17. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/creds_utils.py +0 -0
  18. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/data_readers.py +0 -0
  19. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/data_utils.py +0 -0
  20. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/datetime_utils.py +0 -0
  21. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/deployment_utils.py +0 -0
  22. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/diff_utils.py +0 -0
  23. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/docker_utils.py +0 -0
  24. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/ecr_scripts.py +0 -0
  25. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/ecr_utils.py +0 -0
  26. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/ecs_utils.py +0 -0
  27. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/env_base.py +0 -0
  28. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/env_manager.py +0 -0
  29. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/env_scripts.py +0 -0
  30. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/env_utils.py +0 -0
  31. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/env_utils_legacy.py +0 -0
  32. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/es_utils.py +0 -0
  33. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/exceptions.py +0 -0
  34. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/ff_mocks.py +0 -0
  35. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/ff_utils.py +0 -0
  36. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/file_utils.py +0 -0
  37. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/function_cache_decorator.py +0 -0
  38. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/glacier_utils.py +0 -0
  39. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/hack_for_elasticsearch_numpy_usage.py +0 -0
  40. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/http_utils.py +0 -0
  41. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/jh_utils.py +0 -0
  42. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/kibana/dashboards.json +0 -0
  43. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/kibana/readme.md +0 -0
  44. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/lang_utils.py +0 -0
  45. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/license_policies/c4-infrastructure.jsonc +0 -0
  46. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/license_policies/c4-python-infrastructure.jsonc +0 -0
  47. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/license_policies/park-lab-common-server.jsonc +0 -0
  48. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/license_policies/park-lab-common.jsonc +0 -0
  49. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/license_policies/park-lab-gpl-pipeline.jsonc +0 -0
  50. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/license_policies/park-lab-pipeline.jsonc +0 -0
  51. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/license_utils.py +0 -0
  52. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/log_utils.py +0 -0
  53. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/misc_utils.py +0 -0
  54. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/obfuscation_utils.py +0 -0
  55. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/opensearch_utils.py +0 -0
  56. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/portal_object_utils.py +0 -0
  57. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/portal_utils.py +0 -0
  58. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/progress_bar.py +0 -0
  59. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/project_utils.py +0 -0
  60. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/qa_checkers.py +0 -0
  61. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/qa_utils.py +0 -0
  62. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/redis_tools.py +0 -0
  63. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/redis_utils.py +0 -0
  64. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/s3_utils.py +0 -0
  65. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/schema_utils.py +0 -0
  66. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/scripts/publish_to_pypi.py +0 -0
  67. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/scripts/run_license_checker.py +0 -0
  68. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/scripts/view_portal_object.py +0 -0
  69. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/secrets_utils.py +0 -0
  70. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/sheet_utils.py +0 -0
  71. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/snapshot_utils.py +0 -0
  72. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/ssl_certificate_utils.py +0 -0
  73. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/structured_data.py +0 -0
  74. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/submitr/progress_constants.py +0 -0
  75. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/submitr/ref_lookup_strategy.py +0 -0
  76. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/task_utils.py +0 -0
  77. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/tmpfile_utils.py +0 -0
  78. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/trace_utils.py +0 -0
  79. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/validation_utils.py +0 -0
  80. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/dcicutils/variant_utils.py +0 -0
  81. {dcicutils-8.14.0.1b14 → dcicutils-8.14.0.1b16}/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.1b14
3
+ Version: 8.14.0.1b16
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
@@ -17,8 +17,9 @@ import re
17
17
  import shutil
18
18
  import sys
19
19
  from typing import Callable, List, Optional, Tuple, Union
20
+ from dcicutils.captured_output import captured_output
20
21
  from dcicutils.command_utils import yes_or_no
21
- from dcicutils.common import ORCHESTRATED_APPS, APP_SMAHT
22
+ from dcicutils.common import ORCHESTRATED_APPS, APP_CGAP, APP_FOURFRONT, APP_SMAHT
22
23
  from dcicutils.ff_utils import delete_metadata, purge_metadata
23
24
  from dcicutils.misc_utils import get_error_message, ignored, PRINT, to_camel_case, to_snake_case
24
25
  from dcicutils.portal_utils import Portal as PortalFromUtils
@@ -145,30 +146,16 @@ def main():
145
146
  parser.print_help()
146
147
  sys.exit(1)
147
148
 
148
- if app := args.app:
149
- if (app not in ORCHESTRATED_APPS) and ((app := app.lower()) not in ORCHESTRATED_APPS):
150
- usage(f"ERROR: Unknown app name; must be one of: {' | '.join(ORCHESTRATED_APPS)}")
151
- else:
152
- app = APP_SMAHT
153
-
154
149
  if not (args.post or args.patch or args.upsert or args.delete or args.purge or args.load):
155
150
  usage()
156
151
 
152
+ if not (portal := _create_portal(env=args.env, ini=args.ini, app=args.app, load=args.load,
153
+ verbose=args.verbose, debug=args.debug, quiet=args.quiet)):
154
+ exit(1)
155
+
157
156
  if args.load:
158
- if args.post or args.patch or args.upsert or args.delete or args.purge:
159
- _print("Cannot use any other update option"
160
- "when using the --load option (to load data via snovault.loadxl).")
161
- exit(1)
162
- if args.env:
163
- if args.ini:
164
- _print("The --env is not used for the --load option (to load data via snovault.loadxl).")
165
- args.ini = args.env
166
- if not _load_data(load=args.load, ini_file=args.ini, explicit_schema_name=args.schema,
167
- verbose=args.verbose, debug=args.debug, noprogress=args.noprogress):
168
- exit(1)
169
- exit(0)
170
-
171
- portal = _create_portal(env=args.env, app=app, verbose=args.verbose, debug=args.debug)
157
+ _load_data(portal=portal, load=args.load, ini_file=args.ini, explicit_schema_name=args.schema,
158
+ verbose=args.verbose, debug=args.debug, noprogress=args.noprogress)
172
159
 
173
160
  if explicit_schema_name := args.schema:
174
161
  schema, explicit_schema_name = _get_schema(portal, explicit_schema_name)
@@ -402,17 +389,18 @@ def _upsert_data(portal: Portal, data: dict, schema_name: str,
402
389
  return
403
390
 
404
391
 
405
- def _load_data(load: str, ini_file: str, explicit_schema_name: Optional[str] = None,
392
+ def _load_data(portal: Portal, load: str, ini_file: str, explicit_schema_name: Optional[str] = None,
406
393
  verbose: bool = False, debug: bool = False, noprogress: bool = False,
407
- _portal: Optional[Portal] = None, _single_insert_file: Optional[str] = None) -> bool:
394
+ _single_insert_file: Optional[str] = None) -> bool:
408
395
 
409
396
  from snovault.loadxl import load_all_gen, LoadGenWrapper
410
- from dcicutils.captured_output import captured_output
411
397
  from dcicutils.progress_bar import ProgressBar
412
398
 
399
+ loadxl_summary = {}
400
+
413
401
  def loadxl(portal: Portal, inserts_directory: str, schema_names_to_load: dict):
414
402
 
415
- nonlocal LoadGenWrapper, load_all_gen, verbose, debug
403
+ nonlocal LoadGenWrapper, load_all_gen, loadxl_summary, verbose, debug
416
404
  progress_total = sum(schema_names_to_load.values()) * 2 # loadxl does two passes
417
405
  progress_bar = ProgressBar(progress_total, interrupt_exit=True) if not noprogress else None
418
406
 
@@ -452,6 +440,9 @@ def _load_data(load: str, ini_file: str, explicit_schema_name: Optional[str] = N
452
440
  if progress_bar:
453
441
  progress_bar.set_description(f"▶ {to_camel_case(current_item_type)}: {action}")
454
442
  current_item_count += 1
443
+ if loadxl_summary.get(current_item_type, None) is None:
444
+ loadxl_summary[current_item_type] = 0
445
+ loadxl_summary[current_item_type] += 1
455
446
  if progress_bar:
456
447
  progress_bar.set_progress(total_item_count)
457
448
  elif debug:
@@ -460,16 +451,11 @@ def _load_data(load: str, ini_file: str, explicit_schema_name: Optional[str] = N
460
451
  progress_bar.set_description("▶ Load Complete")
461
452
  print()
462
453
 
463
- if not ini_file:
464
- ini_file = _DEFAULT_INI_FILE_FOR_LOAD
465
- if not os.path.isabs(ini_file := os.path.expanduser(ini_file)):
466
- ini_file = os.path.join(os.getcwd(), ini_file)
467
- if not os.path.exists(ini_file):
468
- _print(f"The INI file required for --load is not found: {ini_file}")
469
- exit(1)
470
-
471
- if not os.path.isabs(load := os.path.expanduser(load)):
472
- load = os.path.join(os.getcwd(), load)
454
+ if not portal.vapp:
455
+ _print("Must using INI based Portal object with --load (use --ini option to specify an INI file).")
456
+ return False
457
+ if not os.path.isabs(load := os.path.normpath(os.path.expanduser(load))):
458
+ load = os.path.normpath(os.path.join(os.getcwd(), load))
473
459
  if not os.path.exists(load):
474
460
  return False
475
461
 
@@ -480,10 +466,6 @@ def _load_data(load: str, ini_file: str, explicit_schema_name: Optional[str] = N
480
466
  inserts_directory = None
481
467
  inserts_file = load
482
468
 
483
- if not (portal := _portal):
484
- with captured_output(not debug):
485
- portal = Portal(ini_file)
486
-
487
469
  if inserts_file:
488
470
  with io.open(inserts_file, "r") as f:
489
471
  try:
@@ -503,9 +485,9 @@ def _load_data(load: str, ini_file: str, explicit_schema_name: Optional[str] = N
503
485
  file_name = os.path.join(tmpdir, f"{to_snake_case(schema_name)}.json")
504
486
  with io.open(file_name, "w") as f:
505
487
  json.dump(data, f)
506
- return _load_data(load=tmpdir, ini_file=ini_file, explicit_schema_name=schema_name,
488
+ return _load_data(portal=portal, load=tmpdir, ini_file=ini_file, explicit_schema_name=schema_name,
507
489
  verbose=verbose, debug=debug, noprogress=noprogress,
508
- _portal=portal, _single_insert_file=inserts_file)
490
+ _single_insert_file=inserts_file)
509
491
  elif isinstance(data, dict):
510
492
  if schema_name := explicit_schema_name:
511
493
  if _is_schema_name_list(portal, schema_names := list(data.keys())):
@@ -530,20 +512,20 @@ def _load_data(load: str, ini_file: str, explicit_schema_name: Optional[str] = N
530
512
  json.dump(schema_data, f)
531
513
  nfiles += 1
532
514
  if nfiles > 0:
533
- return _load_data(load=tmpdir, ini_file=ini_file,
515
+ return _load_data(portal=portal, load=tmpdir, ini_file=ini_file,
534
516
  verbose=verbose, debug=debug, noprogress=noprogress,
535
- _portal=portal, _single_insert_file=inserts_file)
517
+ _single_insert_file=inserts_file)
536
518
  return True
537
519
  else:
538
520
  _print(f"Unrecognized JSON data in file: {inserts_file}")
539
521
  return False
540
522
  return True
523
+
541
524
  if verbose:
542
525
  if _single_insert_file:
543
526
  _print(f"Loading data into Portal (via snovault.loadxl) from file: {_single_insert_file}")
544
527
  else:
545
528
  _print(f"Loading data into Portal (via snovault.loadxl) from directory: {inserts_directory}")
546
- _print(f"Portal INI file for load is: {ini_file}")
547
529
 
548
530
  schema_names = list(_get_schemas(portal).keys())
549
531
  schema_snake_case_names = [to_snake_case(item) for item in schema_names]
@@ -585,11 +567,15 @@ def _load_data(load: str, ini_file: str, explicit_schema_name: Optional[str] = N
585
567
  loadxl(portal=portal, inserts_directory=tmpdir, schema_names_to_load=schema_names_to_load)
586
568
  else:
587
569
  loadxl(portal=portal, inserts_directory=inserts_directory, schema_names_to_load=schema_names_to_load)
570
+
588
571
  if verbose:
589
572
  if _single_insert_file:
590
573
  _print(f"Done loading data into Portal (via snovault.loadxl) from file: {_single_insert_file}")
591
574
  else:
592
575
  _print(f"Done loading data into Portal (via snovault.loadxl) from directory: {inserts_directory}")
576
+ for item in sorted(loadxl_summary.keys()):
577
+ _print(f"▷ {to_camel_case(item)}: {loadxl_summary[item]}")
578
+
593
579
  return True
594
580
 
595
581
 
@@ -611,25 +597,67 @@ def _prune_data_for_update(data: dict, noignore: bool = False, ignore: Optional[
611
597
  return {key: value for key, value in data.items() if key not in ignore_these_properties}
612
598
 
613
599
 
614
- def _create_portal(env: Optional[str] = None, app: Optional[str] = None,
615
- verbose: bool = False, debug: bool = False) -> Optional[Portal]:
600
+ def _create_portal(env: Optional[str] = None, ini: Optional[str] = None, app: Optional[str] = None,
601
+ load: Optional[str] = None, verbose: bool = False, debug: bool = False,
602
+ quiet: bool = False) -> Optional[Portal]:
603
+
604
+ if app:
605
+ if (app not in ORCHESTRATED_APPS) and ((app := app.lower()) not in ORCHESTRATED_APPS):
606
+ _print(f"Unknown app name; must be one of: {' | '.join(ORCHESTRATED_APPS)}")
607
+ return None
608
+ elif APP_SMAHT in (env or os.environ.get(_SMAHT_ENV_ENVIRON_NAME) or ""):
609
+ app = APP_SMAHT
610
+ elif APP_CGAP in (env or ""):
611
+ app = APP_CGAP
612
+ elif APP_FOURFRONT in (env or ""):
613
+ app = APP_FOURFRONT
614
+
615
+ if ini:
616
+ if env:
617
+ if not quiet:
618
+ _print("Ignoring --env option when --ini option is given.")
619
+ elif (app == _SMAHT_ENV_ENVIRON_NAME) and (env := os.environ.get(_SMAHT_ENV_ENVIRON_NAME)):
620
+ if not quiet:
621
+ _print(f"Ignoring SMAHT_ENV environment variable ({env}) when --ini option is given.")
622
+ if not os.path.isabs(ini_file := os.path.normpath(os.path.expanduser(ini))):
623
+ ini_file = os.path.normpath(os.path.join(os.getcwd(), ini_file))
624
+ if not os.path.exists(ini_file):
625
+ _print(f"Specified Portal INI file not found: {ini_file}")
626
+ return None
627
+ with captured_output(not debug):
628
+ if not (portal := Portal(ini_file, app=app)):
629
+ _print(f"Cannot create INI based Portal object: {env} ({app})")
630
+ return None
631
+ else:
632
+ env_from_environ = False
633
+ if not env and app:
634
+ # If the --load option is specified, and no --ini option is specified, then do NOT default
635
+ # to using the SMAHT_ENV environment variable (if set) for an access-key based Portal
636
+ # object; rather default to the default INI file (i.e. development.ini).
637
+ if (not load) and (app == APP_SMAHT) and (env := os.environ.get(_SMAHT_ENV_ENVIRON_NAME)):
638
+ env_from_environ = True
639
+ if not env:
640
+ if os.path.exists(ini_file := os.path.normpath(os.path.join(os.getcwd(), _DEFAULT_INI_FILE_FOR_LOAD))):
641
+ return _create_portal(ini=ini_file, app=app, verbose=verbose, debug=debug)
642
+ return None
643
+ if not (portal := Portal(env, app=app) if env or app else None):
644
+ _print(f"Cannot create access-key based Portal object: {env}{f' ({app})' if app else ''}")
645
+ return None
646
+
647
+ if (ini_file := portal.ini_file):
648
+ if not quiet:
649
+ _print(f"Portal environment: {ini_file}")
650
+ elif (env := portal.env) or (env := os.environ.get(_SMAHT_ENV_ENVIRON_NAME)):
651
+ _print(f"Portal environment"
652
+ f"{f' (from {_SMAHT_ENV_ENVIRON_NAME})' if env_from_environ else ''}: {portal.env}")
653
+ if verbose:
654
+ if portal.keys_file:
655
+ _print(f"Portal keys file: {portal.keys_file}")
656
+ if portal.key_id:
657
+ _print(f"Portal key prefix: {portal.key_id[0:2]}******")
658
+ if portal.server:
659
+ _print(f"Portal server: {portal.server}")
616
660
 
617
- env_from_environ = None
618
- if not env and (app == APP_SMAHT):
619
- if env := os.environ.get(_SMAHT_ENV_ENVIRON_NAME):
620
- env_from_environ = True
621
- if not (portal := Portal(env, app=app) if env or app else None):
622
- return None
623
- if verbose:
624
- if (env := portal.env) or (env := os.environ(_SMAHT_ENV_ENVIRON_NAME)):
625
- _print(f"Portal environment"
626
- f"{f' (from {_SMAHT_ENV_ENVIRON_NAME})' if env_from_environ else ''}: {portal.env}")
627
- if portal.keys_file:
628
- _print(f"Portal keys file: {portal.keys_file}")
629
- if portal.key_id:
630
- _print(f"Portal key prefix: {portal.key_id[0:2]}******")
631
- if portal.server:
632
- _print(f"Portal server: {portal.server}")
633
661
  return portal
634
662
 
635
663
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "dcicutils"
3
- version = "8.14.0.1b14" # TODO: To become 8.14.1
3
+ version = "8.14.0.1b16" # 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"