From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 003B54227B; Fri, 1 Sep 2023 19:03:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 836D640285; Fri, 1 Sep 2023 19:03:11 +0200 (CEST) Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by mails.dpdk.org (Postfix) with ESMTP id 9E7D44014F for ; Fri, 1 Sep 2023 19:03:10 +0200 (CEST) Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-68a42d06d02so1875475b3a.0 for ; Fri, 01 Sep 2023 10:03:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1693587789; x=1694192589; darn=dpdk.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=3BkHQSjllIKu6CAaPvECFRd3y/VcmxqKwS0hF0fD7Ls=; b=DUhlxmc3wN8ltefino6EcVUdmxl+sBOQPGKJosNL9wYjD4vY2TnYdN54z1FPz+cGsS IJfJXmr3wFhGiQ0ExhKmZhv9oPcEXoRcyO5cqCh5XiiJknTrhSSQIS8snvSu+W7OM5b3 DbjufycpURWp8MXH21JWYp+KI9PPO7wVw62Xg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693587789; x=1694192589; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3BkHQSjllIKu6CAaPvECFRd3y/VcmxqKwS0hF0fD7Ls=; b=fhUzdrVJIU7C032TtUnbdj/ChBLCte3DcVUA5xooaW/riUwnAkl00j0w3xZ1iZnZwJ TiRQBGF32twKXFEjJM9T8UeZq0Tw2QVgAFRZGSaLIl94aw1f39NjrcnxFrmuxL7JzilK 3EaMesMz/RFt8UtQiSk2IkZwHUUOHSnhQY7Inn6iveWY5tDWuQIURMIIWIjhzCqNyyfF uA/hW/p8Si8qvdisTF+4cqBi+84ae1s3I3RgZ+hr3FhhIBV/wTc4KYQGUQ3wXwYvhPzt E2jrOdDYmicZX47lU7AVupuZlJJw89ksLQ0D+63pvQGL+O3PYo1NqO9hQJzlAAO8cSy0 /ZQw== X-Gm-Message-State: AOJu0YxQZLdK+sGsbPYlJ40FzA711Skqu3rSL3IvA2LLwdE78zWXy189 lVQ55AKMG0TmI+Gy26Nki6LHu7oq0gqnqmRB6PfOuA== X-Google-Smtp-Source: AGHT+IE3aGAdrtlZ2zvxm6rBN2qEM79U+MsYos2I+YXNlI7ljPaNLnLBbDOZYptGWXPw/vbDT2yENQUaBep5/RsSqhs= X-Received: by 2002:a17:90b:124e:b0:26d:14cd:fb1a with SMTP id gx14-20020a17090b124e00b0026d14cdfb1amr2999801pjb.23.1693587789427; Fri, 01 Sep 2023 10:03:09 -0700 (PDT) MIME-Version: 1.0 References: <20230511091408.236638-1-juraj.linkes@pantheon.tech> <20230831100407.59865-1-juraj.linkes@pantheon.tech> <20230831100407.59865-5-juraj.linkes@pantheon.tech> In-Reply-To: <20230831100407.59865-5-juraj.linkes@pantheon.tech> From: Jeremy Spewock Date: Fri, 1 Sep 2023 13:02:58 -0400 Message-ID: Subject: Re: [RFC PATCH v4 4/4] dts: format docstrigs to google format To: =?UTF-8?Q?Juraj_Linke=C5=A1?= Cc: thomas@monjalon.net, Honnappa.Nagarahalli@arm.com, lijuan.tu@intel.com, bruce.richardson@intel.com, probb@iol.unh.edu, dev@dpdk.org Content-Type: multipart/alternative; boundary="00000000000095cfbf06044f2275" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org --00000000000095cfbf06044f2275 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Aug 31, 2023 at 6:04=E2=80=AFAM Juraj Linke=C5=A1 wrote: > WIP: only one module is reformatted to serve as a demonstration. > > The google format is documented here [0]. > > [0]: https://google.github.io/styleguide/pyguide.html > > Signed-off-by: Juraj Linke=C5=A1 > --- > dts/framework/testbed_model/node.py | 171 +++++++++++++++++++--------- > 1 file changed, 118 insertions(+), 53 deletions(-) > > diff --git a/dts/framework/testbed_model/node.py > b/dts/framework/testbed_model/node.py > index 23efa79c50..619743ebe7 100644 > --- a/dts/framework/testbed_model/node.py > +++ b/dts/framework/testbed_model/node.py > @@ -3,8 +3,13 @@ > # Copyright(c) 2022-2023 PANTHEON.tech s.r.o. > # Copyright(c) 2022-2023 University of New Hampshire > > -""" > -A node is a generic host that DTS connects to and manages. > +"""Common functionality for node management. > + > +There's a base class, Node, that's supposed to be extended by other > classes > +with functionality specific to that node type. > +The only part that can be used standalone is the Node.skip_setup static > method, > +which is a decorator used to skip method execution if skip_setup is pass= ed > +by the user on the cmdline or in an env variable. > """ > > from abc import ABC > @@ -35,10 +40,26 @@ > > > class Node(ABC): > - """ > - Basic class for node management. This class implements methods that > - manage a node, such as information gathering (of CPU/PCI/NIC) and > - environment setup. > + """The base class for node management. > + > + It shouldn't be instantiated, but rather extended. > + It implements common methods to manage any node: > + > + * connection to the node > + * information gathering of CPU > + * hugepages setup > + > + Arguments: > My only comment would be we might want to make this Args instead of arguments just to line up with the rest of the comments, but like you said this is just a proof of concept really. Acked-by: Jeremy Spweock --00000000000095cfbf06044f2275 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Thu, Aug 31, 2023 at 6:04=E2=80=AFAM Juraj Linke=C5=A1 &= lt;juraj.linkes@pantheon.tech> wrote:
WIP: only one module is reformatted to serve as a = demonstration.

