dcicutils 8.8.3.1b15__tar.gz → 8.8.3.1b17__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/PKG-INFO +1 -1
  2. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/captured_output.py +2 -0
  3. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/progress_bar.py +9 -1
  4. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/structured_data.py +17 -3
  5. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/pyproject.toml +1 -1
  6. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/LICENSE.txt +0 -0
  7. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/README.rst +0 -0
  8. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/__init__.py +0 -0
  9. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/base.py +0 -0
  10. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/beanstalk_utils.py +0 -0
  11. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/bundle_utils.py +0 -0
  12. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/cloudformation_utils.py +0 -0
  13. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/codebuild_utils.py +0 -0
  14. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/command_utils.py +0 -0
  15. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/common.py +0 -0
  16. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/contribution_scripts.py +0 -0
  17. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/contribution_utils.py +0 -0
  18. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/creds_utils.py +0 -0
  19. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/data_readers.py +0 -0
  20. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/data_utils.py +0 -0
  21. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/datetime_utils.py +0 -0
  22. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/deployment_utils.py +0 -0
  23. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/diff_utils.py +0 -0
  24. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/docker_utils.py +0 -0
  25. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/ecr_scripts.py +0 -0
  26. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/ecr_utils.py +0 -0
  27. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/ecs_utils.py +0 -0
  28. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/env_base.py +0 -0
  29. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/env_manager.py +0 -0
  30. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/env_scripts.py +0 -0
  31. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/env_utils.py +0 -0
  32. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/env_utils_legacy.py +0 -0
  33. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/es_utils.py +0 -0
  34. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/exceptions.py +0 -0
  35. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/ff_mocks.py +0 -0
  36. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/ff_utils.py +0 -0
  37. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/file_utils.py +0 -0
  38. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/function_cache_decorator.py +0 -0
  39. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/glacier_utils.py +0 -0
  40. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/jh_utils.py +0 -0
  41. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/kibana/dashboards.json +0 -0
  42. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/kibana/readme.md +0 -0
  43. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/lang_utils.py +0 -0
  44. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/license_policies/c4-infrastructure.jsonc +0 -0
  45. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/license_policies/c4-python-infrastructure.jsonc +0 -0
  46. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/license_policies/park-lab-common-server.jsonc +0 -0
  47. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/license_policies/park-lab-common.jsonc +0 -0
  48. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/license_policies/park-lab-gpl-pipeline.jsonc +0 -0
  49. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/license_policies/park-lab-pipeline.jsonc +0 -0
  50. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/license_utils.py +0 -0
  51. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/log_utils.py +0 -0
  52. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/misc_utils.py +0 -0
  53. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/obfuscation_utils.py +0 -0
  54. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/opensearch_utils.py +0 -0
  55. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/portal_object_utils.py +0 -0
  56. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/portal_utils.py +0 -0
  57. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/project_utils.py +0 -0
  58. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/qa_checkers.py +0 -0
  59. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/qa_utils.py +0 -0
  60. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/redis_tools.py +0 -0
  61. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/redis_utils.py +0 -0
  62. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/s3_utils.py +0 -0
  63. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/schema_utils.py +0 -0
  64. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/scripts/publish_to_pypi.py +0 -0
  65. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/scripts/run_license_checker.py +0 -0
  66. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/scripts/view_portal_object.py +0 -0
  67. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/secrets_utils.py +0 -0
  68. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/sheet_utils.py +0 -0
  69. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/snapshot_utils.py +0 -0
  70. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/ssl_certificate_utils.py +0 -0
  71. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/submitr/progress_constants.py +0 -0
  72. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/submitr/ref_lookup_strategy.py +0 -0
  73. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/task_utils.py +0 -0
  74. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/tmpfile_utils.py +0 -0
  75. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/trace_utils.py +0 -0
  76. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/validation_utils.py +0 -0
  77. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/variant_utils.py +0 -0
  78. {dcicutils-8.8.3.1b15 → dcicutils-8.8.3.1b17}/dcicutils/zip_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dcicutils
3
- Version: 8.8.3.1b15
3
+ Version: 8.8.3.1b17
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
@@ -24,6 +24,8 @@ def captured_output(capture: bool = True, encoding: Optional[str] = None):
24
24
 
25
25
  original_stdout = _real_stdout
