Refactors the code for handling of the configuration for auto_process_ngs, to try and improve comprehension and updating in future.
Specifically, the PR overhauls the implementation of the Config class (in the config module) to enable distinguishing between None versus null values (where no value was defined). These null values are then used in the Settings class to deal with how setting of defaults are handled.
Other updates to the Settings class include:
Specifying default values for undefined parameters in a single place, enabling defaults to be easily located and updated (and for new defaults to be specified); also, defaults are now only assigned to parameters at the final stage. This changes replace the previous approach where defaults were assigned as part of acquisition from the configuration file.
Specifying "fallback" parameters for legacy configurations in a single place and implementing a generic mechanism for assigning these. These changes replace much of the custom code that was previously used to deal with handling fallbacks.
Specifying deprecated parameters in a single place, which should make them easier to identify (only used for messaging at present).
Specifying runner and environment module parameter names in a single place, which should make it easier to add new runners and modules if required.
Additionally:
Fixes a bug in the Settings.save() method, which caused an exception to be raised when trying to update configuration values via the command line using the --set option of the config command.
Refactors the CLI for the config command and adds a new option --raw (to show only settings explicitly defined in the configuration file)
Refactors the code for handling of the configuration for
auto_process_ngs
, to try and improve comprehension and updating in future.Specifically, the PR overhauls the implementation of the
Config
class (in theconfig
module) to enable distinguishing betweenNone
versus null values (where no value was defined). These null values are then used in theSettings
class to deal with how setting of defaults are handled.Other updates to the
Settings
class include:Additionally:
Settings.save()
method, which caused an exception to be raised when trying to update configuration values via the command line using the--set
option of theconfig
command.config
command and adds a new option--raw
(to show only settings explicitly defined in the configuration file)