ebi-eva-common-pyutils 0.6.12__tar.gz → 0.6.14__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.
Files changed (47) hide show
  1. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/CHANGELOG.md +11 -0
  2. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/PKG-INFO +18 -3
  3. ebi_eva_common_pyutils-0.6.14/ebi_eva_common_pyutils.egg-info/PKG-INFO +29 -0
  4. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_common_pyutils.egg-info/SOURCES.txt +3 -1
  5. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_internal_pyutils/spring_properties.py +4 -7
  6. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/setup.py +1 -1
  7. ebi_eva_common_pyutils-0.6.14/tests/test_common.py +22 -0
  8. ebi_eva_common_pyutils-0.6.12/ebi_eva_common_pyutils.egg-info/PKG-INFO +0 -14
  9. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/LICENSE +0 -0
  10. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/MANIFEST.in +0 -0
  11. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/README.md +0 -0
  12. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_common_pyutils/__init__.py +0 -0
  13. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_common_pyutils/assembly/__init__.py +0 -0
  14. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_common_pyutils/assembly/assembly.py +0 -0
  15. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_common_pyutils/assembly_utils.py +0 -0
  16. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_common_pyutils/biosamples_communicators.py +0 -0
  17. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_common_pyutils/command_utils.py +0 -0
  18. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_common_pyutils/common_utils.py +0 -0
  19. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_common_pyutils/config.py +0 -0
  20. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_common_pyutils/contig_alias/__init__.py +0 -0
  21. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_common_pyutils/contig_alias/contig_alias.py +0 -0
  22. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_common_pyutils/ena_utils.py +0 -0
  23. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_common_pyutils/file_utils.py +0 -0
  24. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_common_pyutils/logger.py +0 -0
  25. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_common_pyutils/ncbi_utils.py +0 -0
  26. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_common_pyutils/network_utils.py +0 -0
  27. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_common_pyutils/reference/__init__.py +0 -0
  28. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_common_pyutils/reference/assembly.py +0 -0
  29. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_common_pyutils/reference/sequence.py +0 -0
  30. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_common_pyutils/taxonomy/__init__.py +0 -0
  31. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_common_pyutils/taxonomy/taxonomy.py +0 -0
  32. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_common_pyutils/variation/__init__.py +0 -0
  33. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_common_pyutils/variation/contig_utils.py +0 -0
  34. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_common_pyutils.egg-info/dependency_links.txt +0 -0
  35. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_common_pyutils.egg-info/requires.txt +0 -0
  36. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_common_pyutils.egg-info/top_level.txt +0 -0
  37. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_internal_pyutils/__init__.py +0 -0
  38. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_internal_pyutils/archive_directory.py +0 -0
  39. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_internal_pyutils/config_utils.py +0 -0
  40. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_internal_pyutils/metadata_utils.py +0 -0
  41. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_internal_pyutils/mongo_utils.py +0 -0
  42. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_internal_pyutils/mongodb/__init__.py +0 -0
  43. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_internal_pyutils/mongodb/mongo_database.py +0 -0
  44. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_internal_pyutils/nextflow/__init__.py +0 -0
  45. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_internal_pyutils/nextflow/nextflow_pipeline.py +0 -0
  46. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/ebi_eva_internal_pyutils/pg_utils.py +0 -0
  47. {ebi_eva_common_pyutils-0.6.12 → ebi_eva_common_pyutils-0.6.14}/setup.cfg +0 -0
@@ -2,6 +2,17 @@
2
2
  Changelog for ebi_eva_common_pyutils
3
3
  ===========================
4
4
 
5
+ ## 0.6.14 (2025-03-05)
6
+ ----------------------
7
+
8
+ - Bugfix for connection string
9
+
10
+
11
+ ## 0.6.13 (2025-03-05)
12
+ ----------------------
13
+
14
+ - Update spring properties to use mongo connection string with retryWrites=true
15
+
5
16
  ## 0.6.12 (2025-01-21)
6
17
  ----------------------
