ebi-eva-common-pyutils 0.6.14__tar.gz → 0.6.16__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.14 → ebi_eva_common_pyutils-0.6.16}/CHANGELOG.md +12 -0
- {ebi_eva_common_pyutils-0.6.14/ebi_eva_common_pyutils.egg-info → ebi_eva_common_pyutils-0.6.16}/PKG-INFO +3 -18
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_common_pyutils/taxonomy/taxonomy.py +11 -3
- ebi_eva_common_pyutils-0.6.16/ebi_eva_common_pyutils.egg-info/PKG-INFO +14 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_common_pyutils.egg-info/SOURCES.txt +1 -3
- ebi_eva_common_pyutils-0.6.16/ebi_eva_common_pyutils.egg-info/requires.txt +11 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/setup.py +3 -2
- ebi_eva_common_pyutils-0.6.14/PKG-INFO +0 -29
- ebi_eva_common_pyutils-0.6.14/ebi_eva_common_pyutils.egg-info/requires.txt +0 -10
- ebi_eva_common_pyutils-0.6.14/tests/test_common.py +0 -22
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/LICENSE +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/MANIFEST.in +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/README.md +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_common_pyutils/__init__.py +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_common_pyutils/assembly/__init__.py +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_common_pyutils/assembly/assembly.py +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_common_pyutils/assembly_utils.py +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_common_pyutils/biosamples_communicators.py +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_common_pyutils/command_utils.py +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_common_pyutils/common_utils.py +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_common_pyutils/config.py +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_common_pyutils/contig_alias/__init__.py +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_common_pyutils/contig_alias/contig_alias.py +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_common_pyutils/ena_utils.py +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_common_pyutils/file_utils.py +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_common_pyutils/logger.py +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_common_pyutils/ncbi_utils.py +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_common_pyutils/network_utils.py +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_common_pyutils/reference/__init__.py +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_common_pyutils/reference/assembly.py +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_common_pyutils/reference/sequence.py +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_common_pyutils/taxonomy/__init__.py +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_common_pyutils/variation/__init__.py +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_common_pyutils/variation/contig_utils.py +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_common_pyutils.egg-info/dependency_links.txt +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_common_pyutils.egg-info/top_level.txt +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_internal_pyutils/__init__.py +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_internal_pyutils/archive_directory.py +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_internal_pyutils/config_utils.py +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_internal_pyutils/metadata_utils.py +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_internal_pyutils/mongo_utils.py +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_internal_pyutils/mongodb/__init__.py +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_internal_pyutils/mongodb/mongo_database.py +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_internal_pyutils/nextflow/__init__.py +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_internal_pyutils/nextflow/nextflow_pipeline.py +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_internal_pyutils/pg_utils.py +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_internal_pyutils/spring_properties.py +0 -0
- {ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/setup.cfg +0 -0
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
Changelog for ebi_eva_common_pyutils
|
|
3
3
|
===========================
|
|
4
4
|
|
|
5
|
+
## 0.6.16 (2025-03-28)
|
|
6
|
+
----------------------
|
|
7
|
+
|
|
8
|
+
- New function to get the version of the EVA metadata template
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## 0.6.15 (2025-03-26)
|
|
12
|
+
----------------------
|
|
13
|
+
|
|
14
|
+
- Change the scientific name retrieval to first check in Ensembl then NCBI
|
|
15
|
+
|
|
16
|
+
|
|
5
17
|
## 0.6.14 (2025-03-05)
|
|
6
18
|
----------------------
|
|
7
19
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
2
|
Name: ebi_eva_common_pyutils
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.16
|
|
4
4
|
Summary: EBI EVA - Common Python Utilities
|
|
5
5
|
Home-page: https://github.com/EBIVariation/eva-common-pyutils
|
|
6
6
|
License: Apache
|
|
@@ -10,20 +10,5 @@ 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
|
-
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
13
|
Provides-Extra: eva-internal
|
|
20
|
-
|
|
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
|
|
14
|
+
License-File: LICENSE
|
|
@@ -16,6 +16,10 @@ import re
|
|
|
16
16
|
|
|
17
17
|
from ebi_eva_common_pyutils.ncbi_utils import retrieve_species_scientific_name_from_tax_id_ncbi
|
|
18
18
|
from ebi_eva_common_pyutils.network_utils import json_request
|
|
19
|
+
from ebi_eva_common_pyutils.logger import logging_config as log_cfg
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
logger = log_cfg.get_logger(__name__)
|
|
19
23
|
|
|
20
24
|
|
|
21
25
|
def get_scientific_name_from_ensembl(taxonomy_id: int) -> str:
|
|
@@ -41,12 +45,16 @@ def get_normalized_scientific_name_from_ensembl(taxonomy_id: int) -> str:
|
|
|
41
45
|
return normalise_taxon_scientific_name(get_scientific_name_from_ensembl(taxonomy_id))
|
|
42
46
|
|
|
43
47
|
|
|
44
|
-
def get_scientific_name_from_taxonomy(taxonomy_id: int) -> str:
|
|
48
|
+
def get_scientific_name_from_taxonomy(taxonomy_id: int, api_key: str=None) -> str:
|
|
45
49
|
"""
|
|
46
50
|
Search for a species scientific name based on the taxonomy id.
|
|
47
51
|
Will first attempt to retrieve from Ensembl and then NCBI, if not found returns None.
|
|
48
52
|
"""
|
|
49
|
-
|
|
53
|
+
try:
|
|
54
|
+
species_name = get_scientific_name_from_ensembl(taxonomy_id)
|
|
55
|
+
except Exception:
|
|
56
|
+
logger.warning("Failed to retrieve scientific name in Ensembl for taxonomy id {0}".format(taxonomy_id))
|
|
57
|
+
species_name = None
|
|
50
58
|
if not species_name:
|
|
51
|
-
species_name = retrieve_species_scientific_name_from_tax_id_ncbi(taxonomy_id)
|
|
59
|
+
species_name = retrieve_species_scientific_name_from_tax_id_ncbi(taxonomy_id, api_key=api_key)
|
|
52
60
|
return species_name
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: ebi-eva-common-pyutils
|
|
3
|
+
Version: 0.6.16
|
|
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
|
|
@@ -4,7 +4,6 @@ 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
|
|
8
7
|
ebi_eva_common_pyutils/__init__.py
|
|
9
8
|
ebi_eva_common_pyutils/assembly_utils.py
|
|
10
9
|
ebi_eva_common_pyutils/biosamples_communicators.py
|
|
@@ -42,5 +41,4 @@ ebi_eva_internal_pyutils/spring_properties.py
|
|
|
42
41
|
ebi_eva_internal_pyutils/mongodb/__init__.py
|
|
43
42
|
ebi_eva_internal_pyutils/mongodb/mongo_database.py
|
|
44
43
|
ebi_eva_internal_pyutils/nextflow/__init__.py
|
|
45
|
-
ebi_eva_internal_pyutils/nextflow/nextflow_pipeline.py
|
|
46
|
-
tests/test_common.py
|
|
44
|
+
ebi_eva_internal_pyutils/nextflow/nextflow_pipeline.py
|
|
@@ -7,12 +7,13 @@ 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.16',
|
|
11
11
|
license='Apache',
|
|
12
12
|
description='EBI EVA - Common Python Utilities',
|
|
13
13
|
url='https://github.com/EBIVariation/eva-common-pyutils',
|
|
14
14
|
keywords=['EBI', 'EVA', 'PYTHON', 'UTILITIES'],
|
|
15
|
-
install_requires=['requests', 'lxml', 'pyyaml', 'cached-property', 'retry'
|
|
15
|
+
install_requires=['requests==2.*', 'lxml>4.9,==4.*', 'pyyaml==6.*', 'cached-property==1.5.*', 'retry>0.9,==0.*',
|
|
16
|
+
'openpyxl==3.*'],
|
|
16
17
|
extras_require={'eva-internal': ['psycopg2-binary', 'pymongo', 'networkx<=2.5']},
|
|
17
18
|
classifiers=[
|
|
18
19
|
'Development Status :: 5 - Production/Stable',
|
|
@@ -1,29 +0,0 @@
|
|
|
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
|
|
@@ -1,22 +0,0 @@
|
|
|
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.14 → ebi_eva_common_pyutils-0.6.16}/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
|
|
File without changes
|
{ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_common_pyutils/config.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_common_pyutils/ena_utils.py
RENAMED
|
File without changes
|
{ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_common_pyutils/file_utils.py
RENAMED
|
File without changes
|
{ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_common_pyutils/logger.py
RENAMED
|
File without changes
|
{ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/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
|
{ebi_eva_common_pyutils-0.6.14 → ebi_eva_common_pyutils-0.6.16}/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.14 → ebi_eva_common_pyutils-0.6.16}/ebi_eva_internal_pyutils/pg_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|