-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding inputs (i.e. options incl. value) #1091
Conversation
- adding command line option -I/--input - adding inputs to CheckSuite, ComplianceChecker and BaseCheck
Could you please let me know if any further actions are needed from my end? |
I'll take a look over the PR, thanks. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #1091 +/- ##
========================================
Coverage 81.79% 81.79%
========================================
Files 25 25
Lines 5212 5212
Branches 1255 1255
========================================
Hits 4263 4263
Misses 642 642
Partials 307 307 ☔ View full report in Codecov by Sentry. |
Hi, interesting idea. What's the advantage of creating a separate CLI switch vs overloading the already existing options/ |
Hi @benjwadams , thank you for your feedback. I wanted to avoid any potential conflict with the option command line argument. |
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 |
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 the
inputs
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