From 258774f88a7c7e7611b1747b5bff5642185ae01c Mon Sep 17 00:00:00 2001 From: April Shen Date: Fri, 14 Jun 2024 09:15:53 +0100 Subject: [PATCH] bump pyutils version and fix imports --- bin/add_target_assembly.py | 2 +- bin/genome_target_tracker.py | 4 ++-- eva_assembly_ingestion/assembly_ingestion_job.py | 11 ++++++----- eva_assembly_ingestion/custom_assembly.py | 4 ++-- requirements.txt | 2 +- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/bin/add_target_assembly.py b/bin/add_target_assembly.py index b297d5a..7b5c5db 100644 --- a/bin/add_target_assembly.py +++ b/bin/add_target_assembly.py @@ -13,7 +13,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from argparse import ArgumentParser, ArgumentError +from argparse import ArgumentParser from ebi_eva_common_pyutils.logger import logging_config diff --git a/bin/genome_target_tracker.py b/bin/genome_target_tracker.py index b597f80..0adb6c6 100644 --- a/bin/genome_target_tracker.py +++ b/bin/genome_target_tracker.py @@ -17,9 +17,9 @@ import requests from ebi_eva_common_pyutils.logger import logging_config -from ebi_eva_common_pyutils.metadata_utils import get_metadata_connection_handle, insert_new_assembly_and_taxonomy -from ebi_eva_common_pyutils.pg_utils import get_all_results_for_query from ebi_eva_common_pyutils.taxonomy.taxonomy import get_scientific_name_from_ensembl +from ebi_eva_internal_pyutils.metadata_utils import get_metadata_connection_handle, insert_new_assembly_and_taxonomy +from ebi_eva_internal_pyutils.pg_utils import get_all_results_for_query logger = logging_config.get_logger(__name__) logging_config.add_stdout_handler() diff --git a/eva_assembly_ingestion/assembly_ingestion_job.py b/eva_assembly_ingestion/assembly_ingestion_job.py index 0af5c06..6af3e63 100644 --- a/eva_assembly_ingestion/assembly_ingestion_job.py +++ b/eva_assembly_ingestion/assembly_ingestion_job.py @@ -21,14 +21,14 @@ from ebi_eva_common_pyutils.command_utils import run_command_with_output from ebi_eva_common_pyutils.common_utils import pretty_print from ebi_eva_common_pyutils.config import cfg -from ebi_eva_common_pyutils.config_utils import get_contig_alias_db_creds_for_profile from ebi_eva_common_pyutils.contig_alias.contig_alias import ContigAliasClient from ebi_eva_common_pyutils.logger import AppLogger -from ebi_eva_common_pyutils.metadata_utils import get_metadata_connection_handle, insert_new_assembly_and_taxonomy, \ - add_to_supported_assemblies -from ebi_eva_common_pyutils.pg_utils import execute_query, get_all_results_for_query -from ebi_eva_common_pyutils.spring_properties import SpringPropertiesGenerator from ebi_eva_common_pyutils.taxonomy.taxonomy import get_scientific_name_from_taxonomy +from ebi_eva_internal_pyutils.config_utils import get_contig_alias_db_creds_for_profile +from ebi_eva_internal_pyutils.metadata_utils import get_metadata_connection_handle, insert_new_assembly_and_taxonomy, \ + add_to_supported_assemblies +from ebi_eva_internal_pyutils.pg_utils import execute_query, get_all_results_for_query +from ebi_eva_internal_pyutils.spring_properties import SpringPropertiesGenerator from psycopg2.extras import execute_values from eva_assembly_ingestion.config import get_nextflow_config_flag @@ -37,6 +37,7 @@ SUPPORTED_ASSEMBLY_TRACKER_TABLE = "evapro.supported_assembly_tracker" + class AssemblyIngestionJob(AppLogger): all_tasks = ['load_tracker', 'remap_cluster', 'update_dbs'] tracking_table = 'eva_progress_tracker.remapping_tracker' diff --git a/eva_assembly_ingestion/custom_assembly.py b/eva_assembly_ingestion/custom_assembly.py index a49fd01..8982684 100755 --- a/eva_assembly_ingestion/custom_assembly.py +++ b/eva_assembly_ingestion/custom_assembly.py @@ -22,8 +22,8 @@ from cached_property import cached_property from ebi_eva_common_pyutils.config import cfg from ebi_eva_common_pyutils.logger import AppLogger -from ebi_eva_common_pyutils.metadata_utils import get_metadata_connection_handle -from ebi_eva_common_pyutils.pg_utils import get_all_results_for_query +from ebi_eva_internal_pyutils.metadata_utils import get_metadata_connection_handle +from ebi_eva_internal_pyutils.pg_utils import get_all_results_for_query from retry import retry diff --git a/requirements.txt b/requirements.txt index 2880952..12aad7c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -ebi-eva-common-pyutils==0.5.5 +ebi-eva-common-pyutils[internal]==0.6.7 pyyaml requests retry