ebi-eva-common-pyutils 0.6.9__py3-none-any.whl → 0.6.12__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -103,9 +103,15 @@ class HALCommunicator(AppLogger):
103
103
  url = re.sub('{(' + k + ')(:.*)?}', v, url)
104
104
  if join_url:
105
105
  url += '/' + join_url
106
+ text_only = False
107
+ if 'text_only' in kwargs and kwargs.get('text_only'):
108
+ text_only = kwargs.pop('text_only')
106
109
  # Now query the url
107
- json_response = self._req(method, url, **kwargs).json()
110
+ response = self._req(method, url, **kwargs)
111
+ if text_only:
112
+ return response.text
108
113
 
114
+ json_response = response.json()
109
115
  # Depaginate the call if requested
110
116
  if all_pages is True:
111
117
  # This depagination code will iterate over all the pages available until the pages comes back without a
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ebi-eva-common-pyutils
3
- Version: 0.6.9
3
+ Version: 0.6.12
4
4
  Summary: EBI EVA - Common Python Utilities
5
5
  Home-page: https://github.com/EBIVariation/eva-common-pyutils
6
6
  License: Apache
@@ -1,6 +1,6 @@
1
1
  ebi_eva_common_pyutils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  ebi_eva_common_pyutils/assembly_utils.py,sha256=CklyCGlCjlFp0e9pugg6kSsh5L0xfCe2qPvA2eLVtn0,4187
3
- ebi_eva_common_pyutils/biosamples_communicators.py,sha256=ngWuSvEYkkttkMnJ9Gjxc5D7ZSi7D3_JX1c8BnEO3os,7596
3
+ ebi_eva_common_pyutils/biosamples_communicators.py,sha256=nyO0E_YpcAeBwbqOfbqe9RDxONq7Oe3NijSTGw7D01I,7815
4
4
  ebi_eva_common_pyutils/command_utils.py,sha256=PtelWWqcC0eOwIVesjwBw3F9KaXRzEE_uAUJhQFZ4l8,2340
5
5
  ebi_eva_common_pyutils/common_utils.py,sha256=ty_glvfRa3VGhnpAht4qtVkNNmv-IYfVtO958mY-BaA,1192
6
6
  ebi_eva_common_pyutils/config.py,sha256=PtD2SgHf96kk21OA9tVIjEgsDXEFuAU-INy_kfQdoPw,4828
@@ -20,20 +20,20 @@ ebi_eva_common_pyutils/taxonomy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm
20
20
  ebi_eva_common_pyutils/taxonomy/taxonomy.py,sha256=p3XV4g3y0hEjyeZ4PwgN7Q3Et9G515ctQkSIo1kdDbU,2259
21
21
  ebi_eva_common_pyutils/variation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
22
  ebi_eva_common_pyutils/variation/contig_utils.py,sha256=kMNEW_P2yPnd8Xx1tep19hy5ee7ojxz6ZOO1grTQsRQ,5230
23
- ebi_eva_common_pyutils-0.6.9.data/scripts/archive_directory.py,sha256=0lWJ0ju_AB2ni7lMnJXPFx6U2OdTGbe-WoQs-4BfKOM,4976
23
+ ebi_eva_common_pyutils-0.6.12.data/scripts/archive_directory.py,sha256=0lWJ0ju_AB2ni7lMnJXPFx6U2OdTGbe-WoQs-4BfKOM,4976
24
24
  ebi_eva_internal_pyutils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
25
  ebi_eva_internal_pyutils/archive_directory.py,sha256=IxVEfh_gaCiT652k0Q_-58fonRusy1yzXu7BCO8yVLo,4989
26
26
  ebi_eva_internal_pyutils/config_utils.py,sha256=EGRC5rsmU_ug7OY9-t1UW1XZXRsauSyZB9xPcBux8ts,7909
27
27
  ebi_eva_internal_pyutils/metadata_utils.py,sha256=t9PcXZdbfjDBP04GJenC4bxm2nOLd8oI_MP9eNe9IBQ,15221
28
28
  ebi_eva_internal_pyutils/mongo_utils.py,sha256=YxKHtb5ygDiGLOtEiiAMFCP2ow6FL9Kq0K5R0mWNdXY,3575
29
29
  ebi_eva_internal_pyutils/pg_utils.py,sha256=FUQVwiX_7F2-4sSzoaCVX2me0zAqR8nGIj6NW5d304A,4398
30
- ebi_eva_internal_pyutils/spring_properties.py,sha256=B8TpVKvXUvMilXIv6rJFcHD2kBmaFV_M9R_0doMYNts,15161
30
+ ebi_eva_internal_pyutils/spring_properties.py,sha256=Ine5O27gu_zQjWt90Euuw1ACyPaqR_DpOpp_zEtSkh8,15494
31
31
  ebi_eva_internal_pyutils/mongodb/__init__.py,sha256=0oyTlkYZCV7udlPl09Zl-sDyE3c97QZMMTEFIa6uYIw,76
32
32
  ebi_eva_internal_pyutils/mongodb/mongo_database.py,sha256=kesaJaaxYFeF_uYZBgL8tbufGKUXll7bXb4WlOS9vKM,9596
33
33
  ebi_eva_internal_pyutils/nextflow/__init__.py,sha256=OOiJS8jZOz98q0t77NNog7aI_fFrVxi4kGmiSskuAqM,122
34
34
  ebi_eva_internal_pyutils/nextflow/nextflow_pipeline.py,sha256=ew623hhK8jmFLQjJwLZbgBmW9RTiJBEULVqHfIUv_dc,10114
35
- ebi_eva_common_pyutils-0.6.9.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
36
- ebi_eva_common_pyutils-0.6.9.dist-info/METADATA,sha256=iEw5N92Ad8rSkru7KNyzfpSgUD0NCpuF4Eu1dPSVp1I,824
37
- ebi_eva_common_pyutils-0.6.9.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
38
- ebi_eva_common_pyutils-0.6.9.dist-info/top_level.txt,sha256=sXoiqiGU8vlMQpFWDlKrekxhlusk06AhkOH3kSvDT6c,48
39
- ebi_eva_common_pyutils-0.6.9.dist-info/RECORD,,
35
+ ebi_eva_common_pyutils-0.6.12.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
36
+ ebi_eva_common_pyutils-0.6.12.dist-info/METADATA,sha256=C_HcYzKUZ4y0bpBQGFFx3iUJAxD0JUvUz4UPjmgf8xY,825
37
+ ebi_eva_common_pyutils-0.6.12.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
38
+ ebi_eva_common_pyutils-0.6.12.dist-info/top_level.txt,sha256=sXoiqiGU8vlMQpFWDlKrekxhlusk06AhkOH3kSvDT6c,48
39
+ ebi_eva_common_pyutils-0.6.12.dist-info/RECORD,,
@@ -83,7 +83,7 @@ class SpringPropertiesGenerator:
83
83
  'eva.count-stats.password': counts_password
84
84
  }
85
85
 
86
- def _common_properties(self, *, read_preference='primary', chunk_size=100):
86
+ def _common_properties(self, *, read_preference='primary', chunk_size=100, max_pool_size=2):
87
87
  """Properties common to all Spring pipelines"""
88
88
  props = {
89
89
  'spring.datasource.driver-class-name': 'org.postgresql.Driver',
@@ -98,6 +98,7 @@ class SpringPropertiesGenerator:
98
98
  'spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults': 'false',
99
99
  'spring.jpa.database-platform': 'org.hibernate.dialect.PostgreSQL9Dialect',
100
100
  'parameters.chunkSize': chunk_size,
101
+ 'spring.datasource.hikari.maximum-pool-size': max_pool_size
101
102
  }
102
103
  merge = {**self._mongo_properties(), **self._count_stats_properties(), **props}
103
104
  return merge
@@ -140,7 +141,8 @@ class SpringPropertiesGenerator:
140
141
  """Properties for accessioning pipeline."""
141
142
  return self._format(
142
143
  self._common_accessioning_clustering_properties(assembly_accession=target_assembly,
143
- read_preference='secondaryPreferred', chunk_size=chunk_size),
144
+ read_preference='secondaryPreferred',
145
+ chunk_size=chunk_size),
144
146
  {
145
147
  'spring.batch.job.names': 'CREATE_SUBSNP_ACCESSION_JOB',
146
148
  'parameters.assemblyReportUrl': self._format_str('file:{0}', assembly_report),
@@ -156,8 +158,8 @@ class SpringPropertiesGenerator:
156
158
  )
157
159
 
158
160
  def get_clustering_properties(self, *, read_preference='primary', job_name=None, source_assembly='',
159
- target_assembly='', rs_report_path='', projects='',
160
- project_accession='', vcf=''):
161
+ target_assembly='', rs_report_path='', rs_acc_file='', duplicate_rs_acc_file='',
162
+ projects='', project_accession='', vcf=''):
161
163
  """Properties common to all clustering pipelines, though not all are always used."""
162
164
  return self._format(
163
165
  self._common_accessioning_clustering_properties(assembly_accession=target_assembly,
@@ -169,6 +171,8 @@ class SpringPropertiesGenerator:
169
171
  'parameters.projectAccession': project_accession,
170
172
  'parameters.vcf': vcf,
171
173
  'parameters.rsReportPath': rs_report_path,
174
+ 'parameters.rsAccFile': rs_acc_file,
175
+ 'parameters.duplicateRSAccFile': duplicate_rs_acc_file,
172
176
  }
173
177
  )
174
178
 
@@ -262,7 +266,8 @@ class SpringPropertiesGenerator:
262
266
  'logging.level.org.springframework': 'INFO',
263
267
  }
264
268
 
265
- merge = {**self._common_properties(read_preference=read_preference, chunk_size=100), **props, **job_tracker_properties}
269
+ merge = {**self._common_properties(read_preference=read_preference, chunk_size=100), **props,
270
+ **job_tracker_properties}
266
271
  return merge
267
272
 
268
273
  def get_accession_import_properties(self, opencga_path, read_preference='secondaryPreferred'):