26
26
  original_stderr = _real_stderr
27
+ # FYI: This encoding business with _EncodedStringIO was introduced (circa April 2024)
28
+ # when ran into issues unit testing progress_bar which outputs those funny block characters.
27
29
  captured_output = io.StringIO() if not encoding else _EncodedStringIO(encoding)
28
30
 
29
31
  def set_original_output() -> None:
@@ -335,7 +335,15 @@ class ProgressBar:
335
335
  nonlocal sys_stdout_write
336
336
  if sys_stdout_write is not None:
337
337
  sys.stdout.write = sys_stdout_write
338
+ def ascii_spinners() -> list: # noqa
339
+ # Fun with ASCII spinners.
340
+ return list("⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏") # borrowed from rich python package
341
+ # return list("⣾⣽⣻⢿⡿⣟⣯⣷") # borrowed from rich python package
342
+ # return list("⠿⠻⠽⠾⠷⠯⠟")
343
+ # return list("⠏⠛⠹⠼⠶⠧")
344
+ # return list("⠻⠽⠾⠷⠯⠟")
345
+ # return list("|/—◦\\")
338
346
  sys.stdout.write = tidy_stdout_write
339
- spina = ["|", "/", "—", "◦", "\\"] ; spini = 0 ; spinn = len(spina) # noqa
347
+ spina = ascii_spinners() ; spini = 0 ; spinn = len(spina) # noqa
340
348
  sentinel = "[progress]" ; sentinel_internal = f"{sentinel}:" # noqa
341
349
  return namedtuple("tidy_output_hack", ["restore", "sentinel"])(restore_stdout_write, sentinel)
@@ -174,6 +174,18 @@ class StructuredDataSet:
174
174
  result = []
175
175
  if self._norefs:
176
176
  for ref in self._resolved_refs:
177
+ # The structure of this self._resolved_refs is setup in Schema._map_function_ref,
178
+ # which is called whenever a reference (linkTo) is encountered. It is a set of
179
+ # tuples containing three items: [0] the ref path, [1] its uuid (if applicable),
180
+ # and [2] its src. The src identifies the place where this ref occurred and is a
181
+ # dictionary containing file, type, column, and row properties. For this case, of
182
+ # norefs (i.e. unchecked refs), the uuid ([1]) is None because we are skipping
183
+ # ref resolution. But the src is actually a *string* dump of the dictionary, only
184
+ # because dictionaries cannot be put in a set (which is what _resolved_refs is);
185
+ # this dump is also done in Schema._map_function_ref (should probably change this
186
+ # to be a list to avoid this - TODO); we only even store this src info for this
187
+ # norefs case, as not really needed otherwise. This is just to support the
188
+ # useful-for-troublehsooting options --info --refs for smaht-submitr.
177
189
  if len(ref) >= 3 and (ref_path := ref[0]) and (ref_src := load_json(ref[2])):
178
190
  if existing_ref := [item for item in result if item.get("path") == ref_path]:
179
191
  existing_ref[0]["srcs"].append(ref_src)
@@ -681,9 +693,11 @@ class Schema(SchemaBase):
681
693
  # Here the caller has specified the (StructuredDataSet) norefs option
682
694
  # which means we do not check for the existence of references at all.
683
695
  if value:
684
- # Dump the src as a JSON string because a dictionary cannot be added to a set; note
685
- # that this is ONLY used for smaht-submitr/submit-metadata-bundle --info --refs.
686
- # This info can be gotten at using StructureDataSet.unchecked_refs.
696
+ # Dump the src as a JSON string because a dictionary cannot be added to a set;
697
+ # this is ONLY used for smaht-submitr/submit-metadata-bundle --info --refs.
698
+ # This info exposed via StructureDataSet.unchecked_refs. TODO: Should probably
699
+ # make this not a set type so we dont' have to do this dump (and corresponding
700
+ # load, in StructureDataSet.unchecked_refs).
687
701
  self._resolved_refs.add((f"/{link_to}/{value}", None,
688
702
  json.dumps(src) if isinstance(src, dict) else None))
689
703
  return value
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "dcicutils"
3
- version = "8.8.3.1b15" # TODO: To become 8.8.4
3
+ version = "8.8.3.1b17" # TODO: To become 8.8.4
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"