[v4,12/23] libtuning: Be a bit more verbose
diff mbox series

Message ID 20240705144209.418906-13-stefan.klug@ideasonboard.com
State Accepted
Headers show
Series
  • Add ccm calibration to libtuning
Related show

Commit Message

Stefan Klug July 5, 2024, 2:41 p.m. UTC
Print a info on every image that gets processed and a warning on every
image that gets ignored.

Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
---
 utils/tuning/libtuning/utils.py | 2 ++
 1 file changed, 2 insertions(+)

Comments

Dan Scally July 5, 2024, 4:01 p.m. UTC | #1
Hi Stefan

On 05/07/2024 15:41, Stefan Klug wrote:
> Print a info on every image that gets processed and a warning on every
> image that gets ignored.
>
> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
> ---
>   utils/tuning/libtuning/utils.py | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/utils/tuning/libtuning/utils.py b/utils/tuning/libtuning/utils.py
> index 93c6c94ea2b0..dacda11312a2 100644
> --- a/utils/tuning/libtuning/utils.py
> +++ b/utils/tuning/libtuning/utils.py
> @@ -92,7 +92,9 @@ def load_images(input_dir: str, config: dict, load_nonlsc: bool, load_lsc: bool)
>       images = []
>       for f in files:
>           color, lux, lsc_only = _parse_image_filename(f)
> +        logger.info(f'Process image "{f.name}" (color={color}, lux={lux}, lsc_only={lsc_only})')
>           if color is None:
> +            logger.warning(f'Ignoring "{f.name}" as it has no associated color temperature')
>               continue


Personally I think print the info line after the continue so that a file we're ignoring doesn't get 
both, but either way:


Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>

>   
>           # Skip lsc image if we don't need it
Stefan Klug July 5, 2024, 7:06 p.m. UTC | #2
Hi Dan,

Thanks for the review.

On Fri, Jul 05, 2024 at 05:01:39PM +0100, Dan Scally wrote:
> Hi Stefan
> 
> On 05/07/2024 15:41, Stefan Klug wrote:
> > Print a info on every image that gets processed and a warning on every
> > image that gets ignored.
> > 
> > Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
> > Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
> > ---
> >   utils/tuning/libtuning/utils.py | 2 ++
> >   1 file changed, 2 insertions(+)
> > 
> > diff --git a/utils/tuning/libtuning/utils.py b/utils/tuning/libtuning/utils.py
> > index 93c6c94ea2b0..dacda11312a2 100644
> > --- a/utils/tuning/libtuning/utils.py
> > +++ b/utils/tuning/libtuning/utils.py
> > @@ -92,7 +92,9 @@ def load_images(input_dir: str, config: dict, load_nonlsc: bool, load_lsc: bool)
> >       images = []
> >       for f in files:
> >           color, lux, lsc_only = _parse_image_filename(f)
> > +        logger.info(f'Process image "{f.name}" (color={color}, lux={lux}, lsc_only={lsc_only})')
> >           if color is None:
> > +            logger.warning(f'Ignoring "{f.name}" as it has no associated color temperature')
> >               continue
> 
> 
> Personally I think print the info line after the continue so that a file
> we're ignoring doesn't get both, but either way:
>

Ack. I'll fix that when merging.

Regards,
Stefan


> 
> Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
> 
> >           # Skip lsc image if we don't need it

Patch
diff mbox series

diff --git a/utils/tuning/libtuning/utils.py b/utils/tuning/libtuning/utils.py
index 93c6c94ea2b0..dacda11312a2 100644
--- a/utils/tuning/libtuning/utils.py
+++ b/utils/tuning/libtuning/utils.py
@@ -92,7 +92,9 @@  def load_images(input_dir: str, config: dict, load_nonlsc: bool, load_lsc: bool)
     images = []
     for f in files:
         color, lux, lsc_only = _parse_image_filename(f)
+        logger.info(f'Process image "{f.name}" (color={color}, lux={lux}, lsc_only={lsc_only})')
         if color is None:
+            logger.warning(f'Ignoring "{f.name}" as it has no associated color temperature')
             continue
 
         # Skip lsc image if we don't need it