[libcamera-devel] [PATCH 00/10] utils: raspberrypi: ctt: Improve JSON pretty printer

Laurent Pinchart laurent.pinchart at ideasonboard.com
Fri Jul 3 18:12:27 CEST 2020


Hi David,

On Fri, Jul 03, 2020 at 03:18:05PM +0100, David Plowman wrote:
> Hi Laurent
> 
> Thanks for doing all this, that was a totally unexpected but nice
> surprise! Anyway, I've downloaded and tried the whole set, and had
> just a couple of very minor questions.
> 
> 1. Can we be bothered to reformat the existing json files? Personally,
> I don't mind either way.

I don't mind either way either. If you think they should be reformated,
please feel free to send patches.

> 2. I found ctt_pretty_print.py did not have executable permissions. Is
> that just because I applied the patches to my tree or is it something
> we could fix up?

It didn't have executable permissions to start with, so I haven't
changed that. As executing it directly is really meant to debug the
code, I'm not sure we should change the permissions. It may give a wrong
impression that it's meant to be a standalone tool directly useful to
the users.

> But otherwise, can I add
> 
> Reviewed-by: David Plowman <david.plowman at raspberrypi.com>
> Tested-by: David Plowman <david.plowman at raspberrypi.com>
> 
> for the whole lot?

Sure, thanks you :-) I've now pushed the patches.

> On Fri, 3 Jul 2020 at 01:14, Laurent Pinchart wrote:
> >
> > Hello,
> >
> > This patch series improves the JSON pretty printer in the Raspberry Pi
> > ctt tool. In particular it gets rid of blank lines in empty
> > dictionaries, addressing Jacopo's comment in reply to "[PATCH v2]
> > libcamera: ipa: raspberrypi: Enable focus measure without recompile".
> >
> > The patches have been tested on the JSON files in the
> > src/ipa/raspberrypi/data/ directory.
> >
> > Laurent Pinchart (10):
> >   utils: raspberrypi: ctt: json_pretty_print: Fix printer test
> >   utils: raspberrypi: ctt: json_pretty_print: Turn printer into a class
> >   utils: raspberrypi: ctt: json_pretty_print: Make output file a class
> >     member
> >   utils: raspberrypi: ctt: json_pretty_print: Make test output to stdout
> >   utils: raspberrypi: ctt: json_pretty_print: Skip all spaces
> >   utils: raspberrypi: ctt: json_pretty_print: Add character write method
> >   utils: raspberrypi: ctt: json_pretty_print: Fix indentation handling
> >   utils: raspberrypi: ctt: json_pretty_print: Collapse newlines
> >   utils: raspberrypi: ctt: json_pretty_print: Avoid spaces at end of
> >     lines
> >   utils: raspberrypi: ctt: json_pretty_print: Add newline at end of
> >     output
> >
> >  .../raspberrypi/ctt/ctt_pretty_print_json.py  | 143 +++++++++++-------
> >  1 file changed, 87 insertions(+), 56 deletions(-)

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list