Skip to content

Conversation

@cmnbroad
Copy link
Collaborator

accept .list in addition to .args as a file expansion extension, and handle display representation of long command lines.

@codecov-io
Copy link

codecov-io commented Jan 19, 2018

Codecov Report

Merging #125 into master will increase coverage by 0.06%.
The diff coverage is 94.44%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #125      +/-   ##
============================================
+ Coverage        76%   76.07%   +0.06%     
- Complexity      591      593       +2     
============================================
  Files            22       22              
  Lines          2205     2215      +10     
  Branches        456      457       +1     
============================================
+ Hits           1676     1685       +9     
  Misses          352      352              
- Partials        177      178       +1
Impacted Files Coverage Δ Complexity Δ
...e/barclay/argparser/CommandLineArgumentParser.java 82.87% <94.44%> (+0.11%) 183 <6> (+2) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 21b13d2...082e906. Read the comment docs.

Copy link
Contributor

@magicDGS magicDGS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer that this change includes only the argDef.suppresFileExpansion instead of changing also the default extensions. We decided on #95 that a configuration class for barclay is a better option...

* Extensions recognized for collection argument file expansion.
*/
static final String COLLECTION_LIST_FILE_EXTENSIONS_LIST = ".list";
static final String COLLECTION_LIST_FILE_EXTENSIONS_ARGS = ".args";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that it might be better to add the class for configuration at this stage (see #95), because each of this changes is generating a breaking change. I think that the configuration is a breaking change but flexible enough to avoid the change of the collection file extension here and keep it only in GATK.

I will open a new PR with that solution to have a clean branch instead of an outdated PR that get lost because its purpose was changed.

Copy link
Collaborator Author

@cmnbroad cmnbroad Jan 22, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taking #95 would require a major version bump (by semantic versioning, which I'd like to follow as much as possible), which we just did, and which I'd like to avoid until we can bundle in all other changes that are not BWC. This PR introduces only a minor change in runtime behavior (no source or binary incompatibility), and the runtime behavior change has a pretty easy workaround (to change the file extension being used).

Also, I think we've accumulated enough other feature requests that involve customization that we need an even more general mechanism than the config class as in #95. Instead, I think we should take this change as is, and implement the scheme outlined in (#127) is more sustainable in the long run.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds reasonable. Looking forward to the next version bump with #127 implemented (and maybe we can add the #68 (although it will require to clean up the branch, which is quite outdated).

else {
expandedValues.add(stringValue);
private List<String> expandListFile(final ArgumentDefinition argDef, final List<String> originalValues) {
if (!argDef.suppressFileExpansion) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this change (although I prefer to being able to change the extension in a per-argument basis), but the configuration sounds much better for the change of the extensions itself. Have a look to the clean PR (I will comment with the number once it is here).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New PR for config interface in #126

* Expand any collection value that references a filename that ends in one of the accepted expansion
* extensions, and add the contents of the file to the list of values for that argument.
* @param argDef the ArgumentDefinition being populated
* @param originalValues
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add explanation of parameter

@jonn-smith
Copy link
Contributor

@cmnbroad This looks fine to me. One very minor comment.

…tion to .args as

a file expansion extension, and handle display representation of long command lines.
@cmnbroad cmnbroad merged commit 9417229 into master Jan 26, 2018
@cmnbroad cmnbroad deleted the cn_file_expansion branch January 26, 2018 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants