dcicutils 8.8.1.1b15__tar.gz → 8.8.1.1b17__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/PKG-INFO +1 -1
  2. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/progress_constants.py +10 -4
  3. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/structured_data.py +26 -26
  4. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/pyproject.toml +1 -1
  5. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/LICENSE.txt +0 -0
  6. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/README.rst +0 -0
  7. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/__init__.py +0 -0
  8. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/base.py +0 -0
  9. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/beanstalk_utils.py +0 -0
  10. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/bundle_utils.py +0 -0
  11. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/captured_output.py +0 -0
  12. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/cloudformation_utils.py +0 -0
  13. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/codebuild_utils.py +0 -0
  14. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/command_utils.py +0 -0
  15. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/common.py +0 -0
  16. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/contribution_scripts.py +0 -0
  17. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/contribution_utils.py +0 -0
  18. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/creds_utils.py +0 -0
  19. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/data_readers.py +0 -0
  20. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/data_utils.py +0 -0
  21. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/datetime_utils.py +0 -0
  22. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/deployment_utils.py +0 -0
  23. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/diff_utils.py +0 -0
  24. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/docker_utils.py +0 -0
  25. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/ecr_scripts.py +0 -0
  26. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/ecr_utils.py +0 -0
  27. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/ecs_utils.py +0 -0
  28. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/env_base.py +0 -0
  29. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/env_manager.py +0 -0
  30. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/env_scripts.py +0 -0
  31. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/env_utils.py +0 -0
  32. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/env_utils_legacy.py +0 -0
  33. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/es_utils.py +0 -0
  34. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/exceptions.py +0 -0
  35. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/ff_mocks.py +0 -0
  36. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/ff_utils.py +0 -0
  37. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/file_utils.py +0 -0
  38. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/function_cache_decorator.py +0 -0
  39. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/glacier_utils.py +0 -0
  40. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/jh_utils.py +0 -0
  41. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/kibana/dashboards.json +0 -0
  42. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/kibana/readme.md +0 -0
  43. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/lang_utils.py +0 -0
  44. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/license_policies/c4-infrastructure.jsonc +0 -0
  45. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/license_policies/c4-python-infrastructure.jsonc +0 -0
  46. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/license_policies/park-lab-common-server.jsonc +0 -0
  47. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/license_policies/park-lab-common.jsonc +0 -0
  48. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/license_policies/park-lab-gpl-pipeline.jsonc +0 -0
  49. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/license_policies/park-lab-pipeline.jsonc +0 -0
  50. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/license_utils.py +0 -0
  51. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/log_utils.py +0 -0
  52. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/misc_utils.py +0 -0
  53. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/obfuscation_utils.py +0 -0
  54. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/opensearch_utils.py +0 -0
  55. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/portal_object_utils.py +0 -0
  56. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/portal_utils.py +0 -0
  57. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/project_utils.py +0 -0
  58. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/qa_checkers.py +0 -0
  59. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/qa_utils.py +0 -0
  60. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/redis_tools.py +0 -0
  61. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/redis_utils.py +0 -0
  62. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/s3_utils.py +0 -0
  63. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/schema_utils.py +0 -0
  64. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/scripts/publish_to_pypi.py +0 -0
  65. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/scripts/run_license_checker.py +0 -0
  66. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/scripts/view_portal_object.py +0 -0
  67. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/secrets_utils.py +0 -0
  68. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/sheet_utils.py +0 -0
  69. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/snapshot_utils.py +0 -0
  70. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/ssl_certificate_utils.py +0 -0
  71. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/task_utils.py +0 -0
  72. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/tmpfile_utils.py +0 -0
  73. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/trace_utils.py +0 -0
  74. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/validation_utils.py +0 -0
  75. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.1b17}/dcicutils/variant_utils.py +0 -0
  76. {dcicutils-8.8.1.1b15 → dcicutils-8.8.1.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.1.1b15
3
+ Version: 8.8.1.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
@@ -1,11 +1,17 @@
1
1
  from datetime import datetime
2
2
  from enum import Enum
3
3
 
4
-
5
4
  # Constants for progress tracking for smaht-submitr.
6
5
  # Here only to share between smaht-portal, snovault, and smaht-submitr.
7
6
 
8
- class PROGRESS_INGESTER(Enum):
7
+
8
+ class _Enum(Enum):
9
+ # Automatically make enumerators within the enumeration resolve to its value property.
10
+ def __get__(self, instance, owner):
11
+ return self.value
12
+
13
+
14
+ class PROGRESS_INGESTER(_Enum):
9
15
  VALIDATION = "ingester_validation"
10
16
  INITIATE = "ingester_initiate"
11
17
  PARSE_LOAD_INITIATE = "ingester_parse_initiate"
@@ -20,7 +26,7 @@ class PROGRESS_INGESTER(Enum):
20
26
  NOW = lambda: str(datetime.utcnow()) # noqa
21
27
 
22
28
 
23
- class PROGRESS_PARSE(Enum):
29
+ class PROGRESS_PARSE(_Enum):
24
30
  LOAD_START = "parse_start"
25
31
  LOAD_ITEM = "parse_item"
26
32
  LOAD_DONE = "parse_done"
@@ -46,7 +52,7 @@ class PROGRESS_PARSE(Enum):
46
52
  NOW = lambda: str(datetime.utcnow()) # noqa
47
53
 
48
54
 
49
- class PROGRESS_LOADXL(Enum):
55
+ class PROGRESS_LOADXL(_Enum):
50
56
  START = "loadxl_start"
51
57
  START_SECOND_ROUND = "loadxl_start_second_round"
52
58
  ITEM = "loadxl_item"
@@ -192,8 +192,8 @@ class StructuredDataSet:
192
192
  diffs = {}
193
193
  if callable(progress):
194
194
  ntypes, nobjects = get_counts()
195
- progress({PROGRESS.ANALYZE_START.value: PROGRESS.NOW(),
196
- PROGRESS.ANALYZE_COUNT_TYPES.value: ntypes, PROGRESS.ANALYZE_COUNT_ITEMS.value: nobjects})
195
+ progress({PROGRESS.ANALYZE_START: PROGRESS.NOW(),
196
+ PROGRESS.ANALYZE_COUNT_TYPES: ntypes, PROGRESS.ANALYZE_COUNT_ITEMS: nobjects})
197
197
  if self.data or self.portal: # TODO: what is this OR biz?
198
198
  refs = self.resolved_refs_with_uuids
199
199
  # TODO: Need feedback/progress tracking mechanism here.
@@ -212,20 +212,20 @@ class StructuredDataSet:
212
212
  uuid=existing_object.uuid,
213
213
  diffs=object_diffs or None))
