dcicutils 8.8.4.1b7__tar.gz → 8.8.4.1b9__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/PKG-INFO +1 -1
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/file_utils.py +36 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/pyproject.toml +1 -1
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/LICENSE.txt +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/README.rst +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/__init__.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/base.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/beanstalk_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/bundle_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/captured_output.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/cloudformation_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/codebuild_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/command_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/common.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/contribution_scripts.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/contribution_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/creds_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/data_readers.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/data_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/datetime_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/deployment_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/diff_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/docker_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/ecr_scripts.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/ecr_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/ecs_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/env_base.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/env_manager.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/env_scripts.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/env_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/env_utils_legacy.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/es_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/exceptions.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/ff_mocks.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/ff_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/function_cache_decorator.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/glacier_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/http_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/jh_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/kibana/dashboards.json +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/kibana/readme.md +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/lang_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/license_policies/c4-infrastructure.jsonc +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/license_policies/c4-python-infrastructure.jsonc +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/license_policies/park-lab-common-server.jsonc +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/license_policies/park-lab-common.jsonc +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/license_policies/park-lab-gpl-pipeline.jsonc +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/license_policies/park-lab-pipeline.jsonc +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/license_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/log_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/misc_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/obfuscation_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/opensearch_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/portal_object_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/portal_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/progress_bar.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/project_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/qa_checkers.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/qa_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/redis_tools.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/redis_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/s3_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/schema_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/scripts/publish_to_pypi.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/scripts/run_license_checker.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/scripts/view_portal_object.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/secrets_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/sheet_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/snapshot_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/ssl_certificate_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/structured_data.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/submitr/progress_constants.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/submitr/ref_lookup_strategy.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/task_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/tmpfile_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/trace_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/validation_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/variant_utils.py +0 -0
- {dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/zip_utils.py +0 -0
@@ -1,7 +1,10 @@
|
|
1
1
|
import glob
|
2
2
|
import os
|
3
3
|
import pathlib
|
4
|
+
import random
|
5
|
+
import string
|
4
6
|
from typing import List, Optional, Union
|
7
|
+
from dcicutils.tmpfile_utils import create_temporary_file_name
|
5
8
|
|
6
9
|
|
7
10
|
def search_for_file(file: str,
|
@@ -76,3 +79,36 @@ def normalize_file_path(path: str, home_directory: bool = True) -> str:
|
|
76
79
|
if path.startswith(home_directory) and path != home_directory:
|
77
80
|
path = "~/" + pathlib.Path(path).relative_to(home_directory).as_posix()
|
78
81
|
return path
|
82
|
+
|
83
|
+
|
84
|
+
def are_files_equal(filea: str, fileb: str) -> bool:
|
85
|
+
"""
|
86
|
+
Returns True iff the contents of the two given files are exactly the same.
|
87
|
+
"""
|
88
|
+
try:
|
89
|
+
with open(filea, "rb") as fa:
|
90
|
+
with open(fileb, "rb") as fb:
|
91
|
+
chunk_size = 4096
|
92
|
+
while True:
|
93
|
+
chunka = fa.read(chunk_size)
|
94
|
+
chunkb = fb.read(chunk_size)
|
95
|
+
if chunka != chunkb:
|
96
|
+
return False
|
97
|
+
if not chunka:
|
98
|
+
break
|
99
|
+
return True
|
100
|
+
except Exception:
|
101
|
+
return False
|
102
|
+
|
103
|
+
|
104
|
+
def create_random_file(file: Optional[str] = None,
|
105
|
+
prefix: Optional[str] = None, suffix: Optional[str] = None,
|
106
|
+
nbytes: int = 1024, binary: bool = False) -> str:
|
107
|
+
if not file:
|
108
|
+
file = create_temporary_file_name(prefix=prefix, suffix=suffix)
|
109
|
+
with open(file, "wb" if binary is True else "w") as f:
|
110
|
+
if binary is True:
|
111
|
+
f.write(os.urandom(nbytes))
|
112
|
+
else:
|
113
|
+
f.write(''.join(random.choices(string.ascii_letters + string.digits, k=nbytes)))
|
114
|
+
return file
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "dcicutils"
|
3
|
-
version = "8.8.4.
|
3
|
+
version = "8.8.4.1b9" # TODO: To become 8.8.5
|
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.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/license_policies/c4-infrastructure.jsonc
RENAMED
File without changes
|
File without changes
|
{dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/license_policies/park-lab-common-server.jsonc
RENAMED
File without changes
|
{dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/license_policies/park-lab-common.jsonc
RENAMED
File without changes
|
{dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/dcicutils/license_policies/park-lab-gpl-pipeline.jsonc
RENAMED
File without changes
|
{dcicutils-8.8.4.1b7 → dcicutils-8.8.4.1b9}/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
|
File without changes
|
File without changes
|
File without changes
|