From 4cc5fe52af912a22a9fb19f34949e1e53ff59bb4 Mon Sep 17 00:00:00 2001 From: Khoroshevskyi Date: Tue, 8 Oct 2024 14:40:30 -0400 Subject: [PATCH 1/4] updated exception handling in init objects --- bbconf/config_parser/bedbaseconfig.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bbconf/config_parser/bedbaseconfig.py b/bbconf/config_parser/bedbaseconfig.py index 66a3c1e..3b93b41 100644 --- a/bbconf/config_parser/bedbaseconfig.py +++ b/bbconf/config_parser/bedbaseconfig.py @@ -281,11 +281,16 @@ def _init_boto3_client( warnings.warn(f"Error in creating boto3 client object: {e}", UserWarning) return None - def _init_r2v_object(self) -> Region2VecExModel: + def _init_r2v_object(self) -> Union[Region2VecExModel, None]: """ Create Region2VecExModel object using credentials provided in config file """ - return Region2VecExModel(self.config.path.region2vec) + try: + return Region2VecExModel(self.config.path.region2vec) + except Exception as e: + _LOGGER.error(f"Error in creating Region2VecExModel object: {e}") + warnings.warn(f"Error in creating Region2VecExModel object: {e}", UserWarning) + return None def upload_s3(self, file_path: str, s3_path: Union[Path, str]) -> None: """ From 5bbc9ff01045e6e709cfb0d353980e807c8a69b2 Mon Sep 17 00:00:00 2001 From: Khoroshevskyi Date: Wed, 9 Oct 2024 16:06:10 -0400 Subject: [PATCH 2/4] updated geniml requirements --- requirements/requirements-all.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/requirements-all.txt b/requirements/requirements-all.txt index 1d2c424..632eb21 100644 --- a/requirements/requirements-all.txt +++ b/requirements/requirements-all.txt @@ -1,6 +1,6 @@ yacman >= 0.9.1 sqlalchemy >= 2.0.0 -geniml[ml] >= 0.4.2 +geniml[ml] >= 0.4.3 psycopg >= 3.1.15 colorlogs pydantic >= 2.9.0 From 6c23fe443899f0cd04fbf7d99c2c717ad26b18db Mon Sep 17 00:00:00 2001 From: Khoroshevskyi Date: Tue, 15 Oct 2024 10:21:26 -0400 Subject: [PATCH 3/4] updated requirements and version --- bbconf/_version.py | 2 +- requirements/requirements-all.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bbconf/_version.py b/bbconf/_version.py index 49e0fc1..a5f830a 100644 --- a/bbconf/_version.py +++ b/bbconf/_version.py @@ -1 +1 @@ -__version__ = "0.7.0" +__version__ = "0.7.1" diff --git a/requirements/requirements-all.txt b/requirements/requirements-all.txt index 632eb21..d84476c 100644 --- a/requirements/requirements-all.txt +++ b/requirements/requirements-all.txt @@ -1,6 +1,7 @@ yacman >= 0.9.1 sqlalchemy >= 2.0.0 geniml[ml] >= 0.4.3 +geniml[ml] < 0.5.0 psycopg >= 3.1.15 colorlogs pydantic >= 2.9.0 From 5b5fff62d8e51ad2e75c4ed6921bdd0559c9b703 Mon Sep 17 00:00:00 2001 From: Khoroshevskyi Date: Tue, 15 Oct 2024 10:23:00 -0400 Subject: [PATCH 4/4] lint --- bbconf/config_parser/bedbaseconfig.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bbconf/config_parser/bedbaseconfig.py b/bbconf/config_parser/bedbaseconfig.py index 3b93b41..e14468f 100644 --- a/bbconf/config_parser/bedbaseconfig.py +++ b/bbconf/config_parser/bedbaseconfig.py @@ -289,7 +289,9 @@ def _init_r2v_object(self) -> Union[Region2VecExModel, None]: return Region2VecExModel(self.config.path.region2vec) except Exception as e: _LOGGER.error(f"Error in creating Region2VecExModel object: {e}") - warnings.warn(f"Error in creating Region2VecExModel object: {e}", UserWarning) + warnings.warn( + f"Error in creating Region2VecExModel object: {e}", UserWarning + ) return None def upload_s3(self, file_path: str, s3_path: Union[Path, str]) -> None: