Integrate new arguments data structure #3167
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the integration of the new
ArchConfig
data structure in favor of thearchinstall.arguments
structure as that one is merely adict[str, Any]
which doesn't allow for any type checking and safety.Unfortunately, this PR grow beyond what I originally intended to change here but by introducing the
args.py
as a dependency (which pulls in most data models) there were loads of circular dependencies to be dealt with as the code base isn't well divided hierarchically at the moment so I was forced to move things around to get the interpreter happy. Most notably I moved a lot of model data classes into thearchinstall/lib/models
folder. This aligns with existing models in there as well.Changes
archinstall.arguments
dict type and replaced it with the respective config or args typesarchinstall.__init__
but will be read in theargs.py
file directly from thepyproject.toml
@Torxed let me know if that causes issues on releasedisk/*
tomodels
which resolved the circular dependenciesAs I have only moved the relevant data types into the
models/
module there's still some misalignment in the code base, I'm planning to raise a follow up PR to cleanup the rest of the types as well and move them into themodels
if they fit to avoid any major future dependency nightmares.