dcicutils 8.8.2.1b5__tar.gz → 8.8.2.1b7__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/PKG-INFO +1 -1
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/portal_utils.py +4 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/progress_bar.py +2 -2
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/structured_data.py +1 -8
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/pyproject.toml +1 -1
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/LICENSE.txt +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/README.rst +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/__init__.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/base.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/beanstalk_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/bundle_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/captured_output.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/cloudformation_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/codebuild_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/command_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/common.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/contribution_scripts.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/contribution_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/creds_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/data_readers.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/data_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/datetime_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/deployment_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/diff_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/docker_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/ecr_scripts.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/ecr_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/ecs_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/env_base.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/env_manager.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/env_scripts.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/env_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/env_utils_legacy.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/es_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/exceptions.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/ff_mocks.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/ff_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/file_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/function_cache_decorator.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/glacier_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/jh_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/kibana/dashboards.json +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/kibana/readme.md +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/lang_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/license_policies/c4-infrastructure.jsonc +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/license_policies/c4-python-infrastructure.jsonc +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/license_policies/park-lab-common-server.jsonc +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/license_policies/park-lab-common.jsonc +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/license_policies/park-lab-gpl-pipeline.jsonc +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/license_policies/park-lab-pipeline.jsonc +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/license_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/log_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/misc_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/obfuscation_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/opensearch_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/portal_object_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/project_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/qa_checkers.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/qa_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/redis_tools.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/redis_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/s3_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/schema_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/scripts/publish_to_pypi.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/scripts/run_license_checker.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/scripts/view_portal_object.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/secrets_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/sheet_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/snapshot_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/ssl_certificate_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/submitr/progress_constants.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/submitr/ref_lookup_strategy.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/task_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/tmpfile_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/trace_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/validation_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/variant_utils.py +0 -0
- {dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/zip_utils.py +0 -0
@@ -45,6 +45,7 @@ class Portal:
|
|
45
45
|
DEFAULT_APP = APP_SMAHT
|
46
46
|
KEYS_FILE_DIRECTORY = "~"
|
47
47
|
MIME_TYPE_JSON = "application/json"
|
48
|
+
FILE_TYPE_SCHEMA_NAME = "File"
|
48
49
|
|
49
50
|
# Object lookup strategies; on a per-reference (type/value) basis, used currently ONLY by
|
50
51
|
# structured_data.py; controlled by an optional ref_lookup_strategy callable; default is
|
@@ -342,6 +343,9 @@ class Portal:
|
|
342
343
|
return True
|
343
344
|
return False
|
344
345
|
|
346
|
+
def is_schema_file_type(self, schema_name_or_portal_object: Union[str, dict]) -> bool:
|
347
|
+
return self.is_schema_type(schema_name_or_portal_object, self.FILE_TYPE_SCHEMA_NAME)
|
348
|
+
|
345
349
|
def isinstance_schema(self, portal_object: dict, target_schema_name: str) -> bool:
|
346
350
|
"""
|
347
351
|
Returns True iff the given object isa type of the given schema type.
|
@@ -149,8 +149,7 @@ class ProgressBar:
|
|
149
149
|
if self._done or self._bar is None:
|
150
150
|
return
|
151
151
|
self._ended = time.time()
|
152
|
-
self.
|
153
|
-
self.set_progress(self.total) # xyzzy
|
152
|
+
self.set_progress(self.total)
|
154
153
|
self._bar.set_description(self._description)
|
155
154
|
self._bar.refresh()
|
156
155
|
# FYI: Do NOT do a bar.disable = True before a bar.close() or it messes up output
|
@@ -160,6 +159,7 @@ class ProgressBar:
|
|
160
159
|
self._tidy_output_hack.restore()
|
161
160
|
if self._interrupt_handler:
|
162
161
|
self._interrupt_handler.restore()
|
162
|
+
self._done = True
|
163
163
|
|
164
164
|
def disable(self, value: bool = True) -> None:
|
165
165
|
self._disabled = (value is True)
|
@@ -40,7 +40,6 @@ DOTTED_NAME_DELIMITER_CHAR = "."
|
|
40
40
|
|
41
41
|
|
42
42
|
# TODO: Should probably pass this knowledge in from callers.
|
43
|
-
FILE_TYPE_NAME = "File"
|
44
43
|
FILE_TYPE_PROPERTY_NAME = "filename"
|
45
44
|
|
46
45
|
# Forward type references for type hints.
|
@@ -162,7 +161,7 @@ class StructuredDataSet:
|
|
162
161
|
result = []
|
163
162
|
if self._portal:
|
164
163
|
for type_name in self.data:
|
165
|
-
if self._portal.
|
164
|
+
if self._portal.is_schema_file_type(type_name):
|
166
165
|
for item in self.data[type_name]:
|
167
166
|
if (file_name := item.get(FILE_TYPE_PROPERTY_NAME)):
|
168
167
|
result.append({"type": type_name, "file": file_name})
|
@@ -872,12 +871,6 @@ class Portal(PortalBase):
|
|
872
871
|
schemas[user_specified_schema["title"]] = user_specified_schema
|
873
872
|
return schemas
|
874
873
|
|
875
|
-
def is_file_schema(self, schema_name: str) -> bool:
|
876
|
-
"""
|
877
|
-
Returns True iff the given schema name isa File type, i.e. has an ancestor which is of type File.
|
878
|
-
"""
|
879
|
-
return self.is_schema_type(schema_name, FILE_TYPE_NAME)
|
880
|
-
|
881
874
|
def ref_exists(self, type_name: str, value: Optional[str] = None,
|
882
875
|
called_from_map_ref: bool = False) -> Optional[dict]:
|
883
876
|
if not value:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "dcicutils"
|
3
|
-
version = "8.8.2.
|
3
|
+
version = "8.8.2.1b7" # TODO: To become 8.8.3
|
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
|
File without changes
|
{dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/license_policies/c4-infrastructure.jsonc
RENAMED
File without changes
|
File without changes
|
{dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/license_policies/park-lab-common-server.jsonc
RENAMED
File without changes
|
{dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/license_policies/park-lab-common.jsonc
RENAMED
File without changes
|
{dcicutils-8.8.2.1b5 → dcicutils-8.8.2.1b7}/dcicutils/license_policies/park-lab-gpl-pipeline.jsonc
RENAMED
File without changes
|
{dcicutils-8.8.2.1b5 → dcicutils-8.8.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
|
File without changes
|
File without changes
|
File without changes
|