stan-dev / cmdstan

CmdStan, the command line interface to Stan
https://mc-stan.org/users/interfaces/cmdstan
BSD 3-Clause "New" or "Revised" License
212 stars 93 forks source link

FR: option to print the output of --help-all in json format #1025

Open mike-lawrence opened 3 years ago

mike-lawrence commented 3 years ago

I'm playing with an R package that permits supplying the runtime args as a nested list, thereby making things flexible to future possible changes in what cmdstan accepts. To validate this user input (and also to show the user what's allowed), it would be useful to have the output of --help-all in an easily-parsed format like json. Or maybe there's already an easily-parsed way to get the output already that I'm missing?

mitzimorris commented 3 years ago

the future possible changes to CmdStan are flattening the arguments and using C++ command line parsing package cli11 - cf https://github.com/stan-dev/cmdstan/pull/925. from that package we'll get --help for free.

the current CmdStan command argument handling is a failed experiment, and we need to move on.