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.
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/PKG-INFO +1 -1
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/data_readers.py +9 -1
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/portal_object_utils.py +7 -5
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/schema_utils.py +3 -1
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/scripts/view_portal_object.py +1 -1
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/pyproject.toml +1 -1
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/LICENSE.txt +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/README.rst +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/__init__.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/base.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/beanstalk_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/bundle_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/captured_output.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/cloudformation_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/codebuild_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/command_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/common.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/contribution_scripts.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/contribution_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/creds_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/data_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/datetime_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/deployment_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/diff_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/docker_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/ecr_scripts.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/ecr_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/ecs_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/env_base.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/env_manager.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/env_scripts.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/env_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/env_utils_legacy.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/es_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/exceptions.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/ff_mocks.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/ff_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/file_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/function_cache_decorator.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/glacier_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/jh_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/kibana/dashboards.json +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/kibana/readme.md +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/lang_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/license_policies/c4-infrastructure.jsonc +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/license_policies/c4-python-infrastructure.jsonc +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/license_policies/park-lab-common-server.jsonc +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/license_policies/park-lab-common.jsonc +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/license_policies/park-lab-gpl-pipeline.jsonc +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/license_policies/park-lab-pipeline.jsonc +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/license_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/log_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/misc_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/obfuscation_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/opensearch_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/portal_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/project_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/qa_checkers.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/qa_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/redis_tools.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/redis_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/s3_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/scripts/publish_to_pypi.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/scripts/run_license_checker.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/secrets_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/sheet_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/snapshot_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/ssl_certificate_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/structured_data.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/task_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/tmpfile_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/trace_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/validation_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/variant_utils.py +0 -0
- {dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/zip_utils.py +0 -0
@@ -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.
|
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,
|
17
|
-
|
18
|
-
self.
|
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
|
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.
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/license_policies/c4-infrastructure.jsonc
RENAMED
File without changes
|
File without changes
|
{dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/license_policies/park-lab-common-server.jsonc
RENAMED
File without changes
|
{dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/license_policies/park-lab-common.jsonc
RENAMED
File without changes
|
{dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/license_policies/park-lab-gpl-pipeline.jsonc
RENAMED
File without changes
|
{dcicutils-8.7.2.1b5 → dcicutils-8.7.2.1b7}/dcicutils/license_policies/park-lab-pipeline.jsonc
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|