214
214
  if callable(progress):
215
- progress({PROGRESS.ANALYZE_UPDATE.value: True,
216
- PROGRESS.ANALYZE_COUNT_LOOKUP.value: nlookups + nlookups_compare})
215
+ progress({PROGRESS.ANALYZE_UPDATE: True,
216
+ PROGRESS.ANALYZE_COUNT_LOOKUP: nlookups + nlookups_compare})
217
217
  elif identifying_path:
218
218
  # If there is no existing object we still create a record for this object
219
219
  # but with no uuid which will be the indication that it does not exist.
220
220
  diffs[type_name].append(create_readonly_object(path=identifying_path, uuid=None, diffs=None))
221
221
  if callable(progress):
222
- progress({PROGRESS.ANALYZE_CREATE.value: True,
223
- PROGRESS.ANALYZE_COUNT_LOOKUP.value: nlookups})
222
+ progress({PROGRESS.ANALYZE_CREATE: True,
223
+ PROGRESS.ANALYZE_COUNT_LOOKUP: nlookups})
224
224
  else:
225
225
  if callable(progress):
226
- progress({PROGRESS.ANALYZE_COUNT_LOOKUP.value: nlookups})
226
+ progress({PROGRESS.ANALYZE_COUNT_LOOKUP: nlookups})
227
227
  if callable(progress):
228
- progress({PROGRESS.ANALYZE_DONE.value: PROGRESS.NOW()})
228
+ progress({PROGRESS.ANALYZE_DONE: PROGRESS.NOW()})
229
229
  return diffs
230
230
 
231
231
  def load_file(self, file: str) -> None:
@@ -272,8 +272,8 @@ class StructuredDataSet:
272
272
  return nrows, len(excel.sheet_names)
273
273
  if self._progress: # TODO: Move to _load_reader
274
274
  nrows, nsheets = get_counts()
275
- self._progress({PROGRESS.LOAD_START.value: PROGRESS.NOW(),
276
- PROGRESS.LOAD_COUNT_SHEETS.value: nsheets, PROGRESS.LOAD_COUNT_ROWS.value: nrows})
275
+ self._progress({PROGRESS.LOAD_START: PROGRESS.NOW(),
276
+ PROGRESS.LOAD_COUNT_SHEETS: nsheets, PROGRESS.LOAD_COUNT_ROWS: nrows})
277
277
  excel = Excel(file) # Order the sheet names by any specified ordering (e.g. ala snovault.loadxl).
278
278
  order = {Schema.type_name(key): index for index, key in enumerate(self._order)} if self._order else {}