7
18
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: ebi_eva_common_pyutils
3
- Version: 0.6.12
3
+ Version: 0.6.14
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,20 @@ 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"
23
+ Dynamic: classifier
24
+ Dynamic: home-page
25
+ Dynamic: keywords
26
+ Dynamic: license
27
+ Dynamic: provides-extra
28
+ Dynamic: requires-dist
29
+ Dynamic: summary
@@ -0,0 +1,29 @@
1
+ Metadata-Version: 2.2
2
+ Name: ebi_eva_common_pyutils
3
+ Version: 0.6.14
4
+ Summary: EBI EVA - Common Python Utilities
5
+ Home-page: https://github.com/EBIVariation/eva-common-pyutils
6
+ License: Apache
7
+ Keywords: EBI,EVA,PYTHON,UTILITIES
8
+ Classifier: Development Status :: 5 - Production/Stable
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Topic :: Software Development :: Build Tools
11
+ Classifier: License :: OSI Approved :: Apache Software License
12
+ Classifier: Programming Language :: Python :: 3
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"
23
+ Dynamic: classifier
24
+ Dynamic: home-page
25
+ Dynamic: keywords
26
+ Dynamic: license
27
+ Dynamic: provides-extra
28
+ Dynamic: requires-dist
29
+ Dynamic: summary
@@ -4,6 +4,7 @@ MANIFEST.in
4
4
  README.md
5
5
  setup.cfg
6
6
  setup.py
7
+ /tmp/ebi_eva_common_pyutils-v0.6.14-5o4eugy3/gitclone/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
@@ -12,6 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
  from collections import defaultdict
15
+ from urllib.parse import quote_plus
15
16
 
16
17
  from ebi_eva_internal_pyutils.config_utils import get_mongo_creds_for_profile, get_accession_pg_creds_for_profile, \
17
18
  get_count_service_creds_for_profile, get_properties_from_xml_file, get_variant_load_job_tracker_creds_for_profile
@@ -55,14 +56,10 @@ class SpringPropertiesGenerator:
55
56
  def _mongo_properties(self):
56
57
  mongo_host, mongo_user, mongo_pass = get_mongo_creds_for_profile(
57
58
  self.maven_profile, self.private_settings_file)
59
+ username_with_password = (f'{quote_plus(mongo_user)}:{quote_plus(mongo_pass)}@'
60
+ if mongo_user is not None and mongo_pass is not None else '')
58
61
  return {
59
- 'spring.data.mongodb.host': mongo_host,
60
- # Don't specify port if hosts already have the port encoded in them
61
- # Also see https://github.com/EBIvariation/variation-commons/blob/329d4fa18da73bdad419ca5456b9897c059e33f0/variation-commons-mongodb/src/main/java/uk/ac/ebi/eva/commons/mongodb/utils/MongoClientURIBuilder.java#L44
62
- 'spring.data.mongodb.port': '' if ':' in mongo_host else 27017,
63
- 'spring.data.mongodb.username': '' if mongo_user is None else mongo_user,
64
- 'spring.data.mongodb.password': '' if mongo_pass is None else mongo_pass,
65
- 'spring.data.mongodb.authentication-database': 'admin',
62
+ 'spring.data.mongodb.uri': f'mongodb://{username_with_password}{mongo_host}/?retryWrites=true&authSource=admin',
66
63
  }
67
64
 
68
65
  def _variant_load_job_tracker_properties(self):
@@ -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.12',
10
+ version='0.6.14',
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']])
@@ -1,14 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: ebi-eva-common-pyutils
3
- Version: 0.6.12
4
- Summary: EBI EVA - Common Python Utilities
5
- Home-page: https://github.com/EBIVariation/eva-common-pyutils
6
- License: Apache
7
- Keywords: EBI,EVA,PYTHON,UTILITIES
8
- Classifier: Development Status :: 5 - Production/Stable
9
- Classifier: Intended Audience :: Developers
10
- Classifier: Topic :: Software Development :: Build Tools
11
- Classifier: License :: OSI Approved :: Apache Software License
12
- Classifier: Programming Language :: Python :: 3
13
- Provides-Extra: eva-internal
14
- License-File: LICENSE