Reduce tools verbosity - Redmine #1209
I think the verbosity of CopyRight() is far too high. I think we’re rather out of line with the way most *nix toolsets work, and I’m sure Szilard agrees.
The statements of authors, code copyright status and licensing details are unnecessary. The license does not restrict the use of the code. Ordinarily, the purpose of asserting copyright and authorship is to provide force to the license, but that is not applicable to output files. I don’t think mdrun should write these, either.
Identifying the (suffixed) tool name, perhaps some compilation settings, and the code version has some genuine value to the user (and on the mailing list, if anyone provides stdout). I think this should be one or two lines for tools. mdrun warrants greater reporting of compilation settings.
I think printing all this other stuff contributes to users just scrolling to the bottom of anything we output, which decreases the value of everything we output that has genuine information value.
(from redmine: issue id 1209, created on 2013-03-25 by mark.j.abraham, closed on 2014-01-10)
- Relations:
- relates #1267 (closed)
- relates #1427 (closed)
- relates #2344 (closed)
- Changesets:
- Revision 6ff9572c by Teemu Murtola on 2013-07-19T15:25:43Z:
Uniform and less verbose startup for all binaries.
Now all binaries call gmx::ProgramInfo::init() as more or less the first
thing. Removed set_program_name() as unnecessary, since the above call
does all that. Make CommandLineModuleManager responsible of also
printing any common startup header, and add a method to suppress this
stderr output in unit tests.
Replace CopyRight() with a less verbose method and move the
responsibility of calling it to parse_common_args().
Added a PCA_STANDALONE flag for parse_common_args() to know when to do
this (can be removed once all programs are part of the wrapper binary).
Left the CopyRight() function still there, in case we want to add a
-license command-line option or similar to print that information.
Currently, it is not called from anywhere. Removed GMX_NO_CREDITS and
some other unnecessary code from CopyRight().
Most stuff in contrib is broken by this. There may be more changes
coming to the initialization sequence, and it will be simple to adapt
those programs that people want to get working again, but it is not
worth doing it more than once.
Part of #1209.
Change-Id: I5403dd259ab5f314cce3283aac275a6c26d4818d
- Revision b100cf46 by Teemu Murtola on 2013-07-20T16:55:43Z:
Be less verbose with program options.
Don't print the list of program options by default when running the
Gromacs binaries. The command line printed as part of the startup
header should provide any diagnostic value there is to this output.
Replace the previous -quiet option (that disabled this output) with
a -verbose option that enables this output again. Left the mostly no-op
-quiet option there (there is still a special case of -quiet -h used by
gmx_tune_pme), because it will get new use shortly.
Removed the hidden -verb option whose value wasn't used.
Related to #1209.
Change-Id: I9730e1eb08a2ee35d26fd603f48e89f561dee50a
- Revision e6879f39 by Teemu Murtola on 2013-07-20T17:53:49Z:
Options for controlling startup output.
Add a -quiet option to the wrapper binary. This option suppresses all
startup headers and the gmx_thanx() call in the end. Restructure
CommandLineModuleManager::run() to avoid multiple paths that all need to
call gmx_thanx() and potentially also print the startup header.
Make -quiet suppress the startup header also in parse_common_args().
Reordering required by this causes invalid command-line option error
messages to be printed before the header gets printed, but this only
affects those few binaries that don't go through the wrapper binary.
Make gmx_print_version_info() callable through printBinaryInformation(),
and do this in the wrapper binary and in parse_common_args() in
response to -version.
Print the copyright in response -copyright in the wrapper binary. Easy
to add to parse_common_args() as well, but even better would be to merge
the remaining few programs into the wrapper binary.
Part of #1209.
Change-Id: I0c7dddc91065b12f347da12acd82047e2d94b44c
- Revision d67173b3 by Teemu Murtola on 2013-07-21T12:21:06Z:
Uniform "generated by" information in output files.
Extend the printBinaryInformation() function to make it possible to
write the lines in a particular comment format. Use the function to
print out "Generated by" information in several output formats. Removed
command_line() from statutil.h as it is no longer used. Replaced most
uses of Program() with ShortProgram() where the actual path was not
relevant.
Also use printBinaryInformation() to print out information into the
mdrun log file. Again print the copyright header to the beginning of
the log file.
Related to #1209.
Change-Id: Ibf32de318421a10d39f217517005fea408d19fbf
- Revision e426cc63 by Teemu Murtola on 2013-07-22T04:47:10Z:
Fix Doxygen warnings.
Ibf32de31 introduced some undocumented members into
gmx::BinaryInformationSettings, which were causing Doxygen warnings.
Jenkins does not catch these in legacyheaders/...
Related to #1209.
Change-Id: I3c5c0c9818966290d3b298422905604b136d01c3
- Revision e45b119f by Teemu Murtola on 2013-07-30T04:10:42Z:
Handle wrapper binary options also for symlinks.
Now the -quiet, -version, and -copyright options also work when the
binary is invoked through a symlink (so, e.g., g_angle -quiet suppresses
the startup headers). They also work for the user tools, implemented
using the single-module wrapper.
Extended the command-line parser to support parsing only recognized
options and removing those from the command line while leaving the rest
untouched.
Related to #685 and #1209.
Change-Id: I740f70386d89694246c3e25ba0a1c1c4df17dc6b
- Revision f706d625 by Teemu Murtola on 2013-08-24T18:22:44Z:
Fine-tune copyright printing.
Based on discussion in earlier changes, made the copyright on by
default. It is now possible to suppress it while keeping other parts of
the startup header with -nocopyright.
Simplify the copyright printing code and make the output more in line
with the rest of the startup header (left-aligned etc.). Move the
copyright to the beginning of the header to have all diagnostic
information available under it; that makes it easier for the user (and
for us in bug reports) to spot all the relevant information.
Also adjust the wording of the license text; LGPL does not automatically
place a user program that calls GROMACS under the same license, so
changed "This program" to "GROMACS". Made a similar clarification to
the "Written by" text.
Part of #1209.
Change-Id: If104074995db891702dd9eb410fe811408add4ad