geoseeq 0.5.6a11__tar.gz → 0.5.6a12__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/PKG-INFO +1 -1
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/cli/main.py +1 -1
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/cli/upload/upload.py +9 -4
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/result/file_upload.py +4 -2
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/upload_download_manager.py +6 -3
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq.egg-info/PKG-INFO +1 -1
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/pyproject.toml +1 -1
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/LICENSE +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/README.md +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/__init__.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/app.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/blob_constructors.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/bulk_creators.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/cli/__init__.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/cli/constants.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/cli/copy.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/cli/detail.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/cli/download.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/cli/fastq_utils.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/cli/get_eula.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/cli/manage.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/cli/progress_bar.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/cli/run.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/cli/search.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/cli/shared_params/__init__.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/cli/shared_params/common_state.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/cli/shared_params/config.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/cli/shared_params/id_handlers.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/cli/shared_params/obj_getters.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/cli/shared_params/opts_and_args.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/cli/upload/__init__.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/cli/upload/upload_advanced.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/cli/upload/upload_reads.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/cli/user.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/cli/utils.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/cli/view.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/constants.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/contrib/__init__.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/contrib/ncbi/__init__.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/contrib/ncbi/api.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/contrib/ncbi/bioproject.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/contrib/ncbi/cli.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/contrib/ncbi/setup_logging.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/file_system_cache.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/id_constructors/__init__.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/id_constructors/from_blobs.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/id_constructors/from_ids.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/id_constructors/from_names.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/id_constructors/from_uuids.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/id_constructors/resolvers.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/id_constructors/utils.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/knex.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/organization.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/pipeline.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/plotting/__init__.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/plotting/constants.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/plotting/highcharts.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/plotting/map/__init__.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/plotting/map/base_layer.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/plotting/map/map.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/plotting/map/overlay.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/plotting/selectable.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/project.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/remote_object.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/result/__init__.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/result/bioinfo.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/result/file_download.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/result/result_file.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/result/result_folder.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/result/utils.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/sample.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/search.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/user.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/utils.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/vc/__init__.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/vc/checksum.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/vc/cli.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/vc/clone.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/vc/constants.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/vc/vc_cache.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/vc/vc_dir.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/vc/vc_sample.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/vc/vc_stub.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq/work_orders.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq.egg-info/SOURCES.txt +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq.egg-info/dependency_links.txt +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq.egg-info/entry_points.txt +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/geoseeq.egg-info/top_level.txt +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/setup.cfg +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/setup.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/tests/__init__.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/tests/test_api_client.py +0 -0
- {geoseeq-0.5.6a11 → geoseeq-0.5.6a12}/tests/test_plotting.py +0 -0
@@ -53,7 +53,7 @@ def version():
|
|
53
53
|
Use of this tool implies acceptance of the GeoSeeq End User License Agreement.
|
54
54
|
Run `geoseeq eula show` to view the EULA.
|
55
55
|
"""
|
56
|
-
click.echo('0.5.
|
56
|
+
click.echo('0.5.6a12') # remember to update setup
|
57
57
|
|
58
58
|
|
59
59
|
@main.group('advanced')
|
@@ -36,8 +36,9 @@ hidden_option = click.option('--hidden/--no-hidden', default=False, help='Upload
|
|
36
36
|
|
37
37
|
@click.command('files')
|
38
38
|
@use_common_state
|
39
|
-
@click.option('--cores', default=1, help='Number of uploads to run in parallel')
|
40
|
-
@click.option('--threads-per-upload', default=4, help='Number of threads used to upload each file')
|
39
|
+
@click.option('--cores', default=1, help='Number of uploads to run in parallel', show_default=True)
|
40
|
+
@click.option('--threads-per-upload', default=4, help='Number of threads used to upload each file', show_default=True)
|
41
|
+
@click.option('--num-retries', default=3, help='Number of times to retry a failed upload', show_default=True)
|
41
42
|
@yes_option
|
42
43
|
@private_option
|
43
44
|
@link_option
|
@@ -45,10 +46,11 @@ hidden_option = click.option('--hidden/--no-hidden', default=False, help='Upload
|
|
45
46
|
@hidden_option
|
46
47
|
@no_new_versions_option
|
47
48
|
@click.option('-n', '--geoseeq-file-name', default=None, multiple=True,
|
48
|
-
help='Specify a different name for the file on GeoSeeq than the local file name.'
|
49
|
+
help='Specify a different name for the file on GeoSeeq than the local file name.',
|
50
|
+
show_default=True)
|
49
51
|
@folder_id_arg
|
50
52
|
@click.argument('file_paths', type=click.Path(exists=True), nargs=-1)
|
51
|
-
def cli_upload_file(state, cores, threads_per_upload, yes, private, link_type, recursive, hidden, no_new_versions, geoseeq_file_name, folder_id, file_paths):
|
53
|
+
def cli_upload_file(state, cores, threads_per_upload, num_retries, yes, private, link_type, recursive, hidden, no_new_versions, geoseeq_file_name, folder_id, file_paths):
|
52
54
|
"""Upload files to GeoSeeq.
|
53
55
|
|
54
56
|
This command uploads files to either a sample or project on GeoSeeq. It can be used to upload
|
@@ -93,6 +95,8 @@ def cli_upload_file(state, cores, threads_per_upload, yes, private, link_type, r
|
|
93
95
|
|
94
96
|
---
|
95
97
|
"""
|
98
|
+
if num_retries < 1:
|
99
|
+
raise click.UsageError('--num-retries must be at least 1')
|
96
100
|
knex = state.get_knex()
|
97
101
|
result_folder = handle_folder_id(knex, folder_id, yes=yes, private=private, create=True)
|
98
102
|
if geoseeq_file_name:
|
@@ -113,6 +117,7 @@ def cli_upload_file(state, cores, threads_per_upload, yes, private, link_type, r
|
|
113
117
|
log_level=state.log_level,
|
114
118
|
no_new_versions=no_new_versions,
|
115
119
|
use_cache=state.use_cache,
|
120
|
+
num_retries=num_retries,
|
116
121
|
)
|
117
122
|
for geoseeq_file_name, file_path in name_pairs:
|
118
123
|
if isfile(file_path):
|
@@ -188,9 +188,11 @@ class ResultFileUpload:
|
|
188
188
|
f"Upload for part {num + 1} failed. Attempt {attempts + 1} of {max_retries}."
|
189
189
|
)
|
190
190
|
attempts += 1
|
191
|
-
if attempts
|
191
|
+
if attempts >= max_retries:
|
192
192
|
raise e
|
193
|
-
|
193
|
+
|
194
|
+
retry_time = min(8 ** attempts, 120) # exponential backoff, max 120s
|
195
|
+
time.sleep(retry_time)
|
194
196
|
|
195
197
|
etag = http_response.headers["ETag"].replace('"', "")
|
196
198
|
blob = {"ETag": etag, "PartNumber": num + 1}
|
@@ -21,7 +21,8 @@ def _make_in_process_logger(log_level):
|
|
21
21
|
def _upload_one_file(args):
|
22
22
|
(result_file, filepath, session, progress_tracker,
|
23
23
|
link_type, overwrite, log_level, parallel_uploads,
|
24
|
-
use_cache, no_new_versions, threads_per_upload
|
24
|
+
use_cache, no_new_versions, threads_per_upload,
|
25
|
+
num_retries) = args
|
25
26
|
if parallel_uploads:
|
26
27
|
_make_in_process_logger(log_level)
|
27
28
|
if link_type == 'upload':
|
@@ -30,7 +31,7 @@ def _upload_one_file(args):
|
|
30
31
|
filepath,
|
31
32
|
session=session, overwrite=overwrite, progress_tracker=progress_tracker,
|
32
33
|
threads=threads_per_upload, use_cache=use_cache,
|
33
|
-
no_new_versions=no_new_versions
|
34
|
+
no_new_versions=no_new_versions, max_retries=num_retries,
|
34
35
|
)
|
35
36
|
else:
|
36
37
|
result_file.link_file(link_type, filepath)
|
@@ -48,6 +49,7 @@ class GeoSeeqUploadManager:
|
|
48
49
|
log_level=logging.WARNING,
|
49
50
|
overwrite=True,
|
50
51
|
no_new_versions=False,
|
52
|
+
num_retries=3,
|
51
53
|
use_cache=True):
|
52
54
|
self.session = session
|
53
55
|
self.n_parallel_uploads = n_parallel_uploads
|
@@ -59,6 +61,7 @@ class GeoSeeqUploadManager:
|
|
59
61
|
self.no_new_versions = no_new_versions
|
60
62
|
self.use_cache = use_cache
|
61
63
|
self.threads_per_upload = threads_per_upload
|
64
|
+
self.num_retries = num_retries
|
62
65
|
|
63
66
|
def add_result_file(self, result_file, local_path):
|
64
67
|
self._result_files.append((result_file, local_path))
|
@@ -84,7 +87,7 @@ class GeoSeeqUploadManager:
|
|
84
87
|
self.session, self.progress_tracker_factory(local_path),
|
85
88
|
self.link_type, self.overwrite, self.log_level,
|
86
89
|
self.n_parallel_uploads > 1, self.use_cache, self.no_new_versions,
|
87
|
-
self.threads_per_upload
|
90
|
+
self.threads_per_upload, self.num_retries
|
88
91
|
) for result_file, local_path in self._result_files
|
89
92
|
]
|
90
93
|
out = []
|
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
|