Closed sol1105 closed 2 months ago
Could you please let me know if any further actions are needed from my end? Thank you and kind regards, Martin
I'll take a look over the PR, thanks.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 81.79%. Comparing base (
ee8b880
) to head (f28f321
). Report is 1 commits behind head on develop.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Hi, interesting idea. What's the advantage of creating a separate CLI switch vs overloading the already existing options/-O
CLI argument?
Hi @benjwadams , thank you for your feedback. I wanted to avoid any potential conflict with the option command line argument.
I added now the possibility to provide options as -O <checker_type>:<checker_opt>[:<checker_val>]
. The result will be:
{checker_type: {checker_opt : checker_val or None}}
instead of {checker_type: {checker_opt}}
This might be considered a breaking change, but I guess when you manually define options as set()
as you were used to, it will still work. And when you test for an option if checker_opt in options
with options being now a dictionary rather than a set, the outcome is the same. So I do not think it will cause problems, unless in any plugin the type is checked or the options are extended.
Could you add a unit test or two to ensure the parsing works as intended? Looks good otherwise.
Thank you. I added a test, but I am not sure if I found the best way to access the function within cchecker.py
.
Hello,
with this PR I would like to add the command line option
-I / --input
to specify options incl. a value, eg.--input 'checkxy:key:value'
This would for example allow to specify the path to external controlled vocabularies like MIP/CMOR tables for CORDEX, CMIP, etc. If there is a simpler way to achieve this, I would be happy to learn about it :)The argument parser for
input
works similar to the one already present foroption
. I added theinputs
as parameter to CheckSuite, ComplianceChecker and BaseCheck, similar tooptions
, with the defaultNone
. So I hope it does not interfere/conflict with anycompliance-checker
functionalities or existing plugins and simply serve as a means to supply options with values for specific checks.Kind regards, Martin