-
Notifications
You must be signed in to change notification settings - Fork 26
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
ECKIT-620 Enable multi-value options in CmdArgs #83
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In some ECFLOW cases, command line options are expected to collect multiple values, as if these values where positional relative to the option e.g. --option <command> <name> <value> /path/to/one /path/to/two ... --next. The logic mandates that values are collected until: 1) there are no more values to collect, either because the end of the list of values was reached or because the next option was found; or, 2) a mandatory+optional number of values has been collected. This implies changes to the way Options are collected by CmdArgs, and the current change enables each kind of option (SimpleOption, VectorOption, etc) to define how and how many argv entries are collected.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #83 +/- ##
===========================================
+ Coverage 62.64% 62.84% +0.20%
===========================================
Files 779 789 +10
Lines 44303 45169 +866
===========================================
+ Hits 27753 28386 +633
- Misses 16550 16783 +233
☔ View full report in Codecov by Sentry. |
Correct the implementation of Separator to ensure it can be instantiated.
Only remaining the pgen tests! |
The ability to set an option's default value using a data member existed before, but was removed in favor of definition of the default value at construction. Unfortunately, downstream dependencies are using this feature and so the feature was brought back, but only implemented for the classes for which it make sense (e.g. SimpleOption<t> provides it by inheriting it from BaseOption<T>; Separator does not provide).
pmaciel
reviewed
Oct 26, 2023
pmaciel
reviewed
Oct 26, 2023
pmaciel
reviewed
Oct 26, 2023
pmaciel
approved these changes
Oct 26, 2023
pmaciel
reviewed
Oct 26, 2023
Hi @simondsmart , @b8raoult , @danovaro , shall we merge this? (state what you think) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request enables the support for multi-value options in CmdArgs.
A multi-value Option allows collecting multiple argv values, as if these values where positional relative to the option e.g.
--option <command> <name> <value> /path/to/one /path/to/two ... --next
.The goal is to allow collecting argv values until: 1) there are no more values to collect, either because the end of the list of values was reached or because the next option was found; or, 2) a mandatory+optional number of values has been collected.