Skip to content

Reoworking the group operations

David Schäfer requested to merge group-operations into develop

There was a ugly inconsistency with respect to the dictionary option to the group parameter. When given the following:

qc.andGroup(field="x", {"y": qc1, "z": qc2})

the group operation was conducted as qc1["y"] & qc2["z"] rendering the field parameter basically useless, but still mandatory... This MR removed the dictionary option and replaces the above by the more streamlined version:

qc.andGroup(field=["y", "z"], target="x", [qc1, qc2])

If there is a need to select more than one variable from any of the SaQC objects, this is achieved by a nested fieldlist. E.g.

qc.andGroup(field=[["a","b"], "c"], target="x", [qc1, qc2])

This basically executes qc1["a"] & qc1["b"] & qc2["c"].

BTW, the docstring for `saqc.func.flagtools._groupOperation was generated by ChatGPT from the function's code. I only made minimal changes.

Merge request reports

Loading