geoseeq 0.6.6a1__py3-none-any.whl → 0.6.8a1__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- geoseeq/cli/main.py +1 -1
- geoseeq/cli/shared_params/opts_and_args.py +1 -1
- geoseeq/result/file_download.py +7 -2
- geoseeq/result/result_file.py +15 -0
- geoseeq/sample.py +1 -1
- {geoseeq-0.6.6a1.dist-info → geoseeq-0.6.8a1.dist-info}/METADATA +1 -1
- {geoseeq-0.6.6a1.dist-info → geoseeq-0.6.8a1.dist-info}/RECORD +11 -11
- {geoseeq-0.6.6a1.dist-info → geoseeq-0.6.8a1.dist-info}/WHEEL +1 -1
- {geoseeq-0.6.6a1.dist-info → geoseeq-0.6.8a1.dist-info}/LICENSE +0 -0
- {geoseeq-0.6.6a1.dist-info → geoseeq-0.6.8a1.dist-info}/entry_points.txt +0 -0
- {geoseeq-0.6.6a1.dist-info → geoseeq-0.6.8a1.dist-info}/top_level.txt +0 -0
geoseeq/cli/main.py
CHANGED
@@ -54,7 +54,7 @@ def version():
|
|
54
54
|
Use of this tool implies acceptance of the GeoSeeq End User License Agreement.
|
55
55
|
Run `geoseeq eula show` to view the EULA.
|
56
56
|
"""
|
57
|
-
click.echo('0.6.
|
57
|
+
click.echo('0.6.8') # remember to update setup
|
58
58
|
|
59
59
|
|
60
60
|
@main.group('advanced')
|
@@ -14,7 +14,7 @@ private_option = click.option('--private/--public', default=True, help='Make obj
|
|
14
14
|
link_option = click.option(
|
15
15
|
'--link-type',
|
16
16
|
default='upload',
|
17
|
-
type=click.Choice(['upload', 's3', 'ftp', 'azure', 'sra']),
|
17
|
+
type=click.Choice(['upload', 's3', 'ftp', 'azure', 'sra', 'http']),
|
18
18
|
help='Link the files from a cloud storage service instead of copying them'
|
19
19
|
)
|
20
20
|
yes_option = click.option('--yes/--confirm', default=False, help='Skip confirmation prompts')
|
geoseeq/result/file_download.py
CHANGED
@@ -15,6 +15,7 @@ from .resumable_download_tracker import ResumableDownloadTracker
|
|
15
15
|
|
16
16
|
logger = logging.getLogger("geoseeq_api") # Same name as calling module
|
17
17
|
|
18
|
+
|
18
19
|
def url_to_id(url):
|
19
20
|
url = url.split("?")[0]
|
20
21
|
return md5(url.encode()).hexdigest()[:16]
|
@@ -80,6 +81,8 @@ def guess_download_kind(url):
|
|
80
81
|
return 's3'
|
81
82
|
elif 'ftp' in url:
|
82
83
|
return 'ftp'
|
84
|
+
elif 'http' in url: # note works for https too
|
85
|
+
return 'http'
|
83
86
|
else:
|
84
87
|
return 'generic'
|
85
88
|
|
@@ -103,6 +106,9 @@ def download_url(url, kind='guess', filename=None, head=None, progress_tracker=N
|
|
103
106
|
return _download_head(url, filename, head=head)
|
104
107
|
elif kind == 'ftp':
|
105
108
|
return download_ftp(url, filename, head=head)
|
109
|
+
elif kind == 'http':
|
110
|
+
# for http[s] files we care about head is often respected in practice (e.g. by the ENA)
|
111
|
+
return _download_head(url, filename, head=head, progress_tracker=progress_tracker)
|
106
112
|
else:
|
107
113
|
raise ValueError(f"Unknown download kind: {kind}")
|
108
114
|
|
@@ -113,7 +119,7 @@ class ResultFileDownload:
|
|
113
119
|
def get_download_url(self):
|
114
120
|
"""Return a URL that can be used to download the file for this result."""
|
115
121
|
blob_type = self.stored_data.get("__type__", "").lower()
|
116
|
-
if blob_type not in ["s3", "sra", "ftp", "azure"]:
|
122
|
+
if blob_type not in ["s3", "sra", "ftp", "azure", "http"]:
|
117
123
|
raise ValueError(f'Unknown URL type: "{blob_type}"')
|
118
124
|
key = 'url' if 'url' in self.stored_data else 'uri'
|
119
125
|
if blob_type in ["s3", "azure"]:
|
@@ -127,7 +133,6 @@ class ResultFileDownload:
|
|
127
133
|
else:
|
128
134
|
return self.stored_data[key]
|
129
135
|
|
130
|
-
|
131
136
|
def _download_flag_path(self, filename, flag_suffix='.gs_downloaded'):
|
132
137
|
return filename + flag_suffix
|
133
138
|
|
geoseeq/result/result_file.py
CHANGED
@@ -149,6 +149,9 @@ class ResultFile(RemoteObject, ResultFileUpload, ResultFileDownload):
|
|
149
149
|
return self.link_sra(*args, **kwargs)
|
150
150
|
elif link_type == "azure":
|
151
151
|
return self.link_azure(*args, **kwargs)
|
152
|
+
elif link_type == "http":
|
153
|
+
return self.link_http(*args, **kwargs)
|
154
|
+
assert False, f"Unknown link type: {link_type}"
|
152
155
|
|
153
156
|
def link_s3(self, url, endpoint_url=None):
|
154
157
|
"""Link this field to an S3 object.
|
@@ -207,6 +210,18 @@ class ResultFile(RemoteObject, ResultFileUpload, ResultFileDownload):
|
|
207
210
|
}
|
208
211
|
return self.save()
|
209
212
|
|
213
|
+
def link_http(self, url):
|
214
|
+
"""Link this field to an HTTP object.
|
215
|
+
|
216
|
+
Args:
|
217
|
+
url (str): The URL of the HTTP object.
|
218
|
+
"""
|
219
|
+
self.stored_data = {
|
220
|
+
"__type__": "http",
|
221
|
+
"url": url,
|
222
|
+
}
|
223
|
+
return self.save()
|
224
|
+
|
210
225
|
def idem(self):
|
211
226
|
try:
|
212
227
|
return super().idem()
|
geoseeq/sample.py
CHANGED
@@ -9,7 +9,7 @@ geoseeq/organization.py,sha256=bJkYL8_D-k6IYAaii2ZbxjwYnXy6lvu6iLXscxKlA3w,2542
|
|
9
9
|
geoseeq/pipeline.py,sha256=89mhWaecsKnm6tyRkdkaVp4dmZh62_v42Ze0oXf8OTY,9873
|
10
10
|
geoseeq/project.py,sha256=pVx4etzkYmYAYwcPJsjN9PrI-7GZEkAaz2Q5GFdng1s,13810
|
11
11
|
geoseeq/remote_object.py,sha256=Es-JlAz8iLRmCpAzh1MOwUh2MqtbuQM-p8wHIBAqNlQ,7131
|
12
|
-
geoseeq/sample.py,sha256=
|
12
|
+
geoseeq/sample.py,sha256=TNtYL8ph2pG0R5ukDC4J2AwdA0xDK9Bx7dVQmQKIMQs,8394
|
13
13
|
geoseeq/search.py,sha256=gawad6Cx5FxJBPlYkXWb-UKAO-UC0_yhvyU9Ca1kaNI,3388
|
14
14
|
geoseeq/upload_download_manager.py,sha256=FMRqLLg77o1qFbWZc5Yc86a2pjeZrrn1rHJr1iaxKCU,8757
|
15
15
|
geoseeq/user.py,sha256=tol8i1UGLRrbMw5jeJDnna1ikRgrCDd50Jxz0a1lSgg,690
|
@@ -22,7 +22,7 @@ geoseeq/cli/detail.py,sha256=q8Suu-j2k18knfSVFG-SWWGNsKM-n8y9RMA3LcIIi9Y,4132
|
|
22
22
|
geoseeq/cli/download.py,sha256=QTNA7qFjCdRJg2vKbAm5yH8WGlcF5fb5bSjm5QiI4XE,17768
|
23
23
|
geoseeq/cli/fastq_utils.py,sha256=-bmeQLaiMBm57zWOF0R5OlWTU0_3sh1JBC1RYw2BOFM,3083
|
24
24
|
geoseeq/cli/get_eula.py,sha256=79mbUwyiF7O1r0g6UTxG9kJGQEqKuH805E6eLkPC6Y4,997
|
25
|
-
geoseeq/cli/main.py,sha256=
|
25
|
+
geoseeq/cli/main.py,sha256=Xs4Os4wKljPYhXK0g01FkcUWL-kIZjH_Cc7U87FFKNM,3908
|
26
26
|
geoseeq/cli/manage.py,sha256=wGXAcVaXqE5JQEU8Jh6OlHr02nB396bpS_SFcOZdrEo,5929
|
27
27
|
geoseeq/cli/progress_bar.py,sha256=p1Xl01nkYxSBZCB30ue2verIIi22W93m3ZAMAxipD0g,738
|
28
28
|
geoseeq/cli/project.py,sha256=V5SdXm2Hwo2lxrkpwRDedw-mAE4XnM2uwT-Gj1D90VQ,3030
|
@@ -37,7 +37,7 @@ geoseeq/cli/shared_params/common_state.py,sha256=jiHZtL3TATMjEoqhbO7HT8KkLJr1QPs
|
|
37
37
|
geoseeq/cli/shared_params/config.py,sha256=HQ0xQh_jdt3EKI5VXYqQXzo-s8Rm6YlziMyVX-kg598,1072
|
38
38
|
geoseeq/cli/shared_params/id_handlers.py,sha256=501K9sCVkI0YGDQ62vXk_DM5lMMDrdB5spIS3cw9x9U,9299
|
39
39
|
geoseeq/cli/shared_params/obj_getters.py,sha256=ZSkt6LnDkVFlNVYKgLrjzg60-6BthZMr3eeD3HNqzac,2741
|
40
|
-
geoseeq/cli/shared_params/opts_and_args.py,sha256=
|
40
|
+
geoseeq/cli/shared_params/opts_and_args.py,sha256=_DcJ-TqgrbBaeDd-kuHEx2gLZPQN6EHZYWh8Ag-d8Vg,2091
|
41
41
|
geoseeq/cli/upload/__init__.py,sha256=3C9_S9t7chmYU-2ot89NV03x-EtmsjibulErKaU9w1k,627
|
42
42
|
geoseeq/cli/upload/upload.py,sha256=JZkhe1q3KOp7-tKyzwi860TQhZoNDnZs4yB2PJhOjl0,10081
|
43
43
|
geoseeq/cli/upload/upload_advanced.py,sha256=Jq5eGe-wOdrzxGWVwaFPg0BAJcW0YSx_eHEmYjJeKuA,3434
|
@@ -66,9 +66,9 @@ geoseeq/plotting/map/overlay.py,sha256=4VmxqOESTQra9tPr8b8OLEUhJSit9lNipabeSznEY
|
|
66
66
|
geoseeq/result/__init__.py,sha256=IFHIyRV8ZzuKIfwfze1SXgcKwNMcSgMAknLHMkwjXIU,356
|
67
67
|
geoseeq/result/bioinfo.py,sha256=QQtbyogrdro9avJSN0713sxLVnVeA24mFw3hWtKDKyw,1782
|
68
68
|
geoseeq/result/file_chunker.py,sha256=bXq1csuRtqMB5sbH-AfWo6gdPwrivv5DJPuHVj-h08w,1758
|
69
|
-
geoseeq/result/file_download.py,sha256=
|
69
|
+
geoseeq/result/file_download.py,sha256=F0qSlZyrzh7G2R-qxmGwRicTJiojBUbcBN_SWF1sZac,8123
|
70
70
|
geoseeq/result/file_upload.py,sha256=xs1DrI-h4ZP7xN8HPBc3SFpcPAxR5HAolraP1Zu7tvE,10648
|
71
|
-
geoseeq/result/result_file.py,sha256=
|
71
|
+
geoseeq/result/result_file.py,sha256=A2PIdkuNY0czXLXPenSRdUPdCFdjJGGqs3nBOflNwnA,9099
|
72
72
|
geoseeq/result/result_folder.py,sha256=-m1lDVLpNHKy-JUGihboVzvdMJEnHossyRnxmBe1XLo,11140
|
73
73
|
geoseeq/result/resumable_download_tracker.py,sha256=YEzqHBBnE7L3XokTvlTAhHZ8TcDTIE_pyTQ7YadOfbU,3667
|
74
74
|
geoseeq/result/resumable_upload_tracker.py,sha256=2aI09gYz2yw63jEXqs8lmCRKQ79TIc3YuPETvP0Jeek,3811
|
@@ -85,9 +85,9 @@ geoseeq/vc/vc_stub.py,sha256=IQr8dI0zsWKVAeY_5ybDD6n49_3othcgfHS3P0O9tuY,3110
|
|
85
85
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
86
86
|
tests/test_api_client.py,sha256=TS5njc5pcPP_Ycy-ljcfPVT1hQRBsFVdQ0lCqBmoesU,12810
|
87
87
|
tests/test_plotting.py,sha256=TcTu-2ARr8sxZJ7wPQxmbs3-gHw7uRvsgrhhhg0qKik,784
|
88
|
-
geoseeq-0.6.
|
89
|
-
geoseeq-0.6.
|
90
|
-
geoseeq-0.6.
|
91
|
-
geoseeq-0.6.
|
92
|
-
geoseeq-0.6.
|
93
|
-
geoseeq-0.6.
|
88
|
+
geoseeq-0.6.8a1.dist-info/LICENSE,sha256=IuhIl1XCxXLPLJT_coN1CNqQU4Khlq7x4IdW7ioOJD8,1067
|
89
|
+
geoseeq-0.6.8a1.dist-info/METADATA,sha256=VYP9ZUkWW0VlupB6D-V5esY4GJeCihiFFAPKukdYbm4,4917
|
90
|
+
geoseeq-0.6.8a1.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
|
91
|
+
geoseeq-0.6.8a1.dist-info/entry_points.txt,sha256=yF-6KDM8zXib4Al0qn49TX-qM7PUkWUIcYtsgt36rjM,45
|
92
|
+
geoseeq-0.6.8a1.dist-info/top_level.txt,sha256=zZk7mmeaqAYqFJG8nq2DTgSQPbflRjJwkDIhNURPDEU,14
|
93
|
+
geoseeq-0.6.8a1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|