dcicutils 8.8.1.1b11__tar.gz → 8.8.1.1b14__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.1b11 → dcicutils-8.8.1.1b14}/PKG-INFO +1 -1
  2. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/progress_constants.py +4 -0
  3. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/structured_data.py +26 -25
  4. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/pyproject.toml +1 -1
  5. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/LICENSE.txt +0 -0
  6. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/README.rst +0 -0
  7. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/__init__.py +0 -0
  8. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/base.py +0 -0
  9. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/beanstalk_utils.py +0 -0
  10. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/bundle_utils.py +0 -0
  11. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/captured_output.py +0 -0
  12. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/cloudformation_utils.py +0 -0
  13. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/codebuild_utils.py +0 -0
  14. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/command_utils.py +0 -0
  15. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/common.py +0 -0
  16. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/contribution_scripts.py +0 -0
  17. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/contribution_utils.py +0 -0
  18. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/creds_utils.py +0 -0
  19. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/data_readers.py +0 -0
  20. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/data_utils.py +0 -0
  21. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/datetime_utils.py +0 -0
  22. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/deployment_utils.py +0 -0
  23. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/diff_utils.py +0 -0
  24. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/docker_utils.py +0 -0
  25. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/ecr_scripts.py +0 -0
  26. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/ecr_utils.py +0 -0
  27. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/ecs_utils.py +0 -0
  28. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/env_base.py +0 -0
  29. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/env_manager.py +0 -0
  30. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/env_scripts.py +0 -0
  31. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/env_utils.py +0 -0
  32. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/env_utils_legacy.py +0 -0
  33. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/es_utils.py +0 -0
  34. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/exceptions.py +0 -0
  35. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/ff_mocks.py +0 -0
  36. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/ff_utils.py +0 -0
  37. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/file_utils.py +0 -0
  38. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/function_cache_decorator.py +0 -0
  39. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/glacier_utils.py +0 -0
  40. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/jh_utils.py +0 -0
  41. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/kibana/dashboards.json +0 -0
  42. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/kibana/readme.md +0 -0
  43. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/lang_utils.py +0 -0
  44. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/license_policies/c4-infrastructure.jsonc +0 -0
  45. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/license_policies/c4-python-infrastructure.jsonc +0 -0
  46. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/license_policies/park-lab-common-server.jsonc +0 -0
  47. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/license_policies/park-lab-common.jsonc +0 -0
  48. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/license_policies/park-lab-gpl-pipeline.jsonc +0 -0
  49. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/license_policies/park-lab-pipeline.jsonc +0 -0
  50. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/license_utils.py +0 -0
  51. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/log_utils.py +0 -0
  52. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/misc_utils.py +0 -0
  53. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/obfuscation_utils.py +0 -0
  54. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/opensearch_utils.py +0 -0
  55. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/portal_object_utils.py +0 -0
  56. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/portal_utils.py +0 -0
  57. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/project_utils.py +0 -0
  58. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/qa_checkers.py +0 -0
  59. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/qa_utils.py +0 -0
  60. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/redis_tools.py +0 -0
  61. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/redis_utils.py +0 -0
  62. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/s3_utils.py +0 -0
  63. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/schema_utils.py +0 -0
  64. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/scripts/publish_to_pypi.py +0 -0
  65. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/scripts/run_license_checker.py +0 -0
  66. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/scripts/view_portal_object.py +0 -0
  67. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/secrets_utils.py +0 -0
  68. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/sheet_utils.py +0 -0
  69. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/snapshot_utils.py +0 -0
  70. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/ssl_certificate_utils.py +0 -0
  71. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/task_utils.py +0 -0
  72. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/tmpfile_utils.py +0 -0
  73. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/trace_utils.py +0 -0
  74. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/validation_utils.py +0 -0
  75. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/dcicutils/variant_utils.py +0 -0
  76. {dcicutils-8.8.1.1b11 → dcicutils-8.8.1.1b14}/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.1b11
3
+ Version: 8.8.1.1b14
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,3 +1,4 @@
1
+ from datetime import datetime
1
2
  from enum import Enum
2
3
 
3
4
 
@@ -16,6 +17,7 @@ class PROGRESS_INGESTER(Enum):
16
17
  MESSAGE = "ingester_message"
17
18
  MESSAGE_VERBOSE = "ingester_message_verbose"
18
19
  MESSAGE_DEBUG = "ingester_message_debug"
20
+ NOW = lambda: str(datetime.utcnow()) # noqa
19
21
 
20
22
 
21
23
  class PROGRESS_PARSE(Enum):
@@ -41,6 +43,7 @@ class PROGRESS_PARSE(Enum):
41
43
  MESSAGE = "parse_message"
42
44
  MESSAGE_VERBOSE = "parse_message_verbose"
43
45
  MESSAGE_DEBUG = "parse_message_debug"
46
+ NOW = lambda: str(datetime.utcnow()) # noqa
44
47
 
45
48
 
46
49
  class PROGRESS_LOADXL(Enum):
@@ -57,3 +60,4 @@ class PROGRESS_LOADXL(Enum):
57
60
  MESSAGE = "loadxl_message"
58
61
  MESSAGE_VERBOSE = "loadxl_message_verbose"
