This PR closes #20 by changing the config from a simple Dict to a dedicated class Settings. By doing that, the configuration file is now typed and it is visible in the source code what fields exist. This also allows for better error messages if something unexpected happens when parsing the configuration file.
move CLI arg parsing from main file to config.cli.ArgParser
Adapt project to use the new Settings
Testing
Changes have been tested with the Arista cEOS example from the repository. Behaviour should be identical with the version before these changes. Would still appreciate if someone could sanity check this PR to be sure.
This PR closes #20 by changing the config from a simple
Dict
to a dedicated classSettings
. By doing that, the configuration file is now typed and it is visible in the source code what fields exist. This also allows for better error messages if something unexpected happens when parsing the configuration file.Overview of Changes
config
providingArgParser, Settings, read_config
config.cli.ArgParser
Settings
Testing
Changes have been tested with the Arista cEOS example from the repository. Behaviour should be identical with the version before these changes. Would still appreciate if someone could sanity check this PR to be sure.