deriva 1.7.11__py3-none-any.whl → 1.7.12__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- deriva/core/__init__.py +1 -1
- deriva/core/catalog_cli.py +16 -18
- deriva/core/ermrest_catalog.py +1 -1
- deriva/core/ermrest_model.py +92 -1
- deriva/core/hatrac_cli.py +30 -2
- deriva/core/hatrac_store.py +88 -33
- deriva/core/utils/core_utils.py +312 -35
- deriva/core/utils/credenza_auth_utils.py +475 -129
- deriva/core/utils/globus_auth_utils.py +7 -13
- deriva/transfer/backup/deriva_backup.py +2 -2
- deriva/transfer/backup/deriva_backup_cli.py +5 -0
- deriva/transfer/upload/deriva_upload.py +18 -2
- {deriva-1.7.11.dist-info → deriva-1.7.12.dist-info}/METADATA +3 -1
- {deriva-1.7.11.dist-info → deriva-1.7.12.dist-info}/RECORD +18 -18
- {deriva-1.7.11.dist-info → deriva-1.7.12.dist-info}/WHEEL +1 -1
- {deriva-1.7.11.dist-info → deriva-1.7.12.dist-info}/entry_points.txt +0 -0
- {deriva-1.7.11.dist-info → deriva-1.7.12.dist-info}/licenses/LICENSE +0 -0
- {deriva-1.7.11.dist-info → deriva-1.7.12.dist-info}/top_level.txt +0 -0
|
@@ -1179,19 +1179,13 @@ class DerivaGlobusAuthUtilCLI(BaseCLI):
|
|
|
1179
1179
|
self.gau = GlobusAuthUtil(**vars(args))
|
|
1180
1180
|
|
|
1181
1181
|
response = args.func(args)
|
|
1182
|
-
if
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
return
|
|
1190
|
-
elif not isinstance(response, str):
|
|
1191
|
-
pprint(response)
|
|
1192
|
-
return
|
|
1193
|
-
print(response)
|
|
1194
|
-
return
|
|
1182
|
+
if isinstance(response, dict) or isinstance(response, list):
|
|
1183
|
+
print(json.dumps(response, indent=2 if args.pretty else None))
|
|
1184
|
+
elif not isinstance(response, str):
|
|
1185
|
+
pprint(response)
|
|
1186
|
+
else:
|
|
1187
|
+
print(response)
|
|
1188
|
+
return 0
|
|
1195
1189
|
|
|
1196
1190
|
except UsageException as e:
|
|
1197
1191
|
eprint("{prog} {subcmd}: {msg}".format(prog=self.parser.prog, subcmd=args.subcmd, msg=e))
|
|
@@ -54,8 +54,8 @@ class DerivaBackup(DerivaDownload):
|
|
|
54
54
|
|
|
55
55
|
logging.debug("Inspecting catalog model...")
|
|
56
56
|
model = self.catalog.getCatalogModel()
|
|
57
|
-
|
|
58
|
-
if not model.acls:
|
|
57
|
+
ignore_acl = kwargs.get("ignore_acl", False)
|
|
58
|
+
if not model.acls and not ignore_acl:
|
|
59
59
|
raise DerivaBackupAuthorizationError("Only catalog owners may perform full catalog dumps.")
|
|
60
60
|
|
|
61
61
|
if kwargs.get("no_data", False):
|
|
@@ -25,6 +25,11 @@ class DerivaBackupCLI(DerivaDownloadCLI):
|
|
|
25
25
|
"references to asset files in the bag's \"fetch.txt\" file.")
|
|
26
26
|
self.parser.add_argument("--bag-archiver", choices=['zip', 'tgz', 'bz2'],
|
|
27
27
|
help="Format for compressed bag output.")
|
|
28
|
+
self.parser.add_argument("--ignore-acl", action="store_true",
|
|
29
|
+
help="If no ACL is present in the catalog schema, which may mean the user is not "
|
|
30
|
+
"the catalog owner, proceed anyway. WARNING: this will result in the backup "
|
|
31
|
+
"process running under whatever permissions the user possesses, which may be "
|
|
32
|
+
"limited enough to result in incomplete schema, incomplete data, or both.")
|
|
28
33
|
self.parser.add_argument("--exclude-data", default=list(),
|
|
29
34
|
type=lambda s: [item.strip() for item in s.split(',')],
|
|
30
35
|
metavar="<schema>, <schema:table>, ...",
|
|
@@ -695,6 +695,16 @@ class DerivaUpload(object):
|
|
|
695
695
|
# 6. Perform the Hatrac upload
|
|
696
696
|
self._getFileHatracMetadata(asset_mapping)
|
|
697
697
|
hatrac_options = asset_mapping.get("hatrac_options", {})
|
|
698
|
+
v = hatrac_options.get("chunk_size")
|
|
699
|
+
try:
|
|
700
|
+
chunk_size = int(v) if v not in (None, "") else DEFAULT_CHUNK_SIZE
|
|
701
|
+
except (TypeError, ValueError):
|
|
702
|
+
chunk_size = DEFAULT_CHUNK_SIZE
|
|
703
|
+
if chunk_size <= 0:
|
|
704
|
+
chunk_size = DEFAULT_CHUNK_SIZE
|
|
705
|
+
logger.warning(
|
|
706
|
+
"Specified chunk_size must be a positive integer (> 0) - falling back to default chunk size: %d." %
|
|
707
|
+
DEFAULT_CHUNK_SIZE)
|
|
698
708
|
file_size = self.metadata["file_size"]
|
|
699
709
|
versioned_uri = \
|
|
700
710
|
self._hatracUpload(self.metadata["URI"],
|
|
@@ -704,8 +714,10 @@ class DerivaUpload(object):
|
|
|
704
714
|
content_type=self.guessContentType(file_path),
|
|
705
715
|
content_disposition=self.metadata.get("content-disposition"),
|
|
706
716
|
chunked=True if (file_size > DEFAULT_CHUNK_SIZE or file_size == 0) else False,
|
|
717
|
+
chunk_size=chunk_size,
|
|
707
718
|
create_parents=stob(hatrac_options.get("create_parents", True)),
|
|
708
719
|
allow_versioning=stob(hatrac_options.get("allow_versioning", True)),
|
|
720
|
+
force=stob(hatrac_options.get("force", False)),
|
|
709
721
|
callback=callback)
|
|
710
722
|
logger.debug("Hatrac upload successful. Result object URI: %s" % versioned_uri)
|
|
711
723
|
versioned_uris = True
|
|
@@ -942,9 +954,11 @@ class DerivaUpload(object):
|
|
|
942
954
|
content_type=None,
|
|
943
955
|
content_disposition=None,
|
|
944
956
|
chunked=True,
|
|
957
|
+
chunk_size=DEFAULT_CHUNK_SIZE,
|
|
945
958
|
create_parents=True,
|
|
946
959
|
allow_versioning=True,
|
|
947
|
-
callback=None
|
|
960
|
+
callback=None,
|
|
961
|
+
force=False):
|
|
948
962
|
|
|
949
963
|
# check if there is already an in-progress transfer for this file,
|
|
950
964
|
# and if so, that the local file has not been modified since the original upload job was created
|
|
@@ -979,10 +993,12 @@ class DerivaUpload(object):
|
|
|
979
993
|
content_type=content_type,
|
|
980
994
|
content_disposition=content_disposition,
|
|
981
995
|
chunked=chunked,
|
|
996
|
+
chunk_size=chunk_size,
|
|
982
997
|
create_parents=create_parents,
|
|
983
998
|
allow_versioning=allow_versioning,
|
|
984
999
|
callback=callback,
|
|
985
|
-
cancel_job_on_error=False
|
|
1000
|
+
cancel_job_on_error=False,
|
|
1001
|
+
force=force)
|
|
986
1002
|
|
|
987
1003
|
def _get_catalog_table_columns(self, table):
|
|
988
1004
|
table_columns = set()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: deriva
|
|
3
|
-
Version: 1.7.
|
|
3
|
+
Version: 1.7.12
|
|
4
4
|
Summary: Python APIs and CLIs (Command-Line Interfaces) for the DERIVA platform.
|
|
5
5
|
Home-page: https://github.com/informatics-isi-edu/deriva-py
|
|
6
6
|
Author: USC Information Sciences Institute, Informatics Systems Research Division
|
|
@@ -19,6 +19,8 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.10
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.11
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
22
24
|
Requires-Python: >=3.8, <4
|
|
23
25
|
Description-Content-Type: text/markdown
|
|
24
26
|
License-File: LICENSE
|
|
@@ -8,17 +8,17 @@ deriva/config/dump_catalog_annotations.py,sha256=QzaWDLfWIAQ0eWVV11zeceWgwDBOYIe
|
|
|
8
8
|
deriva/config/rollback_annotation.py,sha256=vqrIcen-KZX8LDpu2OVNivzIHpQoQgWkZAChZJctvtk,3015
|
|
9
9
|
deriva/config/examples/group_owner_policy.json,sha256=8v3GWM1F_BWnYD9x_f6Eo4kBDvyy8g7mRqujfoEKLNc,2408
|
|
10
10
|
deriva/config/examples/self_serve_policy.json,sha256=pW-cqWz4rJNNXwY4eVZFkQ8gKCHclC9yDa22ylfcDqY,1676
|
|
11
|
-
deriva/core/__init__.py,sha256=
|
|
11
|
+
deriva/core/__init__.py,sha256=eknMCmzhKiL-URSE8NKY6-D1OLP0oaFZKtiOjEeH3XI,4976
|
|
12
12
|
deriva/core/annotation.py,sha256=PkAkPkxX1brQsb8_drR1Qj5QjQA5mjkpXhkq9NuZ1g8,13432
|
|
13
13
|
deriva/core/base_cli.py,sha256=78Ilf3_f2xREQb3IIj6q0jwWAiXSObZszG0JURs36lA,2902
|
|
14
|
-
deriva/core/catalog_cli.py,sha256=
|
|
14
|
+
deriva/core/catalog_cli.py,sha256=2Hq0yVVYtH7wSkGyXTvDjSJ8hwGfAMk7Z6X3JnwcKDA,23390
|
|
15
15
|
deriva/core/datapath.py,sha256=h9WzLipAYctppoiZehyDNJdFpCnbU9-z-AWVD80z2Pk,90525
|
|
16
16
|
deriva/core/deriva_binding.py,sha256=6yGXIbnayDtb9LU-JVK43zk02-aQwshrKiaLi1pru-8,13086
|
|
17
17
|
deriva/core/deriva_server.py,sha256=nsW3gwg1sIaHl3BTf-nL41AkSj3dEpcEBlatvjvN8CQ,200
|
|
18
|
-
deriva/core/ermrest_catalog.py,sha256
|
|
19
|
-
deriva/core/ermrest_model.py,sha256=
|
|
20
|
-
deriva/core/hatrac_cli.py,sha256=
|
|
21
|
-
deriva/core/hatrac_store.py,sha256=
|
|
18
|
+
deriva/core/ermrest_catalog.py,sha256=-iCYwuzO55HmDLB-BYGfQWDdqKTS4mYAfUlrBmq0KmY,55557
|
|
19
|
+
deriva/core/ermrest_model.py,sha256=sgg9PF-Y1jg-2KUrM9WgpR3A0O8KcQ_wGs0_KG38ckM,128196
|
|
20
|
+
deriva/core/hatrac_cli.py,sha256=G4iDQe7h45UCmd1uM6c1UpgLSu0lKiqUhm-OFirCFCY,15934
|
|
21
|
+
deriva/core/hatrac_store.py,sha256=k783qeX3Wo1285ncN6Mr_Hbn9cSfmEDhSpQGF3dCm_M,24637
|
|
22
22
|
deriva/core/mmo.py,sha256=dcB8akgsqbYMi22ClbVpOKVL6so8FjSDjSb6gP4_jFo,17852
|
|
23
23
|
deriva/core/polling_ermrest_catalog.py,sha256=KsjiFqPQaHWnJZCVF5i77sdzfubqZHgMBbQ1p8V8D3s,10351
|
|
24
24
|
deriva/core/schemas/app_links.schema.json,sha256=AxrkC2scxomM6N7jyjtdYA73BbZzPrmuqU8PYWe7okI,954
|
|
@@ -44,9 +44,9 @@ deriva/core/schemas/visible_columns.schema.json,sha256=-JKqvhfKT-5btKBtzKn3p6EgY
|
|
|
44
44
|
deriva/core/schemas/visible_foreign_keys.schema.json,sha256=K-oa2qzj5EbmJCEyN6mN3vubblHENFxxbZEeQfFV_QQ,3364
|
|
45
45
|
deriva/core/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
46
46
|
deriva/core/utils/__init__.py,sha256=XSbGaWe44hebxYvoh5huFzZkMY6TSKPOCRSjUOvaY70,124
|
|
47
|
-
deriva/core/utils/core_utils.py,sha256=
|
|
48
|
-
deriva/core/utils/credenza_auth_utils.py,sha256=
|
|
49
|
-
deriva/core/utils/globus_auth_utils.py,sha256=
|
|
47
|
+
deriva/core/utils/core_utils.py,sha256=rSidaI2oY_eAO6MT68QAK9eJTLpibcaPni5Rg5axYuU,29569
|
|
48
|
+
deriva/core/utils/credenza_auth_utils.py,sha256=0LlZeYgivBiWGAnKie7qHtSNdOH13frPyd0DYDDkkBo,25705
|
|
49
|
+
deriva/core/utils/globus_auth_utils.py,sha256=fzMFvNIkaaCHNMB6xXPXWCeo0DblLrVVbek6MzB9EY0,57184
|
|
50
50
|
deriva/core/utils/hash_utils.py,sha256=JqUYVB3jXusCQYX9fkKmweUKBC0WQi8ZI2N8m-uKygQ,2299
|
|
51
51
|
deriva/core/utils/mime_utils.py,sha256=ZT7pMjY2kQWBsgsGC3jY6kjfygdsIyiYW3BKNw_pPyg,1128
|
|
52
52
|
deriva/core/utils/version_utils.py,sha256=HWNUQAZrPXu0oGjhG6gMNm3kWtfa3nR50vfH2uQxBA0,2954
|
|
@@ -57,8 +57,8 @@ deriva/seo/sitemap_cli.py,sha256=miCqRfpSj5Dx5BfJGSd8Pi2e4OOQjotDzP_JubukhCM,265
|
|
|
57
57
|
deriva/transfer/__init__.py,sha256=VRxmElD5SIOGzrB1biUU8bP3_iXPMvJuau-9alU5oy0,1266
|
|
58
58
|
deriva/transfer/backup/__init__.py,sha256=vxsZiDLMTJQPybXT89G-07GsUoLhnItTCbLdXcDSyeA,465
|
|
59
59
|
deriva/transfer/backup/__main__.py,sha256=dT12--8C6sKGEtMhsYuy013ebXKpVnBJfhcQNlVtv6Y,361
|
|
60
|
-
deriva/transfer/backup/deriva_backup.py,sha256=
|
|
61
|
-
deriva/transfer/backup/deriva_backup_cli.py,sha256=
|
|
60
|
+
deriva/transfer/backup/deriva_backup.py,sha256=CgMvi0HwQohf2F7bvPk3LF2sFs3AS8ikvNSStF2VETk,5223
|
|
61
|
+
deriva/transfer/backup/deriva_backup_cli.py,sha256=GcutL_3JjzYMHMQ02pckLby_37b8rR48CXHjeYrPq60,2706
|
|
62
62
|
deriva/transfer/download/__init__.py,sha256=Pr7Zud4AFsIWwopTxeC_pupslgCG_lzycO9w9Xyh88Q,350
|
|
63
63
|
deriva/transfer/download/__main__.py,sha256=YUg7AZ07t_xaOgtfJnU_l1nkEHCCPR8sU5X-l1An6SY,363
|
|
64
64
|
deriva/transfer/download/deriva_download.py,sha256=ulFrHHEDj3oJA2pAo7MGvGyDF9rA3l8yCUoK3FMvHEk,17100
|
|
@@ -88,7 +88,7 @@ deriva/transfer/restore/deriva_restore.py,sha256=s0h7cXit2USSdjrIfrj0dr7BJ0rrHHM
|
|
|
88
88
|
deriva/transfer/restore/deriva_restore_cli.py,sha256=2ViZ1Lyl5ndXPKeJFCHHGnwzkg3DfHhTuRa_bN7eJm8,5603
|
|
89
89
|
deriva/transfer/upload/__init__.py,sha256=4mlc_iUX-v7SpXzlCZmhxQtSiW5JeDGb2FX7bb1E6tY,304
|
|
90
90
|
deriva/transfer/upload/__main__.py,sha256=hqnXtGpRqPthwpO6uvrnf_TQm7McheeyOt960hStSMY,340
|
|
91
|
-
deriva/transfer/upload/deriva_upload.py,sha256=
|
|
91
|
+
deriva/transfer/upload/deriva_upload.py,sha256=UPwg8qt_JJkCjpgN4JpLED0ITallTsCgcR30rOLbOAM,62514
|
|
92
92
|
deriva/transfer/upload/deriva_upload_cli.py,sha256=-Q6xgiYabQziTQcMQdGNDAv-eLxCCHO-BCSo4umbDE4,5082
|
|
93
93
|
deriva/transfer/upload/processors/__init__.py,sha256=sMM5xdJ82UIRdB1lGMKk7ft0BgtjS2oJ0sI4SQSqiIU,2481
|
|
94
94
|
deriva/transfer/upload/processors/archive_processor.py,sha256=ID0lDwDn4vPe5nbxy6m28Ssj_TsZpK4df2xRrM6nJRQ,2015
|
|
@@ -98,9 +98,9 @@ deriva/transfer/upload/processors/metadata_update_processor.py,sha256=Hgu5huZf7Z
|
|
|
98
98
|
deriva/transfer/upload/processors/rename_processor.py,sha256=UQ-JQuQgyYCGT-fU9kHA53kPdQ20kt-2Bb486od7B14,2423
|
|
99
99
|
deriva/transfer/upload/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
100
100
|
deriva/utils/__init__.py,sha256=jv2YF__bseklT3OWEzlqJ5qE24c4aWd5F4r0TTjOrWQ,65
|
|
101
|
-
deriva-1.7.
|
|
102
|
-
deriva-1.7.
|
|
103
|
-
deriva-1.7.
|
|
104
|
-
deriva-1.7.
|
|
105
|
-
deriva-1.7.
|
|
106
|
-
deriva-1.7.
|
|
101
|
+
deriva-1.7.12.dist-info/licenses/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
|
|
102
|
+
deriva-1.7.12.dist-info/METADATA,sha256=OTDbjqhWLZwSiWGwo9aTcV_Alp9vvYqbN4repIpNo9w,1944
|
|
103
|
+
deriva-1.7.12.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
104
|
+
deriva-1.7.12.dist-info/entry_points.txt,sha256=uS-e7FxTP7lVm-QJdq_ErytmAbXvlRkEvrjab33ctRE,922
|
|
105
|
+
deriva-1.7.12.dist-info/top_level.txt,sha256=OoTnCAuRnf-pPKMre5HA7mgLMIPl_2-lAWoZ63y74-U,7
|
|
106
|
+
deriva-1.7.12.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|