From: Ed Bartosh <ed.bartosh@linux.intel.com>
To: "Damian, Alexandru" <alexandru.damian@intel.com>
Cc: "toaster@yoctoproject.org" <toaster@yoctoproject.org>
Subject: Re: [review-request] adamian/20150715_testfixes
Date: Thu, 30 Jul 2015 19:29:43 +0300 [thread overview]
Message-ID: <20150730162943.GA8013@linux.intel.com> (raw)
In-Reply-To: <CAJ2CSBuAaea46iSpUXS2Cxxb0kZmui=UzqiyAQ_92CgaivbzsA@mail.gmail.com>
Hi Alex,
Great!
Submitted your patches.
I've noticed that you didn't change sorting as I suggested.
Can you tell what's the reason?
Regards,
Ed
On Thu, Jul 30, 2015 at 12:35:15PM +0100, Damian, Alexandru wrote:
> Hello,
>
> I have pushed a new version for review, on the same branch:
>
> adamian/20150715_testfixes
>
> It tackles all the points you raised, and also brings in a new patch that
> tackles pylint issues specifically.
>
> I am running pylint with some tests disabled:
> disable=logging-too-many-args,line-too-long,missing-docstring
>
> And I get 10.00/10 code rating.
>
> Can you please review and submit ?
>
> Cheers,
> Alex
>
>
> On Thu, Jul 30, 2015 at 9:25 AM, Ed Bartosh <ed.bartosh@linux.intel.com>
> wrote:
>
> > Hi Alex,
> >
> > As you're in tts it's good time to pylint it.
> > The code is relatively small, so it shouldn't take much time.
> >
> > JFYI, here are some pylint statistics for tts code:
> > $ pylint --report n *.py |wc -l
> > 455
> >
> > $ pylint *.py |grep rated
> > Your code has been rated at 2.49/10
> >
> > Regards,
> > Ed
> >
> > On Thu, Jul 30, 2015 at 12:27:11AM +0300, Ed Bartosh wrote:
> > > Hi Alex,
> > >
> > > Your patchset looks ok for me.
> > >
> > > Just a bit of nitpicking over code quality:
> > >
> > > 1. Your change in shellutils.py caused new pylint error:
> > > E: 91, 0: inconsistent use of tabs and spaces in indentation
> > > (syntax-error)
> > >
> > > 2.
> > > - if len(result.errors) > 0:
> > > - map(lambda x: config.logger.error("Exception on test: %s" %
> > > pprint.pformat(x)), result.errors)
> > > + for x in result.errors:
> > > + config.logger.error("Exception on test: %s:\n%s\n" %
> > > (pprint.pformat(x[0]),
> > > + "\n".join(["-- %s" % x for x in x[1].split("\n")])))
> > >
> > > I'd suggest not to use format arguments for logging. You can read the
> > > detailed explanations here:
> > http://docs.pylint.org/features.html#messages
> > > Here is pylint warning caused by this:
> > > W: 49,23: Specify string format arguments as logging function parameters
> > > (logging-not-lazy)
> > >
> > > There are a lot of this kind of code in your patchset and in the tts
> > > code, so fixing all of them in separate commit would be good.
> > >
> > > 3. one character long variable names(x, e in your changes) are not very
> > readable:
> > > C: 40, 4: Invalid variable name "e" (invalid-name)
> > >
> > > 4. it would be better to assign os.path.join(self.crtdir,
> > "toaster.sqlite") to local
> > > variable:
> > > + if os.path.exists(os.path.join(self.crtdir,
> > > "toaster.sqlite")):
> > > + os.remove(os.path.join(self.crtdir, "toaster.sqlite"))
> > >
> > > 5. Mixed 2 different set of changes in commit " fix HTML5 compliance
> > > test". It's better to move logging improvements to another commit.
> > >
> > > 6. Typo in "execute tests in numeric order" commit message:
> > > undeeded -> unneeded
> > >
> > > 7. As your tests have the same prefix default sorting should be enough,
> > > e.g.
> > > In [1]: sorted(["Test01PySystemStart", "Test00PyCompilable",
> > "Test02HTML5Compliance"])
> > > Out[1]: ['Test00PyCompilable', 'Test01PySystemStart',
> > 'Test02HTML5Compliance']
> > > + # sorting the tests by the numeric order in the class name
> > > + tests = sorted(tests, key = lambda x: int(re.search(r"[0-9]+",
> > > x[1]).group(0)))
> > >
> > > 8. Mixed functionality and code readability fixes in "run pylint on the
> > toaster files"
> > >
> > > Regards,
> > > Ed
> > >
> > > On Thu, Jul 16, 2015 at 03:44:05PM +0100, Damian, Alexandru wrote:
> > > > Hello,
> > > >
> > > > I've improved the TTS tests a bit. At this moment, the tests spot YOCTO
> > > > #7955 (Toaster fails to retrieve recipe and machine information from
> > the
> > > > layer index) correctly.
> > > >
> > > > The patchset is at:
> > > >
> > > >
> > http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=adamian/20150715_testfixes
> > > >
> > >
> > > >
> > > > The toaster unit tests and the selenium tests are not run - it's going
> > to
> > > > be a different patchset on top of this one.
> > > >
> > > > Please review and merge at your own convenience.
> > > >
> > > > Cheers,
> > > > Alex
> > > >
> > > >
> > > > --
> > > > Alex Damian
> > > > Yocto Project
> > > > SSG / OTC
> > >
> > > > --
> > > > _______________________________________________
> > > > toaster mailing list
> > > > toaster@yoctoproject.org
> > > > https://lists.yoctoproject.org/listinfo/toaster
> > >
> > >
> > > --
> > > --
> > > Regards,
> > > Ed
> > > --
> > > _______________________________________________
> > > toaster mailing list
> > > toaster@yoctoproject.org
> > > https://lists.yoctoproject.org/listinfo/toaster
> >
> > --
> > --
> > Regards,
> > Ed
> >
>
>
>
> --
> Alex Damian
> Yocto Project
> SSG / OTC
--
Regards,
Ed
next prev parent reply other threads:[~2015-07-30 16:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-16 14:44 [review-request] adamian/20150715_testfixes Damian, Alexandru
2015-07-29 21:27 ` Ed Bartosh
2015-07-30 8:25 ` Ed Bartosh
2015-07-30 11:35 ` Damian, Alexandru
2015-07-30 16:29 ` Ed Bartosh [this message]
2015-07-30 20:57 ` Damian, Alexandru
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150730162943.GA8013@linux.intel.com \
--to=ed.bartosh@linux.intel.com \
--cc=alexandru.damian@intel.com \
--cc=toaster@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.