From 76c96e0c439dc19a9a12b40e4597e7b1792387f8 Mon Sep 17 00:00:00 2001 From: John Gerrard Holland Date: Mon, 4 Mar 2024 18:22:03 -0500 Subject: [PATCH 1/3] chore: replace print with logging in generate_colors.py --- src/icesat2_tracks/config/generate_colors.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/icesat2_tracks/config/generate_colors.py b/src/icesat2_tracks/config/generate_colors.py index b6a792b6..7e46fdd0 100644 --- a/src/icesat2_tracks/config/generate_colors.py +++ b/src/icesat2_tracks/config/generate_colors.py @@ -1,6 +1,10 @@ #%matplotlib inline +import logging + from icesat2_tracks.local_modules import m_colormanager_ph3 as M_color +_logger = logging.getLogger(__name__) + mconfig['paths'] path=mconfig['paths']['config'] A = M_color.ase_to_json(path+'color_def.ase') @@ -8,7 +12,7 @@ B=dict() for i in A[0]['swatches']: B[i['name']] = i['data']['values'] - print(i['name'] + ' ' + str(i['data']['values'])) + _logger.debug("%s %s", i['name'], str(i['data']['values'])) rels=dict() From 7244e0884ec328d1ac1bcf0ef27eb6dbff68cb67 Mon Sep 17 00:00:00 2001 From: John Gerrard Holland Date: Mon, 4 Mar 2024 18:22:25 -0500 Subject: [PATCH 2/3] chore: replace print with logging in icesat2_startup.py --- src/icesat2_tracks/config/IceSAT2_startup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/icesat2_tracks/config/IceSAT2_startup.py b/src/icesat2_tracks/config/IceSAT2_startup.py index d1e27938..2d1daed8 100644 --- a/src/icesat2_tracks/config/IceSAT2_startup.py +++ b/src/icesat2_tracks/config/IceSAT2_startup.py @@ -1,3 +1,4 @@ +import logging import os import pathlib import string @@ -6,6 +7,7 @@ from icesat2_tracks.local_modules import m_colormanager_ph3 as M_color from icesat2_tracks.local_modules import m_tools_ph3 as MT +_logger = logging.getLogger(__name__) ## Read folders and configuration paths config_dir_path = os.path.dirname(__file__) From 69e617bc3c6515998af8157d59dedf8c2cb7a11b Mon Sep 17 00:00:00 2001 From: John Gerrard Holland Date: Tue, 5 Mar 2024 15:44:23 -0500 Subject: [PATCH 3/3] Update src/icesat2_tracks/config/generate_colors.py Co-authored-by: Carlos Paniagua --- src/icesat2_tracks/config/generate_colors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/icesat2_tracks/config/generate_colors.py b/src/icesat2_tracks/config/generate_colors.py index 7e46fdd0..7db4465b 100644 --- a/src/icesat2_tracks/config/generate_colors.py +++ b/src/icesat2_tracks/config/generate_colors.py @@ -12,7 +12,7 @@ B=dict() for i in A[0]['swatches']: B[i['name']] = i['data']['values'] - _logger.debug("%s %s", i['name'], str(i['data']['values'])) + _logger.debug("swatch name: %s, values: %s", i['name'], i['data']['values']) rels=dict()