279
279
  for sheet_name in sorted(excel.sheet_names, key=lambda key: order.get(Schema.type_name(key), sys.maxsize)):
@@ -298,14 +298,14 @@ class StructuredDataSet:
298
298
  del self._errors["ref"]
299
299
  if self._progress:
300
300
  self._progress({ # TODO: Refactor with same thing below in _load_reader.
301
- PROGRESS.LOAD_DONE.value: PROGRESS.NOW(),
302
- PROGRESS.LOAD_COUNT_REFS.value: self.ref_total_count,
303
- PROGRESS.LOAD_COUNT_REFS_FOUND.value: self.ref_total_found_count,
304
- PROGRESS.LOAD_COUNT_REFS_NOT_FOUND.value: self.ref_total_notfound_count,
305
- PROGRESS.LOAD_COUNT_REFS_LOOKUP.value: self.ref_lookup_count,
306
- PROGRESS.LOAD_COUNT_REFS_LOOKUP_CACHE_HIT.value: self.ref_lookup_cache_hit_count,
307
- PROGRESS.LOAD_COUNT_REFS_EXISTS_CACHE_HIT.value: self.ref_exists_cache_hit_count,
308
- PROGRESS.LOAD_COUNT_REFS_INVALID.value: self.ref_invalid_identifying_property_count
301
+ PROGRESS.LOAD_DONE: PROGRESS.NOW(),
302
+ PROGRESS.LOAD_COUNT_REFS: self.ref_total_count,
303
+ PROGRESS.LOAD_COUNT_REFS_FOUND: self.ref_total_found_count,
304
+ PROGRESS.LOAD_COUNT_REFS_NOT_FOUND: self.ref_total_notfound_count,
305
+ PROGRESS.LOAD_COUNT_REFS_LOOKUP: self.ref_lookup_count,
306
+ PROGRESS.LOAD_COUNT_REFS_LOOKUP_CACHE_HIT: self.ref_lookup_cache_hit_count,
307
+ PROGRESS.LOAD_COUNT_REFS_EXISTS_CACHE_HIT: self.ref_exists_cache_hit_count,
308
+ PROGRESS.LOAD_COUNT_REFS_INVALID: self.ref_invalid_identifying_property_count
309
309
  })
310
310
 
311
311
  def _load_json_file(self, file: str) -> None:
@@ -335,14 +335,14 @@ class StructuredDataSet:
335
335
  self._add(type_name, structured_row)
336
336
  if self._progress:
337
337
  self._progress({
338
- PROGRESS.LOAD_ITEM.value: True,
339
- PROGRESS.LOAD_COUNT_REFS.value: self.ref_total_count,
340
- PROGRESS.LOAD_COUNT_REFS_FOUND.value: self.ref_total_found_count,
341
- PROGRESS.LOAD_COUNT_REFS_NOT_FOUND.value: self.ref_total_notfound_count,
342
- PROGRESS.LOAD_COUNT_REFS_LOOKUP.value: self.ref_lookup_count,
343
- PROGRESS.LOAD_COUNT_REFS_LOOKUP_CACHE_HIT.value: self.ref_lookup_cache_hit_count,
344
- PROGRESS.LOAD_COUNT_REFS_EXISTS_CACHE_HIT.value: self.ref_exists_cache_hit_count,
345
- PROGRESS.LOAD_COUNT_REFS_INVALID.value: self.ref_invalid_identifying_property_count
338
+ PROGRESS.LOAD_ITEM: True,
339
+ PROGRESS.LOAD_COUNT_REFS: self.ref_total_count,
340
+ PROGRESS.LOAD_COUNT_REFS_FOUND: self.ref_total_found_count,
341
+ PROGRESS.LOAD_COUNT_REFS_NOT_FOUND: self.ref_total_notfound_count,
342
+ PROGRESS.LOAD_COUNT_REFS_LOOKUP: self.ref_lookup_count,
343
+ PROGRESS.LOAD_COUNT_REFS_LOOKUP_CACHE_HIT: self.ref_lookup_cache_hit_count,
344
+ PROGRESS.LOAD_COUNT_REFS_EXISTS_CACHE_HIT: self.ref_exists_cache_hit_count,
345
+ PROGRESS.LOAD_COUNT_REFS_INVALID: self.ref_invalid_identifying_property_count
346
346
  })
347
347
  self._note_warning(reader.warnings, "reader")
348
348
  if schema:
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "dcicutils"
3
- version = "8.8.1.1b15" # TODO: To become 8.8.2
3
+ version = "8.8.1.1b17" # TODO: To become 8.8.2
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"