[PATCH v2 1/6] dts: Remove build target config and list of devices
Jeremy Spewock
jspewock at iol.unh.edu
Tue Jul 16 17:07:37 CEST 2024
On Fri, Jul 5, 2024 at 1:15 PM Nicholas Pratte <npratte at iol.unh.edu> wrote:
>
> Remove the list of devices from the schema, as these are unuesed.
> Likewise, removed build-target information since these is not currently
> used, and it is unlikely to be used in the future. Adjustments to the
> dts.rst are made to reflect these changes.
>
> Bugzilla ID: 1360
> Signed-off-by: Nicholas Pratte <npratte at iol.unh.edu>
> ---
<snip>
> @unique
> class Compiler(StrEnum):
> r"""The supported compilers of :class:`~framework.testbed_model.node.Node`\s."""
> @@ -341,28 +325,20 @@ class BuildTargetConfiguration:
> The configuration used for building DPDK.
>
> Attributes:
> - arch: The target architecture to build for.
> - os: The target os to build for.
> - cpu: The target CPU to build for.
> compiler: The compiler executable to use.
> compiler_wrapper: This string will be put in front of the compiler when
> executing the build. Useful for adding wrapper commands, such as ``ccache``.
> name: The name of the compiler.
> """
>
> - arch: Architecture
> - os: OS
> - cpu: CPUType
> compiler: Compiler
> compiler_wrapper: str
> - name: str
>
> @classmethod
> def from_dict(cls, d: BuildTargetConfigDict) -> Self:
> r"""A convenience method that processes the inputs before creating an instance.
>
> - `arch`, `os`, `cpu` and `compiler` are converted to :class:`Enum`\s and
> - `name` is constructed from `arch`, `os`, `cpu` and `compiler`.
> + `compiler` is converted to :class:`Enum`\s
Because it's only the one attribute now this should likely just be
"`compiler` is converted to an :class:`Enum`" and because you don't
need this \s, I think you can also remove the "r" from the start of
the doc-string that makes it a string literal.
>
> Args:
> d: The configuration dictionary.
> @@ -371,12 +347,8 @@ def from_dict(cls, d: BuildTargetConfigDict) -> Self:
> The build target configuration instance.
> """
> return cls(
> - arch=Architecture(d["arch"]),
> - os=OS(d["os"]),
> - cpu=CPUType(d["cpu"]),
> compiler=Compiler(d["compiler"]),
> compiler_wrapper=d.get("compiler_wrapper", ""),
> - name=f"{d['arch']}-{d['os']}-{d['cpu']}-{d['compiler']}",
> )
>
>
<snip>
>
More information about the dev
mailing list