Convert string to actual types in __main__
Ensure that __main__
does all argument parsing including conversion to list / bool.
The main
function then has a pure Python interface.
This modification is especially useful for the SKAO self calibration pipeline, which calls the Python functions directly from Python. Currently it first converts lists to strings, then passes arguments as strings, and then converts the strings back to lists again...
Corresponding MR for SKAO selfcal pipeline: https://gitlab.com/ska-telescope/sdp/science-pipeline-workflows/ska-sdp-wflow-low-selfcal/-/merge_requests/146
Edited by Maik Nijhuis