public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Lucas Meneghel Rodrigues <lmr@redhat.com>
To: Michael Goldish <mgoldish@redhat.com>
Cc: jasowang@redhat.com, aeromenk@redhat.com,
	Mike Burns <mburns@redhat.com>,
	yzhou@redhat.com, supriyak@in.ibm.com, byang@redhat.com,
	Yogi <anantyog@linux.vnet.ibm.com>, David Huff <dhuff@redhat.com>,
	Dor Laor <dlaor@redhat.com>,
	Autotest mailing list <autotest@test.kernel.org>,
	KVM mailing list <kvm@vger.kernel.org>
Subject: Re: [KVM-AUTOTEST] Style guides for autotest
Date: Mon, 08 Jun 2009 01:35:34 -0300	[thread overview]
Message-ID: <1244435734.2666.13.camel@localhost.localdomain> (raw)
In-Reply-To: <1823305158.1384151244380682202.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>

On Sun, 2009-06-07 at 09:18 -0400, Michael Goldish wrote:
> Sorry, I forgot two things:
> 
> - PEP 8 states that class methods should be separated by a single blank line (whereas top level functions should be separated by two blank lines). After the recent modifications, the KVM test no longer follows this convention as its class methods are separated by two blank lines.

On autotest, we opted by separate both functions and class methods using
2 lines, 'overriding' the PEP on this aspect in particular.

> - PEP 257 states that a class docstring should be separated by a single blank line from the class header and from the first method following the docstring, e.g.
> 
> class VM:
> 
>     """
>     This class ...
>     """
> 
>     def __init__(...
> 
> The KVM test no longer follows this convention after the merge (in kvm_vm.py, kvm_config.py, kvm_utils.py, kvm.py and possibly other files).

Indeed we didn't follow that recommendation. Will look at fix that one.

> There may be a few more style "violations" or inconsistencies I forgot to mention, or just haven't noticed yet.
> 
> I realize PEPs are merely recommendations, but since Autotest doesn't have a consistent style of its own, why not follow the PEPs?

Agree. On the CODING_STYLE document, we state:

{{{
Base coding style

When writing python code, unless otherwise stated, stick to the python
style guide (http://www.python.org/dev/peps/pep-0008/).
}}}

We want to make the autotest coding standard conventions as consistent
as possible. Inside the code, some mistakes might have happened, and
eventually, those will be fixed out.

Thanks for your comments, will work to get things as consistent as
possible!


-- 
Lucas Meneghel Rodrigues
Software Engineer (QE)
Red Hat - Emerging Technologies


  reply	other threads:[~2009-06-08  4:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <432028176.1384131244380534134.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>
2009-06-07 13:18 ` [KVM-AUTOTEST] Style guides for autotest Michael Goldish
2009-06-08  4:35   ` Lucas Meneghel Rodrigues [this message]
     [not found] <1935668424.1383961244378697342.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>
2009-06-07 12:45 ` Michael Goldish
2009-06-08  1:03   ` Lucas Meneghel Rodrigues
2009-06-05 17:55 Lucas Meneghel Rodrigues

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=1244435734.2666.13.camel@localhost.localdomain \
    --to=lmr@redhat.com \
    --cc=aeromenk@redhat.com \
    --cc=anantyog@linux.vnet.ibm.com \
    --cc=autotest@test.kernel.org \
    --cc=byang@redhat.com \
    --cc=dhuff@redhat.com \
    --cc=dlaor@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mburns@redhat.com \
    --cc=mgoldish@redhat.com \
    --cc=supriyak@in.ibm.com \
    --cc=yzhou@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox