geoseeq 0.6.6a1__tar.gz → 0.6.8__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/PKG-INFO +1 -1
  2. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/cli/main.py +1 -1
  3. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/cli/shared_params/opts_and_args.py +1 -1
  4. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/remote_object.py +1 -0
  5. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/result/file_download.py +7 -2
  6. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/result/result_file.py +15 -0
  7. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/sample.py +1 -1
  8. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq.egg-info/PKG-INFO +1 -1
  9. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/pyproject.toml +1 -1
  10. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/LICENSE +0 -0
  11. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/README.md +0 -0
  12. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/__init__.py +0 -0
  13. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/app.py +0 -0
  14. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/blob_constructors.py +0 -0
  15. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/bulk_creators.py +0 -0
  16. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/cli/__init__.py +0 -0
  17. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/cli/constants.py +0 -0
  18. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/cli/copy.py +0 -0
  19. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/cli/detail.py +0 -0
  20. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/cli/download.py +0 -0
  21. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/cli/fastq_utils.py +0 -0
  22. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/cli/get_eula.py +0 -0
  23. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/cli/manage.py +0 -0
  24. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/cli/progress_bar.py +0 -0
  25. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/cli/project.py +0 -0
  26. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/cli/raw.py +0 -0
  27. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/cli/run.py +0 -0
  28. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/cli/search.py +0 -0
  29. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/cli/shared_params/__init__.py +0 -0
  30. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/cli/shared_params/common_state.py +0 -0
  31. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/cli/shared_params/config.py +0 -0
  32. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/cli/shared_params/id_handlers.py +0 -0
  33. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/cli/shared_params/obj_getters.py +0 -0
  34. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/cli/upload/__init__.py +0 -0
  35. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/cli/upload/upload.py +0 -0
  36. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/cli/upload/upload_advanced.py +0 -0
  37. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/cli/upload/upload_reads.py +0 -0
  38. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/cli/user.py +0 -0
  39. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/cli/utils.py +0 -0
  40. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/cli/view.py +0 -0
  41. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/constants.py +0 -0
  42. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/contrib/__init__.py +0 -0
  43. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/contrib/ncbi/__init__.py +0 -0
  44. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/contrib/ncbi/api.py +0 -0
  45. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/contrib/ncbi/bioproject.py +0 -0
  46. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/contrib/ncbi/cli.py +0 -0
  47. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/contrib/ncbi/setup_logging.py +0 -0
  48. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/file_system_cache.py +0 -0
  49. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/id_constructors/__init__.py +0 -0
  50. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/id_constructors/from_blobs.py +0 -0
  51. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/id_constructors/from_ids.py +0 -0
  52. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/id_constructors/from_names.py +0 -0
  53. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/id_constructors/from_uuids.py +0 -0
  54. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/id_constructors/resolvers.py +0 -0
  55. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/id_constructors/utils.py +0 -0
  56. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/knex.py +0 -0
  57. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/organization.py +0 -0
  58. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/pipeline.py +0 -0
  59. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/plotting/__init__.py +0 -0
  60. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/plotting/constants.py +0 -0
  61. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/plotting/highcharts.py +0 -0
  62. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/plotting/map/__init__.py +0 -0
  63. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/plotting/map/base_layer.py +0 -0
  64. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/plotting/map/map.py +0 -0
  65. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/plotting/map/overlay.py +0 -0
  66. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/plotting/selectable.py +0 -0
  67. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/project.py +0 -0
  68. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/result/__init__.py +0 -0
  69. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/result/bioinfo.py +0 -0
  70. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/result/file_chunker.py +0 -0
  71. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/result/file_upload.py +0 -0
  72. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/result/result_folder.py +0 -0
  73. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/result/resumable_download_tracker.py +0 -0
  74. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/result/resumable_upload_tracker.py +0 -0
  75. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/result/utils.py +0 -0
  76. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/search.py +0 -0
  77. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/upload_download_manager.py +0 -0
  78. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/user.py +0 -0
  79. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/utils.py +0 -0
  80. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/vc/__init__.py +0 -0
  81. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/vc/checksum.py +0 -0
  82. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/vc/cli.py +0 -0
  83. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/vc/clone.py +0 -0
  84. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/vc/constants.py +0 -0
  85. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/vc/vc_cache.py +0 -0
  86. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/vc/vc_dir.py +0 -0
  87. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/vc/vc_sample.py +0 -0
  88. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/vc/vc_stub.py +0 -0
  89. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq/work_orders.py +0 -0
  90. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq.egg-info/SOURCES.txt +0 -0
  91. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq.egg-info/dependency_links.txt +0 -0
  92. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq.egg-info/entry_points.txt +0 -0
  93. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq.egg-info/requires.txt +0 -0
  94. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/geoseeq.egg-info/top_level.txt +0 -0
  95. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/setup.cfg +0 -0
  96. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/setup.py +0 -0
  97. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/tests/__init__.py +0 -0
  98. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/tests/test_api_client.py +0 -0
  99. {geoseeq-0.6.6a1 → geoseeq-0.6.8}/tests/test_plotting.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: geoseeq
3
- Version: 0.6.6a1
3
+ Version: 0.6.8
4
4
  Summary: GeoSeeq command line tools and python API
5
5
  Author: David C. Danko
6
6
  Author-email: "David C. Danko" <dcdanko@biotia.io>
@@ -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.6') # remember to update setup
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')
@@ -165,6 +165,7 @@ class RemoteObject:
165
165
  self._modified = False
166
166
  else:
167
167
  logger.debug(f"RemoteBlob has not been modified. Nothing to save. {self}")
168
+ return self
168
169
 
169
170
  def idem(self):
170
171
  """Make the state of this object match the server."""
@@ -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()
@@ -215,7 +215,7 @@ class Sample(RemoteObject):
215
215
  )
216
216
  else:
217
217
  files[read_type][folder_name].append(
218
- self._grn_to_file(file_grn)
218
+ self._grn_to_file(file_grn[0])
219
219
  )
220
220
  return files
221
221
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: geoseeq
3
- Version: 0.6.6a1
3
+ Version: 0.6.8
4
4
  Summary: GeoSeeq command line tools and python API
5
5
  Author: David C. Danko
6
6
  Author-email: "David C. Danko" <dcdanko@biotia.io>
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "geoseeq"
7
- version = "0.6.6a1"
7
+ version = "0.6.8"
8
8
  authors = [
9
9
  { name="David C. Danko", email="dcdanko@biotia.io" },
10
10
  ]
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