59
62
  MESSAGE_DEBUG = "loadxl_message_debug"
63
+ NOW = lambda: str(datetime.utcnow()) # noqa
@@ -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: True,
196
- PROGRESS.ANALYZE_COUNT_TYPES: ntypes, PROGRESS.ANALYZE_COUNT_ITEMS: nobjects})
195
+ progress({PROGRESS.ANALYZE_START.value: True,
196
+ PROGRESS.ANALYZE_COUNT_TYPES.value: ntypes, PROGRESS.ANALYZE_COUNT_ITEMS.value: 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,19 +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: True,
216
- PROGRESS.ANALYZE_COUNT_LOOKUP: nlookups + nlookups_compare})
215
+ progress({PROGRESS.ANALYZE_UPDATE.value: True,
216
+ PROGRESS.ANALYZE_COUNT_LOOKUP.value: 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: True, PROGRESS.ANALYZE_COUNT_LOOKUP: nlookups})
222
+ progress({PROGRESS.ANALYZE_CREATE.value: True,
223
+ PROGRESS.ANALYZE_COUNT_LOOKUP.value: nlookups})
223
224
  else:
224
225
  if callable(progress):
225
- progress({PROGRESS.ANALYZE_COUNT_LOOKUP: nlookups})
226
+ progress({PROGRESS.ANALYZE_COUNT_LOOKUP.value: nlookups})
226
227
  if callable(progress):
227
- progress({PROGRESS.ANALYZE_DONE: True})
228
+ progress({PROGRESS.ANALYZE_DONE.value: True})
228
229
  return diffs
229
230
 
230
231
  def load_file(self, file: str) -> None:
@@ -271,8 +272,8 @@ class StructuredDataSet:
271
272
  return nrows, len(excel.sheet_names)
272
273
  if self._progress: # TODO: Move to _load_reader
273
274
  nrows, nsheets = get_counts()
274
- self._progress({PROGRESS.LOAD_START: True,
275
- PROGRESS.LOAD_COUNT_SHEETS: nsheets, PROGRESS.LOAD_COUNT_ROWS: nrows})
275
+ self._progress({PROGRESS.LOAD_START.value: True,
276
+ PROGRESS.LOAD_COUNT_SHEETS.value: nsheets, PROGRESS.LOAD_COUNT_ROWS.value: nrows})
276
277
  excel = Excel(file) # Order the sheet names by any specified ordering (e.g. ala snovault.loadxl).
277
278
  order = {Schema.type_name(key): index for index, key in enumerate(self._order)} if self._order else {}
278
279
  for sheet_name in sorted(excel.sheet_names, key=lambda key: order.get(Schema.type_name(key), sys.maxsize)):
@@ -297,14 +298,14 @@ class StructuredDataSet:
297
298
  del self._errors["ref"]
298
299
  if self._progress:
299
300
  self._progress({ # TODO: Refactor with same thing below in _load_reader.
300
- PROGRESS.LOAD_DONE: True,
301
- PROGRESS.LOAD_COUNT_REFS: self.ref_total_count,
302
- PROGRESS.LOAD_COUNT_REFS_FOUND: self.ref_total_found_count,
303
- PROGRESS.LOAD_COUNT_REFS_NOT_FOUND: self.ref_total_notfound_count,
304
- PROGRESS.LOAD_COUNT_REFS_LOOKUP: self.ref_lookup_count,
305
- PROGRESS.LOAD_COUNT_REFS_LOOKUP_CACHE_HIT: self.ref_lookup_cache_hit_count,
306
- PROGRESS.LOAD_COUNT_REFS_EXISTS_CACHE_HIT: self.ref_exists_cache_hit_count,
307
- PROGRESS.LOAD_COUNT_REFS_INVALID: self.ref_invalid_identifying_property_count
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
308
309
  })
309
310
 
310
311
  def _load_json_file(self, file: str) -> None:
@@ -334,14 +335,14 @@ class StructuredDataSet:
334
335
  self._add(type_name, structured_row)
335
336
  if self._progress:
336
337
  self._progress({
337
- PROGRESS.LOAD_ITEM: True,
338
- PROGRESS.LOAD_COUNT_REFS: self.ref_total_count,
339
- PROGRESS.LOAD_COUNT_REFS_FOUND: self.ref_total_found_count,
340
- PROGRESS.LOAD_COUNT_REFS_NOT_FOUND: self.ref_total_notfound_count,
341
- PROGRESS.LOAD_COUNT_REFS_LOOKUP: self.ref_lookup_count,
342
- PROGRESS.LOAD_COUNT_REFS_LOOKUP_CACHE_HIT: self.ref_lookup_cache_hit_count,
343
- PROGRESS.LOAD_COUNT_REFS_EXISTS_CACHE_HIT: self.ref_exists_cache_hit_count,
344
- PROGRESS.LOAD_COUNT_REFS_INVALID: self.ref_invalid_identifying_property_count
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
345
346
  })
346
347
  self._note_warning(reader.warnings, "reader")
347
348
  if schema:
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "dcicutils"
3
- version = "8.8.1.1b11" # TODO: To become 8.8.2
3
+ version = "8.8.1.1b14" # 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"