Skip to content

Commit

Permalink
setting the right logger level
Browse files Browse the repository at this point in the history
  • Loading branch information
nitin-ebi committed Oct 9, 2023
1 parent 45e3c61 commit 86d9ac6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions update_sc_name/update_scientific_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
from ebi_eva_common_pyutils.pg_utils import execute_query, get_all_results_for_query
from ebi_eva_common_pyutils.taxonomy.taxonomy import normalise_taxon_scientific_name, get_scientific_name_from_ensembl

logger = logging_config.get_logger(__name__, logging.DEBUG)

logging_config.add_stdout_handler()
logger = logging_config.get_logger(__name__)

def get_scientific_name_from_eva(taxonomy_id, private_config_xml_file, profile):
with get_metadata_connection_handle(profile, private_config_xml_file) as pg_conn:
Expand All @@ -26,7 +26,7 @@ def update_path_reference_sequence(taxonomy, old_sc_name, new_sc_name, ref_seq_d
nmz_new_sc_name = normalise_taxon_scientific_name(new_sc_name)
new_species_ref_dir = os.path.join(ref_seq_dir, nmz_new_sc_name)

logger.warning(f"normalize old scientific name : {nmz_old_sc_name}, old species ref dir: {old_species_ref_dir}, "
logger.info(f"normalize old scientific name : {nmz_old_sc_name}, old species ref dir: {old_species_ref_dir}, "
f"normalize new scientific name: {nmz_new_sc_name}, new species ref dir: {new_species_ref_dir}")

if old_species_ref_dir == new_species_ref_dir:
Expand Down Expand Up @@ -93,7 +93,7 @@ def main():
# update directory name in reference sequence directory
old_sc_name = get_scientific_name_from_eva(args.taxonomy, args.private_config_xml_file, args.profile)
new_sc_name = args.scientific_name or get_scientific_name_from_ensembl(args.taxonomy)
logger.warning(f"old scientific name: {old_sc_name}, new scientific name: {new_sc_name}")
logger.info(f"old scientific name: {old_sc_name}, new scientific name: {new_sc_name}")

update_path_reference_sequence(args.taxonomy, old_sc_name, new_sc_name, args.ref_seq_dir, args.ref_seq_dir_name,
args.retain_old_dir)
Expand Down

0 comments on commit 86d9ac6

Please sign in to comment.