feat: Unified binary (CLI)#917
Conversation
KSkwarczynski
left a comment
There was a problem hiding this comment.
I have plenty of comments, although majority are nitpicky and style.
My main comment is lack of documentation or short explanation why X was done like this etc.
Doesn't have to be encyplopedia.
| std::cerr << "Cannot determine HOME directory\n"; | ||
| return; |
There was a problem hiding this comment.
Is std::cerr etc used here because it is part of CLI not actual executable?
| #pragma once | ||
| #include <argparse/argparse.hpp> | ||
|
|
There was a problem hiding this comment.
Can we hide this under MaCh3_Safe_Include_Start ?
Lines 122 to 125 in d491feb
There was a problem hiding this comment.
I don't understand this comment, can you ellaborate?
There was a problem hiding this comment.
So mach3 is compiled with very rigorous set compilation flags (Werror, Wall etc.)
Sometimes header files have actual implementation and they "external" headers are being compiled with MaCh3 flags.
Which causes compilation errors.
By doing
_MaCh3_Safe_Include_Start_ //{
#include "argparse/argparse.hpp"
_MaCh3_Safe_Include_End_ //}
we says compiler to ignore some warnigns/errors for a given header.
Which allows to avoid having annoing errors.
|
I also think this need to be updated MaCh3/cmake/Templates/Doxyfile.in Lines 858 to 872 in d491feb |
|
There are some merge conflicts. Is it possible to use for a doxygen to be consistent with rest of code base? |
b734193 to
d8b72e8
Compare
User Interface
This PR introduces a single binary through which to run MaCh3 executables. In other words, it introduces a unified CLI.
For example, one can run
mach3 --helpand get:and then run
ProcessMCMCwith:So far, the following executables have been implemented:
And the functionality exists for experiments to add their own executables via plugins. An example of this is included in MaCh3Tutorial via this PR: mach3-software/MaCh3Tutorial#252. There, you can run the
MCMCTutorialexecutable like:The previous name for the commands can still be used like:
and the user will be presented with a deprecation warning like:
Feedback
We're open to suggestions about the naming of the commands, e.g. whether
mach3 processmakes sense or maybemach3 processmcmcetc. And anything other comments are welcome of course.Future Plans
Assuming that this PR is merged, we imagine that this executable will start to gain traction with some users, and hopefully, we can gather feedback. In time, we can implement that feedback and eventually implement the rest of the executables and remove the old interface.
Implementation
TODO: Comments about implementation for the other devs. For example, all of the executables going under the CLI/API directory.
Subcommand map