The google format is documented here [0].

[0]: https://google.github.io/styleguide/pyguide.htm= l

Signed-off-by: Juraj Linke=C5=A1 <juraj.linkes@pantheon.tech>
---
=C2=A0dts/framework/testbed_model/node.py | 171 +++++++++++++++++++--------= -
=C2=A01 file changed, 118 insertions(+), 53 deletions(-)

diff --git a/dts/framework/testbed_model/node.py b/dts/framework/testbed_mo= del/node.py
index 23efa79c50..619743ebe7 100644
--- a/dts/framework/testbed_model/node.py
+++ b/dts/framework/testbed_model/node.py
@@ -3,8 +3,13 @@
=C2=A0# Copyright(c) 2022-2023 PANTHEON.tech s.r.o.
=C2=A0# Copyright(c) 2022-2023 University of New Hampshire

-"""
-A node is a generic host that DTS connects to and manages.
+"""Common functionality for node management.
+
+There's a base class, Node, that's supposed to be extended by othe= r classes
+with functionality specific to that node type.
+The only part that can be used standalone is the Node.skip_setup static me= thod,
+which is a decorator used to skip method execution if skip_setup is passed=
+by the user on the cmdline or in an env variable.
=C2=A0"""

=C2=A0from abc import ABC
@@ -35,10 +40,26 @@


=C2=A0class Node(ABC):
-=C2=A0 =C2=A0 """
-=C2=A0 =C2=A0 Basic class for node management. This class implements metho= ds that
-=C2=A0 =C2=A0 manage a node, such as information gathering (of CPU/PCI/NIC= ) and
-=C2=A0 =C2=A0 environment setup.
+=C2=A0 =C2=A0 """The base class for node management.
+
+=C2=A0 =C2=A0 It shouldn't be instantiated, but rather extended.
+=C2=A0 =C2=A0 It implements common methods to manage any node:
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0* connection to the node
+=C2=A0 =C2=A0 =C2=A0 =C2=A0* information gathering of CPU
+=C2=A0 =C2=A0 =C2=A0 =C2=A0* hugepages setup
+
+=C2=A0 =C2=A0 Arguments:

My only comment woul= d be we might want to make this Args instead of arguments just to line up w= ith the rest of the comments, but like you said this is just a proof of con= cept really.
=C2=A0
Acked-by: Jeremy Spweock <jspweock@iol.unh.edu= >

--00000000000095cfbf06044f2275--