-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Refactor ProgramInfo
to separate out all the different information
#2521
Comments
Hi @rcurtin, Can we use a single macro for
|
I dunno, at least personally I think it's nicer to have a different call to |
Sounds good, I will follow the same approach for refactoring the documentation. |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions! 👍 |
We can close this now that #2558 is merged. Thanks again @Yashwants19! |
Thanks @rcurtin for all the help. |
What is the desired addition or change?
Right now, information for an mlpack binding is specified by the
PROGRAM_INFO
macro, like this:That's from
src/mlpack/methods/pca_main.cpp
. You can see there are four things specified here:This information is used to generate help for every language, and also the online documentation too: https://www.mlpack.org/doc/mlpack-git/cli_documentation.html#pca
While working on the R bindings, @Yashwants19 and @coatless found that it would be really useful to split the examples out: Yashwants19#8 (comment)
I think it would be useful to refactor this so that this information isn't contained in just one call to
PROGRAM_INFO()
but perhaps a series of calls.What is the motivation for this feature?
As time goes on and as we add more binding type, it may become useful to add additional metadata to these bindings, and the single
PROGRAM_INFO()
macro is getting a bit unwieldy.If applicable, describe how this feature would be implemented.
Here is a proposal of what we could do from here:
So, we would have what's written above instead of
PROGRAM_INFO()
.Additional information?
I didn't provide any implementation details but it should be straightforward. Right now
PROGRAM_INFO()
creates a singleton that "registers" itself withIO
during construction. We could just have several of these instead, one for the name one for the short description, one for the long description, etc., etc.The text was updated successfully, but these errors were encountered: