ebi-eva-common-pyutils 0.6.9__tar.gz → 0.6.11__tar.gz
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.
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/CHANGELOG.md +12 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/PKG-INFO +10 -2
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils/biosamples_communicators.py +7 -1
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils.egg-info/PKG-INFO +10 -2
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils.egg-info/SOURCES.txt +3 -1
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_internal_pyutils/spring_properties.py +2 -1
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/setup.py +1 -1
- ebi_eva_common_pyutils-0.6.11/tests/test_common.py +22 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/LICENSE +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/MANIFEST.in +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/README.md +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils/__init__.py +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils/assembly/__init__.py +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils/assembly/assembly.py +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils/assembly_utils.py +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils/command_utils.py +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils/common_utils.py +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils/config.py +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils/contig_alias/__init__.py +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils/contig_alias/contig_alias.py +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils/ena_utils.py +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils/file_utils.py +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils/logger.py +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils/ncbi_utils.py +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils/network_utils.py +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils/reference/__init__.py +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils/reference/assembly.py +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils/reference/sequence.py +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils/taxonomy/__init__.py +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils/taxonomy/taxonomy.py +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils/variation/__init__.py +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils/variation/contig_utils.py +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils.egg-info/dependency_links.txt +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils.egg-info/requires.txt +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils.egg-info/top_level.txt +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_internal_pyutils/__init__.py +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_internal_pyutils/archive_directory.py +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_internal_pyutils/config_utils.py +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_internal_pyutils/metadata_utils.py +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_internal_pyutils/mongo_utils.py +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_internal_pyutils/mongodb/__init__.py +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_internal_pyutils/mongodb/mongo_database.py +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_internal_pyutils/nextflow/__init__.py +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_internal_pyutils/nextflow/nextflow_pipeline.py +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_internal_pyutils/pg_utils.py +0 -0
- {ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/setup.cfg +0 -0
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
Changelog for ebi_eva_common_pyutils
|
|
3
3
|
===========================
|
|
4
4
|
|
|
5
|
+
## 0.6.11 (2024-11-15)
|
|
6
|
+
----------------------
|
|
7
|
+
|
|
8
|
+
- Added hikari max-pool-size connection property to the method that generate property for spring jobs
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## 0.6.10 (2024-08-06)
|
|
12
|
+
----------------------
|
|
13
|
+
|
|
14
|
+
- Allow text to be returned from biosamples communicators
|
|
15
|
+
|
|
16
|
+
|
|
5
17
|
## 0.6.9 (2024-07-29)
|
|
6
18
|
---------------------
|
|
7
19
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ebi_eva_common_pyutils
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.11
|
|
4
4
|
Summary: EBI EVA - Common Python Utilities
|
|
5
5
|
Home-page: https://github.com/EBIVariation/eva-common-pyutils
|
|
6
6
|
License: Apache
|
|
@@ -10,5 +10,13 @@ Classifier: Intended Audience :: Developers
|
|
|
10
10
|
Classifier: Topic :: Software Development :: Build Tools
|
|
11
11
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
12
|
Classifier: Programming Language :: Python :: 3
|
|
13
|
-
Provides-Extra: eva-internal
|
|
14
13
|
License-File: LICENSE
|
|
14
|
+
Requires-Dist: requests
|
|
15
|
+
Requires-Dist: lxml
|
|
16
|
+
Requires-Dist: pyyaml
|
|
17
|
+
Requires-Dist: cached-property
|
|
18
|
+
Requires-Dist: retry
|
|
19
|
+
Provides-Extra: eva-internal
|
|
20
|
+
Requires-Dist: psycopg2-binary; extra == "eva-internal"
|
|
21
|
+
Requires-Dist: pymongo; extra == "eva-internal"
|
|
22
|
+
Requires-Dist: networkx<=2.5; extra == "eva-internal"
|
|
@@ -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
|
-
|
|
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.
|
|
3
|
+
Version: 0.6.11
|
|
4
4
|
Summary: EBI EVA - Common Python Utilities
|
|
5
5
|
Home-page: https://github.com/EBIVariation/eva-common-pyutils
|
|
6
6
|
License: Apache
|
|
@@ -10,5 +10,13 @@ Classifier: Intended Audience :: Developers
|
|
|
10
10
|
Classifier: Topic :: Software Development :: Build Tools
|
|
11
11
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
12
|
Classifier: Programming Language :: Python :: 3
|
|
13
|
-
Provides-Extra: eva-internal
|
|
14
13
|
License-File: LICENSE
|
|
14
|
+
Requires-Dist: requests
|
|
15
|
+
Requires-Dist: lxml
|
|
16
|
+
Requires-Dist: pyyaml
|
|
17
|
+
Requires-Dist: cached-property
|
|
18
|
+
Requires-Dist: retry
|
|
19
|
+
Provides-Extra: eva-internal
|
|
20
|
+
Requires-Dist: psycopg2-binary; extra == "eva-internal"
|
|
21
|
+
Requires-Dist: pymongo; extra == "eva-internal"
|
|
22
|
+
Requires-Dist: networkx<=2.5; extra == "eva-internal"
|
|
@@ -4,6 +4,7 @@ MANIFEST.in
|
|
|
4
4
|
README.md
|
|
5
5
|
setup.cfg
|
|
6
6
|
setup.py
|
|
7
|
+
/home/nkumar2/PycharmProjects/eva-common-pyutils/ebi_eva_internal_pyutils/archive_directory.py
|
|
7
8
|
ebi_eva_common_pyutils/__init__.py
|
|
8
9
|
ebi_eva_common_pyutils/assembly_utils.py
|
|
9
10
|
ebi_eva_common_pyutils/biosamples_communicators.py
|
|
@@ -41,4 +42,5 @@ ebi_eva_internal_pyutils/spring_properties.py
|
|
|
41
42
|
ebi_eva_internal_pyutils/mongodb/__init__.py
|
|
42
43
|
ebi_eva_internal_pyutils/mongodb/mongo_database.py
|
|
43
44
|
ebi_eva_internal_pyutils/nextflow/__init__.py
|
|
44
|
-
ebi_eva_internal_pyutils/nextflow/nextflow_pipeline.py
|
|
45
|
+
ebi_eva_internal_pyutils/nextflow/nextflow_pipeline.py
|
|
46
|
+
tests/test_common.py
|
|
@@ -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
|
|
@@ -7,7 +7,7 @@ setup(
|
|
|
7
7
|
name='ebi_eva_common_pyutils',
|
|
8
8
|
scripts=[os.path.join(os.path.dirname(__file__), 'ebi_eva_internal_pyutils', 'archive_directory.py')],
|
|
9
9
|
packages=find_packages(),
|
|
10
|
-
version='0.6.
|
|
10
|
+
version='0.6.11',
|
|
11
11
|
license='Apache',
|
|
12
12
|
description='EBI EVA - Common Python Utilities',
|
|
13
13
|
url='https://github.com/EBIVariation/eva-common-pyutils',
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from unittest import TestCase
|
|
3
|
+
|
|
4
|
+
from ebi_eva_common_pyutils.common_utils import merge_two_dicts, pretty_print
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class TestCommon(TestCase):
|
|
8
|
+
|
|
9
|
+
resources_folder = os.path.join(os.path.dirname(__file__), 'resources')
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class TestCommonUtils(TestCase):
|
|
13
|
+
|
|
14
|
+
def test_merge_two_dicts(self):
|
|
15
|
+
d1 = {'a': 1, 'b': 2, 'c': 3}
|
|
16
|
+
d2 = {'d': 4, 'a': 5, 'e': 6}
|
|
17
|
+
assert merge_two_dicts(d1, d2) == {'a': 5, 'b': 2, 'c': 3, 'd': 4, 'e': 6}
|
|
18
|
+
assert merge_two_dicts(d2, d1) == {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 6}
|
|
19
|
+
|
|
20
|
+
def test_pretty_print(self):
|
|
21
|
+
pretty_print(['Header 1', 'Long Header 2'],
|
|
22
|
+
[['row1 cell 1', 'row1 cell 2'], ['row2 cell 1', 'Super long row2 cell 2']])
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils/config.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils/ena_utils.py
RENAMED
|
File without changes
|
{ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils/file_utils.py
RENAMED
|
File without changes
|
{ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils/logger.py
RENAMED
|
File without changes
|
{ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_common_pyutils/ncbi_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_internal_pyutils/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ebi_eva_common_pyutils-0.6.9 → ebi_eva_common_pyutils-0.6.11}/ebi_eva_internal_pyutils/pg_utils.py
RENAMED
|
File without changes
|
|
File without changes
|