-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
Feature/929 stansummary cli11 #965
Conversation
…4.1 (tags/RELEASE_600/final)
…ature/929-stansummary-cli11
Jenkins Console Log Machine informationProductName: Mac OS X ProductVersion: 10.11.6 BuildVersion: 15G22010CPU: G++: Clang: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only changes here are the library, right? So it's the same features as the existing stansummary, just different code?
Edit: Can look at this tomorrow
correct - the CLI11 library is a better version of boost::program_options. updated the code to use the library; changed the unit tests to match messages generated by CLI11. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review!
true); | ||
app.add_option("input_files", filenames, "Sampler csv files.", true) | ||
->required() | ||
->check(CLI::ExistingFile); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This checks the input files are readable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checks that they exist.
need to add checks for readibility, similar to check for writable output csv file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally optional, but when I get the error for readability I don't get the friendly --help
prompt:
bbales2@tadpole:~/cmdstan-develop$ bin/stansummary output4.csv
Cannot read input csv file: output4.csv.
Compare this to:
bbales2@tadpole:~/cmdstan-develop$ bin/stansummary output12321.csv
input_files: File does not exist: output12321.csv
Run with --help for more information.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I don't get the --help prompt with the percentiles option:
bbales2@tadpole:~/cmdstan-develop$ bin/stansummary -p -5 output4.csv
Option --percentiles -5: values must be in range (1,99), inclusive, and strictly increasing.
Very optional to add this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't figure out how to plug in custom help message via CLI11 - spent several hours looking.
will give it another go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eh if it's not easy let's not worry about it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doable but not easy. worth doing as part of next PR.
Jenkins Console Log Machine informationProductName: Mac OS X ProductVersion: 10.11.6 BuildVersion: 15G22010CPU: G++: Clang: |
…an-dev/cmdstan into feature/929-stansummary-cli11
hi Ben, thanks for the thorough arg checking - this code should be far more robust. also extremely useful w/r/t this PR: #925 |
@bbbales2 - ready for re-review |
Jenkins Console Log Machine informationProductName: Mac OS X ProductVersion: 10.11.6 BuildVersion: 15G22010CPU: G++: Clang: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Merge if you're happy with it. I don't think it's worth fussing over the --help
thing if you've already spent time trying to get that working.
Submisison Checklist
./runCmdStanTests.py src/test
Summary:
Replaced use of
boost::program_options
with lib CLI11,which is a header-only C++11 library with appropriate open source license.
Intended Effect:
Pay down technical debt:
Simplify build process. Library
boost::program_options
is a non-header only library,it made the build process longer, greatly increased the amount of the console output,
Simplify makefiles
How to Verify:
Run unit tests
Side Effects:
NA
Documentation:
NA
Copyright and Licensing
Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company): Columbia University
By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses: