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: Sun, 07 Jun 2009 22:03:06 -0300 [thread overview]
Message-ID: <1244422986.3678.24.camel@localhost.localdomain> (raw)
In-Reply-To: <1827721782.1383981244378700208.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>
On Sun, 2009-06-07 at 08:45 -0400, Michael Goldish wrote:
> Hi Lucas,
Hi Michael! The docstring standard wasn't defined for quite some time on
autotest, but now we're on our way to have a definition. On January
(2009) we had some conversation about the docstring format but we didn't
formalize the results of the discussion. During the previous week, I've
proposed a patch to the style guide with the format I've used on the kvm
test
http://test.kernel.org/pipermail/autotest/2009-June/003567.html
So older autotest code will probably not follow this convention, and
eventually we can fix the non compliances with time.
> I'm a little confused about docstrings -- maybe you can clarify this for me.
> I've looked at the new KVM test that contains your recent modifications, and found a few inconsistencies:
>
> - In the KVM test the summary line of a docstring appears on the line following the opening quotes, e.g.
>
> """
> Summary line.
>
> Description.
> """
>
> but other Autotest source files (e.g. client/common_lib/pxssh.py) use the previous format (from before the recent modifications) where the summary line appears on the same line as the opening quotes:
>
> """Summary line.
>
> Description.
> """
> (Autotest is also somewhat inconsistent with itself -- every file in client/common_lib has its own docstring conventions.)
>
> - In some functions in the KVM test (e.g. create() in kvm_vm.py) the summary line, followed by a blank line, is actually a summary paragraph consisting of several lines. PEP 257 (http://www.python.org/dev/peps/pep-0257/#multi-line-docstrings) states that the summary line should fit on a single line (and should be followed by a blank line).
We are aiming for a format slightly different than the recommendations
on the PEP. @brief would be the summary of the function, if needed.
> - In the KVM test the @param/@author/@note keywords are used. In other files in Autotest (e.g. client/common_lib/packages.py) they are not.
As the docstring format is new, older code won't follow it. Eventually
we might want to make patches to straighten things out, but it's not a
priority.
> - In kvm_config.py, the @param lines are indented relative to the first docstring line. In other files (e.g. kvm_vm.py) they are not.
My mistake :)
> Thanks,
> Michael
--
Lucas Meneghel Rodrigues
Software Engineer (QE)
Red Hat - Emerging Technologies
next prev parent reply other threads:[~2009-06-08 1:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1935668424.1383961244378697342.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>
2009-06-07 12:45 ` [KVM-AUTOTEST] Style guides for autotest Michael Goldish
2009-06-08 1:03 ` Lucas Meneghel Rodrigues [this message]
[not found] <432028176.1384131244380534134.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>
2009-06-07 13:18 ` Michael Goldish
2009-06-08 4:35 ` 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=1244422986.3678.24.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