dcicutils 8.7.2.1b5__tar.gz → 8.7.2.1b7__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/PKG-INFO +1 -1
  2. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/data_readers.py +9 -1
  3. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/portal_object_utils.py +7 -5
  4. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/schema_utils.py +3 -1
  5. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/scripts/view_portal_object.py +1 -1
  6. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/pyproject.toml +1 -1
  7. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/LICENSE.txt +0 -0
  8. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/README.rst +0 -0
  9. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/__init__.py +0 -0
  10. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/base.py +0 -0
  11. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/beanstalk_utils.py +0 -0
  12. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/bundle_utils.py +0 -0
  13. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/captured_output.py +0 -0
  14. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/cloudformation_utils.py +0 -0
  15. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/codebuild_utils.py +0 -0
  16. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/command_utils.py +0 -0
  17. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/common.py +0 -0
  18. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/contribution_scripts.py +0 -0
  19. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/contribution_utils.py +0 -0
  20. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/creds_utils.py +0 -0
  21. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/data_utils.py +0 -0
  22. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/datetime_utils.py +0 -0
  23. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/deployment_utils.py +0 -0
  24. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/diff_utils.py +0 -0
  25. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/docker_utils.py +0 -0
  26. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/ecr_scripts.py +0 -0
  27. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/ecr_utils.py +0 -0
  28. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/ecs_utils.py +0 -0
  29. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/env_base.py +0 -0
  30. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/env_manager.py +0 -0
  31. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/env_scripts.py +0 -0
  32. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/env_utils.py +0 -0
  33. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/env_utils_legacy.py +0 -0
  34. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/es_utils.py +0 -0
  35. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/exceptions.py +0 -0
  36. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/ff_mocks.py +0 -0
  37. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/ff_utils.py +0 -0
  38. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/file_utils.py +0 -0
  39. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/function_cache_decorator.py +0 -0
  40. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/glacier_utils.py +0 -0
  41. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/jh_utils.py +0 -0
  42. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/kibana/dashboards.json +0 -0
  43. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/kibana/readme.md +0 -0
  44. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/lang_utils.py +0 -0
  45. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/license_policies/c4-infrastructure.jsonc +0 -0
  46. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/license_policies/c4-python-infrastructure.jsonc +0 -0
  47. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/license_policies/park-lab-common-server.jsonc +0 -0
  48. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/license_policies/park-lab-common.jsonc +0 -0
  49. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/license_policies/park-lab-gpl-pipeline.jsonc +0 -0
  50. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/license_policies/park-lab-pipeline.jsonc +0 -0
  51. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/license_utils.py +0 -0
  52. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/log_utils.py +0 -0
  53. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/misc_utils.py +0 -0
  54. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/obfuscation_utils.py +0 -0
  55. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/opensearch_utils.py +0 -0
  56. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/portal_utils.py +0 -0
  57. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/project_utils.py +0 -0
  58. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/qa_checkers.py +0 -0
  59. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/qa_utils.py +0 -0
  60. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/redis_tools.py +0 -0
  61. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/redis_utils.py +0 -0
  62. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/s3_utils.py +0 -0
  63. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/scripts/publish_to_pypi.py +0 -0
  64. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/scripts/run_license_checker.py +0 -0
  65. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/secrets_utils.py +0 -0
  66. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/sheet_utils.py +0 -0
  67. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/snapshot_utils.py +0 -0
  68. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/ssl_certificate_utils.py +0 -0
  69. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/structured_data.py +0 -0
  70. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/task_utils.py +0 -0
  71. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/tmpfile_utils.py +0 -0
  72. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/trace_utils.py +0 -0
  73. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/validation_utils.py +0 -0
  74. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/variant_utils.py +0 -0
  75. {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/zip_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dcicutils
3
- Version: 8.7.2.1b5
3
+ Version: 8.7.2.1b7
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
@@ -170,7 +170,15 @@ class Excel:
170
170
  if self._workbook is None:
171
171
  self._workbook = openpyxl.load_workbook(self._file, data_only=True)
172
172
  self.sheet_names = [sheet_name for sheet_name in self._workbook.sheetnames
173
- if self._include_hidden_sheets or (self._workbook[sheet_name].sheet_state != "hidden")]
173
+ if not self.is_hidden_sheet(self._workbook[sheet_name])]
174
+
175
+ def is_hidden_sheet(self, sheet: openpyxl.worksheet.worksheet.Worksheet) -> bool:
176
+ if not self._include_hidden_sheets:
177
+ if sheet.sheet_state == "hidden":
178
+ return True
179
+ if sheet.title.startswith("(") and sheet.title.endswith(")"):
180
+ return True
181
+ return False
174
182
 
175
183
  def __del__(self) -> None:
176
184
  if (workbook := self._workbook) is not None:
@@ -13,9 +13,11 @@ class PortalObject:
13
13
 
14
14
  _PROPERTY_DELETION_SENTINEL = RowReader.CELL_DELETION_SENTINEL
15
15
 
16
- def __init__(self, portal_object: dict, portal: Portal = None, type: Optional[str] = None) -> None:
17
- self._data = portal_object
18
- self._portal = portal
16
+ def __init__(self, data: dict, portal: Portal = None,
17
+ schema: Optional[Union[dict, Schema]] = None, type: Optional[str] = None) -> None:
18
+ self._data = data if isinstance(data, dict) else {}
19
+ self._portal = portal if isinstance(portal, Portal) else None
20
+ self._schema = schema if isinstance(schema, dict) else (schema.data if isinstance(schema, Schema) else None)
19
21
  self._type = type if isinstance(type, str) and type else None
20
22
 
21
23
  @property
@@ -29,7 +31,7 @@ class PortalObject:
29
31
  @property
30
32
  @lru_cache(maxsize=1)
31
33
  def type(self) -> Optional[str]:
32
- return self._type or Portal.get_schema_type(self._data)
34
+ return self._type or Portal.get_schema_type(self._data) or (Schema(self._schema).type if self._schema else None)
33
35
 
34
36
  @property
35
37
  @lru_cache(maxsize=1)
@@ -44,7 +46,7 @@ class PortalObject:
44
46
  @property
45
47
  @lru_cache(maxsize=1)
46
48
  def schema(self) -> Optional[dict]:
47
- return self._portal.get_schema(self.type) if self._portal else None
49
+ return self._schema if self._schema else (self._portal.get_schema(self.type) if self._portal else None)
48
50
 
49
51
  def copy(self) -> PortalObject:
50
52
  return PortalObject(deepcopy(self.data), portal=self.portal, type=self.type)
@@ -191,7 +191,9 @@ class Schema:
191
191
 
192
192
  def __init__(self, schema: dict, type: Optional[str] = None) -> None:
193
193
  self._data = schema if isinstance(schema, dict) else (schema.data if isinstance(schema, Schema) else {})
194
- self._type = (type if isinstance(type, str) else "") or Schema.type_name(self._data.get("title", ""))
194
+ self._type = ((type if isinstance(type, str) else "") or
195
+ Schema.type_name(self._data.get("title", "")) or
196
+ Schema.type_name(self._data.get("$id", "")))
195
197
 
196
198
  @property
197
199
  def data(self) -> dict:
@@ -139,7 +139,7 @@ def _get_portal_object(portal: Portal, uuid: str,
139
139
  response = portal.get(path, raw=raw, database=database)
140
140
  except Exception as e:
141
141
  if "404" in str(e) and "not found" in str(e).lower():
142
- _print("Portal object not found: {uuid}")
142
+ _print(f"Portal object not found: {uuid}")
143
143
  _exit_without_action()
144
144
  _exit_without_action(f"Exception getting Portal object: {uuid}\n{get_error_message(e)}")
145
145
  if not response:
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "dcicutils"
3
- version = "8.7.2.1b5" # TODO: To become 8.8.0
3
+ version = "8.7.2.1b7" # TODO: To become 8.8.0
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"
File without changes
File without changes