[Fuego] [PATCH 2/2] ftc: add global name 'board_name'
Tim.Bird at sony.com
Tim.Bird at sony.com
Tue Jun 12 02:58:24 UTC 2018
> -----Original Message-----
> From: Daniel Sangorrin
> > -----Original Message-----
> > From: Tim.Bird at sony.com
> > > -----Original Message-----
> > > From: Daniel Sangorrin
> > > Sent: Thursday, May 24, 2018 12:04 AM
> > > To: 'Liu Wenlong' <liuwl.fnst at cn.fujitsu.com>;
> > > fuego at lists.linuxfoundation.org
> > > Subject: Re: [Fuego] [PATCH 2/2] ftc: add global name 'board_name'
> > >
> > > Ouch I was touching this part of the code and didn't notice Tim's recent
> > > commits.
> > > Tim: no plans on using argparse?
> > I'm not opposed to refactoring and simplifying the argument
> > parsing across the board for ftc sub-commands. I did this
> > refactoring as a quick one-off as I was working on a
> > (not published yet) new 'ftc set-criteria' command.
> > Nothing done here is set in stone, and if you or someone else
> > wants to refactor stuff using argparse, I'll be receptive to it.
> > What we have now for argument parsing is a real mishmash, which
> > I'm not too fond of. But it's rather easy to follow (well - modulo
> > dumb bugs like the one I introduced and Liu found).
> > One thing that would be good IMHO, would be to always use -b
> > to specify a board, always -t for a test, etc. Some commands use
> > positional arguments for items when they are mandatory, which is a
> > bit less typing for those commands, but less uniform, and probably
> > presents a steeper learning curve.
> > What do you think?
> > -- Tim
> Yes, I noticed those. I agree that they should be the same for all.
> For example, -p was used for test_plans but now it is used also for phases.
I regret that choice. This could be changed to something like '-z' or '--phases'.
> I think that long names might be better in some cases. Also ftc add-
> nodes/rm-nodes does not require the -b option.
It might be nice for consistency sake if they did. We could add the
wildcard or list-handling to a single place, and all commands using
e.g. boards, tests, etc. could use it.
> I will add argparse refactoring to my growing TODO list ;).
This is something I wanted to get back to, but I've always had
too many other sticks in the fire. We can discuss in Japan
if you're likely to get to it soon, and I can take a stab at it
(if I have some free time).
More information about the Fuego