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 2EBF443EEC; Tue, 23 Apr 2024 14:10:29 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EF51540E54; Tue, 23 Apr 2024 14:10:28 +0200 (CEST) Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) by mails.dpdk.org (Postfix) with ESMTP id 03EB8402AB for ; Tue, 23 Apr 2024 14:10:27 +0200 (CEST) Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-5708d8beec6so6736417a12.0 for ; Tue, 23 Apr 2024 05:10:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1713874227; x=1714479027; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=8o1OWrVxWNI5PiS1Ru8dfWP52oHRKdx9hhcikONbGAI=; b=Q2e8OK3b52/txOgEqcKw1stVy24wNXhFprRcNnNp/VAYZ3cH+eC42Ojg49gnixCwCD V770EsRg+hyRV+39TnayKDnj+CcnvnEqfArulqjDg95IqYlKHpt8bNmaar4dtrtdiUcG D4kRgw3tmwsKQYpHp9W0vts1khGM8wvBfPNgdf3BcO3Ezv3GlLUy9jOa8b6oSkLOqgY7 OlkE38a8SUNR4/IRNmXeUcBtWrWJCA/vnUycddysnz+CYGX5Asy+V20GrJJ+B0g0WN/i wrbxiDeihmOO/kyzxUBsqPg6gCEOt5sHTGPg6CjgL3VoYPkkbfvabqBVXvN1OEwL1MzO GIvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713874227; x=1714479027; h=content-transfer-encoding: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=8o1OWrVxWNI5PiS1Ru8dfWP52oHRKdx9hhcikONbGAI=; b=i4paJnOd2EG0A/1Rj7KRcrW7ytvVh2uicJ9uCzmvDv7oR3de5nXt0Z/Tna1IYSPudR w0xZj/AceEhbh8879VRkisyTYMQpQpl1mKfUN++DhKNutwzPlGRMwp1tlLx3tI5F3vuZ O/mNLzx4gAgCvIFtu7SQE7kCONgrPRQExnT8kYI/UNtVAjKwRkEGAmti9zBNp5BhzTNc QPC0OYFyNDpxD5EcjYW7aiHx2QfzLTrKtaZXr0vE+SJ1avp2xNoDPKw8JRwyDXcg9p3D 1dqvGN6K/xInqQSDye4txiWCMcKz83vvZ0AtYMBtmvnHXWYpzamQLUvsijb//rpH6FHy LFPw== X-Forwarded-Encrypted: i=1; AJvYcCVZ7eaMmL7/O+AcW2qp/+jAps8QpU7dk1ng1XWMHHNZY7SjT5up4LO4BiFwHz3FDiS+XrsqqtaJPP9RYIc= X-Gm-Message-State: AOJu0YzcJrGkaau8MnZLICsSAgzYGifUznFahJIr1Fk92PkMC2m1QW9Z eQp5ULQcv88OY2jYpB/uesnM+219MKBP2+pKJViHo6abx5ZiwRGO4KVt6txiV5EEMQfmEKfVkTD Q8KJ1S6r66KAmJj0hzmzkvkCllCK47vYBHIxXcw== X-Google-Smtp-Source: AGHT+IEfwvktN55SIbH4zCuc64mLGj9Vx5gjygLEC053XwHFNXLmD0JZu/7Zm0/BUOPDXTD5M6ViQjBtmmriIM6t8JA= X-Received: by 2002:a17:907:9447:b0:a55:c021:e3b6 with SMTP id dl7-20020a170907944700b00a55c021e3b6mr5378748ejc.11.1713874227553; Tue, 23 Apr 2024 05:10:27 -0700 (PDT) MIME-Version: 1.0 References: <20240419085108.97519-1-juraj.linkes@pantheon.tech> In-Reply-To: From: =?UTF-8?Q?Juraj_Linke=C5=A1?= Date: Tue, 23 Apr 2024 14:10:16 +0200 Message-ID: Subject: Re: [PATCH v1] dts: rename execution to test run To: Luca Vizzarro Cc: thomas@monjalon.net, Honnappa.Nagarahalli@arm.com, jspewock@iol.unh.edu, probb@iol.unh.edu, paul.szczepanek@arm.com, npratte@iol.unh.edu, dev@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 On Tue, Apr 23, 2024 at 12:58=E2=80=AFPM Luca Vizzarro wrote: > > Hi Juraj! > > I am not fussed about naming but I am certainly in favour of making > things less confusing, so I am happy with this change. > Yes, using execution in this context is very confusing. The main thing with this patch is to find the best replacement. If you're ok with the new name or can't think of a (even potentially) better name, that's all we need. :-) > On 19/04/2024 09:51, Juraj Linke=C5=A1 wrote: > > @staticmethod > > def from_dict( > > - d: ExecutionConfigDict, > > + d: TestRunConfigDict, > > node_map: dict[str, Union[SutNodeConfiguration | TGNodeConfig= uration]], > > - ) -> "ExecutionConfiguration": > > + ) -> "TestRunConfiguration": > > > > - def copy_and_modify(self, **kwargs) -> "ExecutionConfiguration": > > + def copy_and_modify(self, **kwargs) -> "TestRunConfiguration": > > > > @staticmethod > > def from_dict(d: ConfigurationDict) -> "Configuration": > > Unrelated, but spark for an improvement. I have noticed these, not sure > if there are more instances in the code. Shouldn't from_dict be a > @classmethod instead of @staticmethod. In which case you could also use: > > from typing_extensions import Self > > to replace all the class literals, example: > > @classmethod > def from_dict(cls, d, node_map): -> Self: > ... > return cls(...) # initialise class with cls > > ... > > def copy_and_modify(self, **kwargs) -> Self: There are many of these from_dict methods. Maybe we should just put the logic into __init__ and not use the constructors generated by the dataclass decorator. Or we could also use your suggestion. I don't know that they should be class methods, it doesn't make that much of a difference (is there an appreciable one? Apart from the nicer typing). It's worth making a bugzilla ticket for this though.