[dpdk-ci] [PATCH 1/9] tools: rename guess_git_tree script
Ali Alnubani
alialnu at oss.nvidia.com
Wed Sep 8 18:54:27 CEST 2021
> -----Original Message-----
> From: Juraj Linkeš <juraj.linkes at pantheon.tech>
> Sent: Tuesday, September 7, 2021 2:03 PM
> To: Ali Alnubani <alialnu at nvidia.com>; ci at dpdk.org
> Cc: NBU-Contact-Thomas Monjalon <thomas at monjalon.net>;
> jerinj at marvell.com; ferruh.yigit at intel.com; david.marchand at redhat.com
> Subject: RE: [dpdk-ci] [PATCH 1/9] tools: rename guess_git_tree script
>
>
>
> > -----Original Message-----
> > From: ci <ci-bounces at dpdk.org> On Behalf Of Ali Alnubani
> > Sent: Monday, September 6, 2021 5:45 PM
> > To: ci at dpdk.org
> > Cc: thomas at monjalon.net; jerinj at marvell.com; ferruh.yigit at intel.com;
> > david.marchand at redhat.com
> > Subject: [dpdk-ci] [PATCH 1/9] tools: rename guess_git_tree script
> >
> > The name 'maintainers.py' will make more sense when adding more
> > operations to the script.
> >
>
> A noun evokes something non-executable and in my opinion 'maintainers.py'
> doesn't describe what the script does in any way.
>
> As far as I can tell, the script (with all the new changes) gets data from
> patchwork and the maintainers file and then processes those to produce a
> list of trees, maintainers or updates PW. Maybe name it
> pw_maintainers_cli.py?
>
> Another thing that would make sense it to make the "--command" argument
> positional, since it's mandatory and the argument name isn't really necessary.
> But maybe that's a change for another series.
Thanks for taking a look Juraj, I agree with the name you suggested, and I'll update in v2.
I'll also try to implement your second suggestion in that version.
>
> > Signed-off-by: Ali Alnubani <alialnu at nvidia.com>
> > ---
> > tools/{guess_git_tree.py => maintainers.py} | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-) rename
> > tools/{guess_git_tree.py => maintainers.py} (98%)
> >
> > diff --git a/tools/guess_git_tree.py b/tools/maintainers.py similarity
> > index 98% rename from tools/guess_git_tree.py rename to
> > tools/maintainers.py index
> > c9eef39..0cf1907 100755
> > --- a/tools/guess_git_tree.py
> > +++ b/tools/maintainers.py
> > @@ -31,13 +31,13 @@ variables PW_{SERVER,PROJECT,TOKEN} should be
> set.
> > If not, the script will try to load the git configurations
> pw.{server,project,token}.
> >
> > Example usage:
> > - ./guess-git-tree.py --command list_trees_for_series 2054
> > - ./guess-git-tree.py --command list_trees_for_patch 2054
> > + ./maintainers.py --command list_trees_for_series 2054
> > + ./maintainers.py --command list_trees_for_patch 2054
> >
> > Or if you want to use inside other scripts:
> >
> > import os
> > - from guess_git_tree import (Maintainers, GitPW, Diff)
> > + from maintainers import (Maintainers, GitPW, Diff)
> > _git_pw = GitPW({
> > 'pw_server': os.environ.get('PW_SERVER'),
> > 'pw_project': os.environ.get('PW_PROJECT'),
> > --
> > 2.25.1
> >
>
More information about the ci
mailing list