geoseeq 0.6.6a1__tar.gz → 0.6.8a1__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/PKG-INFO +1 -1
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/cli/main.py +1 -1
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/cli/shared_params/opts_and_args.py +1 -1
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/result/file_download.py +7 -2
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/result/result_file.py +15 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/sample.py +1 -1
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq.egg-info/PKG-INFO +1 -1
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/pyproject.toml +1 -1
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/LICENSE +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/README.md +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/__init__.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/app.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/blob_constructors.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/bulk_creators.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/cli/__init__.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/cli/constants.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/cli/copy.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/cli/detail.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/cli/download.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/cli/fastq_utils.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/cli/get_eula.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/cli/manage.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/cli/progress_bar.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/cli/project.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/cli/raw.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/cli/run.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/cli/search.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/cli/shared_params/__init__.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/cli/shared_params/common_state.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/cli/shared_params/config.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/cli/shared_params/id_handlers.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/cli/shared_params/obj_getters.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/cli/upload/__init__.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/cli/upload/upload.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/cli/upload/upload_advanced.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/cli/upload/upload_reads.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/cli/user.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/cli/utils.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/cli/view.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/constants.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/contrib/__init__.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/contrib/ncbi/__init__.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/contrib/ncbi/api.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/contrib/ncbi/bioproject.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/contrib/ncbi/cli.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/contrib/ncbi/setup_logging.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/file_system_cache.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/id_constructors/__init__.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/id_constructors/from_blobs.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/id_constructors/from_ids.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/id_constructors/from_names.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/id_constructors/from_uuids.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/id_constructors/resolvers.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/id_constructors/utils.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/knex.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/organization.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/pipeline.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/plotting/__init__.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/plotting/constants.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/plotting/highcharts.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/plotting/map/__init__.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/plotting/map/base_layer.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/plotting/map/map.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/plotting/map/overlay.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/plotting/selectable.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/project.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/remote_object.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/result/__init__.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/result/bioinfo.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/result/file_chunker.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/result/file_upload.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/result/result_folder.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/result/resumable_download_tracker.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/result/resumable_upload_tracker.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/result/utils.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/search.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/upload_download_manager.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/user.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/utils.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/vc/__init__.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/vc/checksum.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/vc/cli.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/vc/clone.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/vc/constants.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/vc/vc_cache.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/vc/vc_dir.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/vc/vc_sample.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/vc/vc_stub.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq/work_orders.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq.egg-info/SOURCES.txt +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq.egg-info/dependency_links.txt +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq.egg-info/entry_points.txt +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq.egg-info/requires.txt +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/geoseeq.egg-info/top_level.txt +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/setup.cfg +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/setup.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/tests/__init__.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/tests/test_api_client.py +0 -0
- {geoseeq-0.6.6a1 → geoseeq-0.6.8a1}/tests/test_plotting.py +0 -0
@@ -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')
|
@@ -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
|
|
@@ -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()
|
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
|
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
|
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
|