core refactorings to prepare modularization
During work at the modularization of our tests (aka saqc.module_name()
-> saqc.module.name()
) I had to make a few core adjustments. Some to make things work out, some more for the aesthetics. There are likely more to come and I will provide a more in detail explanation with removal of the WIP status.
Summary
This Merge Request incorporates a few modifications to the core. The most important change is the restructuring of the way, test functions and their arguments are stored and handled within SaQC
:
- During
@register
ation all test function get wrapped into a new classSaQCFunction
. This class stores (like afunctools.partial
) all (default-)arguments to pass to the underlying function upon evaluation and all function related metadata (currently onlyname
and the necessarymasking
behavior) - All arguments necessary to select data from
data
andflagger
(currentlyfield
,target
andregex
) are stored in a classLocator
- All arguments controlling the evaluation behavior are stored in a class
APIController
(currentlymasking
(transferred fromSaQCFunction
),plot
andto_mask
). There is one subclass ofAPIController
, theConfigController
that takes care of additional debug information only necessary when runningSaQC
through a dedicated config file.
All the above classe are currently located in a new core module called funcs.py
(maybe not the best name). The deconstruction of test function arguments into the respective classes is still done in saqc.core.core.SaQC._wrap.inner
.
Are these changes strictly necessary? No, they aren't. But the clear the path to the upcoming modularization and bring some structure in our currently unstructured mess of arguments storage (we even called it func_dump
...)