In some cases we want to call the CLI functions from Python, not over CLI (e.g. Tests or the script-languages-container-ci). However, for calling click commands, you need a click context, which is only available from within other click commands.
Also, this approach (we use it in script-language-container-ci) is not recommend by the click team, see https://click.palletsprojects.com/en/5.x/advanced/#invoking-other-commands.
A cleaner way is to extract all logic into other methods, which accept the same arguments (including default values) as the click commands, but not with click annotations.
Acceptance Criteria
Extract all click commands into new methods
Find a way to check consistency (parameter names/ default values / etc.) (UnitTests?)
Background
In some cases we want to call the CLI functions from Python, not over CLI (e.g. Tests or the script-languages-container-ci). However, for calling
click
commands, you need a click context, which is only available from within other click commands. Also, this approach (we use it in script-language-container-ci) is not recommend by the click team, see https://click.palletsprojects.com/en/5.x/advanced/#invoking-other-commands. A cleaner way is to extract all logic into other methods, which accept the same arguments (including default values) as the click commands, but not with click annotations.Acceptance Criteria