From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 58EAE45451;
	Fri, 14 Jun 2024 15:55:50 +0200 (CEST)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 41D56402DD;
	Fri, 14 Jun 2024 15:55:50 +0200 (CEST)
Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com
 [209.85.216.43]) by mails.dpdk.org (Postfix) with ESMTP id 70AA3402D0
 for <dev@dpdk.org>; Fri, 14 Jun 2024 15:55:48 +0200 (CEST)
Received: by mail-pj1-f43.google.com with SMTP id
 98e67ed59e1d1-2c2e31d319eso1808615a91.1
 for <dev@dpdk.org>; Fri, 14 Jun 2024 06:55:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=iol.unh.edu; s=unh-iol; t=1718373347; x=1718978147; 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=KaR7EJpnDO0oJfIVMRwazh289wpfXHpzzRVINKW9iuI=;
 b=WyPvQ3R1dBN9yKCYeSVC5Xy5xHr4pZLgriyrPuyrJdyvXrrG9fMGbmGIN2ZZb8S0+D
 kq4TFBTHHJuDYhvU0WbWsOrDU+36f2gSbtgYsHY560kcvXJ3V6ORViXi+Q+v9EldC66S
 k1YjjiqFZe3oGb8PAd+LSKSpbRt5hmJ1Yh2CE=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1718373347; x=1718978147;
 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=KaR7EJpnDO0oJfIVMRwazh289wpfXHpzzRVINKW9iuI=;
 b=iqPmT014EFiirKWfN0+BU0qlwd2bhgGmp5SdYWSwXcBUcl2nnEbFZUf21lhI1E4dyE
 fRrhzAC2xHMmTRXmcpwhEM0cE13hUibf7TKuEjLY/3s19ofd0OmIEuGJJtZ9I0mL21EU
 xohJwsFaH9GfPxDZcndakrrX8y9L2IIeZAlDfWrdNd+brPPDzduDeJqXsMO0jhQf8Jbg
 37zRbuDE7kb9coFUIeR6wxKzwCa+SzwVWGVEQ5vB2yJzvWcKIxclA+26u3BkLzGPM55s
 MEs0bj1YzWkzyrIB8eOTuCgPD8Q3AJOvbo5HFBSa7/ZTmfq57A8EYFiC44MKOVgGaKGe
 Yzog==
X-Gm-Message-State: AOJu0Ywj0ouPvsW13JPglrYY4FUpY1QagRnDcPymZNTo8ItUg/LKpP8Q
 2c5CexLjbDzAGvH9RIkZ661f1JgQaDk2j0OqlhNFz75oBIZI5LQehb+0QIiMSCdF5BfgyIOvXiu
 ikF/Nq5/h5ZprY5PknexMG4TktvXSI1qdJfayMJjyl1agt+3D
X-Google-Smtp-Source: AGHT+IGm88DtncmCpBP4v9zWCRNNzzi3IgSThEvMHXfKU7+ObLyyXBrH8JUQNU+ATYy3yo2UwdPW7RwNU1uWtoMZrMg=
X-Received: by 2002:a17:90b:11c9:b0:2bf:8824:c043 with SMTP id
 98e67ed59e1d1-2c4db24d2e6mr3029495a91.18.1718373347475; Fri, 14 Jun 2024
 06:55:47 -0700 (PDT)
MIME-Version: 1.0
References: <20240122182611.1904974-1-luca.vizzarro@arm.com>
 <20240531112042.18736-1-luca.vizzarro@arm.com>
 <20240531112042.18736-2-luca.vizzarro@arm.com>
In-Reply-To: <20240531112042.18736-2-luca.vizzarro@arm.com>
From: Jeremy Spewock <jspewock@iol.unh.edu>
Date: Fri, 14 Jun 2024 09:55:35 -0400
Message-ID: <CAAA20USg5w4ztQTvTug2ut6NEQW87mQngFPAj2TKiJ3OFPBT_w@mail.gmail.com>
Subject: Re: [PATCH v6 1/3] dts: rework arguments framework
To: Luca Vizzarro <luca.vizzarro@arm.com>
Cc: dev@dpdk.org, =?UTF-8?Q?Juraj_Linke=C5=A1?= <juraj.linkes@pantheon.tech>, 
 Paul Szczepanek <paul.szczepanek@arm.com>
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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

On Fri, May 31, 2024 at 7:22=E2=80=AFAM Luca Vizzarro <luca.vizzarro@arm.co=
m> wrote:
>
> The existing argument handling in the code relies on basic argparse
> functionality and a custom argparse action to integrate environment
> variables. This commit improves the current handling by augmenting
> argparse.
>
> This rework implements the following improvements:
> - There are duplicate expressions scattered throughout the code. To
>   improve readability and maintainability, these are refactored
>   into list/dict comprehensions or factory functions.
> - Instead of relying solely on argument flags, error messages now
>   accurately reference environment variables when applicable, enhancing
>   user experience. For instance:
>
>     error: environment variable DTS_DPDK_TARBALL: Invalid file
>
> - Knowing the number of environment variables and arguments set
>   allow for a useful help page display when none are provided.
> - A display of which environment variables have been detected and their
>   corresponding values in the help page, aiding user awareness.
>
> Signed-off-by: Luca Vizzarro <luca.vizzarro@arm.com>
> Reviewed-by: Paul Szczepanek <paul.szczepanek@arm.com>

Reviewed-by: Jeremy Spewock <jspewock@iol.unh.edu>