make context information available (everywhere)
imo, information, like the
- current expression (from config.csv)
- other co-variables
- parameter, like the plotting parameter
- line number
- flagger type
- etc. should be accessible from every point up and down the ladder in saqc.
this makes debugging easier, would allow the tests (flagRange
...) to log relevant information with (logging),
make some things possible that aren't so far (e.g. show all co-variable plots).
currently all the information is spread all over the place (varname in field
, isharmonised by evaluating nans in flags,
functionname in **kwargs
of function, type of flagger ?, ...)
i suggest a dictionary that hold all relevent information, mainly filled during parsing. This could be:
- A: a module-level dictionary and so have a global scope, or
- B: be passed around back and forth the calling chain