geoseeq 0.5.6a15__tar.gz → 0.5.6a16__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/PKG-INFO +1 -1
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/cli/main.py +18 -2
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/cli/upload/upload.py +3 -3
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/result/file_upload.py +8 -2
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/upload_download_manager.py +1 -1
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq.egg-info/PKG-INFO +1 -1
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/pyproject.toml +1 -1
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/LICENSE +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/README.md +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/__init__.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/app.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/blob_constructors.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/bulk_creators.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/cli/__init__.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/cli/constants.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/cli/copy.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/cli/detail.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/cli/download.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/cli/fastq_utils.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/cli/get_eula.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/cli/manage.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/cli/progress_bar.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/cli/run.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/cli/search.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/cli/shared_params/__init__.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/cli/shared_params/common_state.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/cli/shared_params/config.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/cli/shared_params/id_handlers.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/cli/shared_params/obj_getters.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/cli/shared_params/opts_and_args.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/cli/upload/__init__.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/cli/upload/upload_advanced.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/cli/upload/upload_reads.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/cli/user.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/cli/utils.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/cli/view.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/constants.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/contrib/__init__.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/contrib/ncbi/__init__.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/contrib/ncbi/api.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/contrib/ncbi/bioproject.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/contrib/ncbi/cli.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/contrib/ncbi/setup_logging.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/file_system_cache.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/id_constructors/__init__.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/id_constructors/from_blobs.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/id_constructors/from_ids.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/id_constructors/from_names.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/id_constructors/from_uuids.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/id_constructors/resolvers.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/id_constructors/utils.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/knex.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/organization.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/pipeline.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/plotting/__init__.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/plotting/constants.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/plotting/highcharts.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/plotting/map/__init__.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/plotting/map/base_layer.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/plotting/map/map.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/plotting/map/overlay.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/plotting/selectable.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/project.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/remote_object.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/result/__init__.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/result/bioinfo.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/result/file_download.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/result/result_file.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/result/result_folder.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/result/utils.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/sample.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/search.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/user.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/utils.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/vc/__init__.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/vc/checksum.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/vc/cli.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/vc/clone.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/vc/constants.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/vc/vc_cache.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/vc/vc_dir.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/vc/vc_sample.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/vc/vc_stub.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq/work_orders.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq.egg-info/SOURCES.txt +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq.egg-info/dependency_links.txt +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq.egg-info/entry_points.txt +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/geoseeq.egg-info/top_level.txt +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/setup.cfg +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/setup.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/tests/__init__.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/tests/test_api_client.py +0 -0
- {geoseeq-0.5.6a15 → geoseeq-0.5.6a16}/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.6a16') # remember to update setup
|
57
57
|
|
58
58
|
|
59
59
|
@main.group('advanced')
|
@@ -101,4 +101,20 @@ def cli_config(yes, api_token, endpoint, profile, overwrite):
|
|
101
101
|
click.echo('You must accept the EULA to use the GeoSeeq API.')
|
102
102
|
return
|
103
103
|
set_profile(api_token, endpoint=endpoint, profile=profile, overwrite=overwrite)
|
104
|
-
click.echo(f'Profile configured.')
|
104
|
+
click.echo(f'Profile configured.')
|
105
|
+
|
106
|
+
|
107
|
+
@main.command('clear-cache')
|
108
|
+
@yes_option
|
109
|
+
def cli_clear_cache(yes):
|
110
|
+
"""Clear the local cache.
|
111
|
+
|
112
|
+
---
|
113
|
+
|
114
|
+
Use of this tool implies acceptance of the GeoSeeq End User License Agreement.
|
115
|
+
Run `geoseeq eula show` to view the EULA.
|
116
|
+
"""
|
117
|
+
from geoseeq.file_system_cache import GEOSEEQ_CACHE_DIR
|
118
|
+
import shutil
|
119
|
+
if yes or click.confirm('Are you sure you want to clear the cache?'):
|
120
|
+
shutil.rmtree(GEOSEEQ_CACHE_DIR, ignore_errors=True)
|
@@ -40,7 +40,7 @@ hidden_option = click.option('--hidden/--no-hidden', default=False, help='Upload
|
|
40
40
|
@click.option('--cores', default=1, help='Number of uploads to run in parallel', show_default=True)
|
41
41
|
@click.option('--threads-per-upload', default=4, help='Number of threads used to upload each file', show_default=True)
|
42
42
|
@click.option('--num-retries', default=3, help='Number of times to retry a failed upload', show_default=True)
|
43
|
-
@click.option('--chunk-size-mb', default
|
43
|
+
@click.option('--chunk-size-mb', default=-1, help='Size of chunks to upload in MB', show_default=True)
|
44
44
|
@ignore_errors_option
|
45
45
|
@yes_option
|
46
46
|
@private_option
|
@@ -122,8 +122,8 @@ def cli_upload_file(state, cores, threads_per_upload, num_retries, chunk_size_mb
|
|
122
122
|
use_cache=state.use_cache,
|
123
123
|
num_retries=num_retries,
|
124
124
|
ignore_errors=ignore_errors,
|
125
|
-
session=knex.new_session(),
|
126
|
-
chunk_size_mb=chunk_size_mb,
|
125
|
+
session=None, #knex.new_session(),
|
126
|
+
chunk_size_mb=chunk_size_mb if chunk_size_mb > 0 else None,
|
127
127
|
)
|
128
128
|
for geoseeq_file_name, file_path in name_pairs:
|
129
129
|
if isfile(file_path):
|
@@ -175,6 +175,7 @@ class ResultFileUpload:
|
|
175
175
|
attempts = 0
|
176
176
|
while attempts < max_retries:
|
177
177
|
try:
|
178
|
+
# url = url.replace("s3.wasabisys.com", "s3.us-east-1.wasabisys.com")
|
178
179
|
logger.debug(f"Uploading part {num + 1} to {url}. Size: {len(file_chunk)} bytes.")
|
179
180
|
if session:
|
180
181
|
http_response = session.put(url, data=file_chunk)
|
@@ -192,7 +193,7 @@ class ResultFileUpload:
|
|
192
193
|
raise e
|
193
194
|
|
194
195
|
retry_time = min(8 ** attempts, 120) # exponential backoff, max 120s
|
195
|
-
retry_time *= 0.
|
196
|
+
retry_time *= 0.6 + (random() * 0.8) # randomize to avoid thundering herd
|
196
197
|
logger.debug(f"Retrying upload for part {num + 1} in {retry_time} seconds.")
|
197
198
|
time.sleep(retry_time)
|
198
199
|
|
@@ -250,7 +251,7 @@ class ResultFileUpload:
|
|
250
251
|
filepath,
|
251
252
|
file_size,
|
252
253
|
optional_fields=None,
|
253
|
-
chunk_size=
|
254
|
+
chunk_size=None,
|
254
255
|
max_retries=3,
|
255
256
|
session=None,
|
256
257
|
progress_tracker=None,
|
@@ -259,6 +260,11 @@ class ResultFileUpload:
|
|
259
260
|
):
|
260
261
|
"""Upload a file to S3 using the multipart upload process."""
|
261
262
|
logger.info(f"Uploading {filepath} to S3 using multipart upload.")
|
263
|
+
if not chunk_size:
|
264
|
+
chunk_size = FIVE_MB
|
265
|
+
if file_size >= 10 * FIVE_MB:
|
266
|
+
chunk_size = 5 * FIVE_MB
|
267
|
+
logger.debug(f"Using chunk size of {chunk_size} bytes.")
|
262
268
|
resumable_upload_tracker = None
|
263
269
|
if use_cache and file_size > 10 * FIVE_MB: # only use resumable upload tracker for larger files
|
264
270
|
resumable_upload_tracker = ResumableUploadTracker(filepath, chunk_size)
|
@@ -23,7 +23,7 @@ def _upload_one_file(args):
|
|
23
23
|
link_type, overwrite, log_level, parallel_uploads,
|
24
24
|
use_cache, no_new_versions, threads_per_upload,
|
25
25
|
num_retries, ignore_errors, chunk_size_mb) = args
|
26
|
-
chunk_size = chunk_size_mb * 1024 * 1024
|
26
|
+
chunk_size = chunk_size_mb * 1024 * 1024 if chunk_size_mb else None
|
27
27
|
if parallel_uploads:
|
28
28
|
_make_in_process_logger(log_level)
|
29
29
|
try:
|
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
|