Document how to parse verbose messages to report equivalent GMT commands
See original GitHub issueDescription of the desired feature
Sometimes we may need the equivalent GMT commands. For example,
- some PyGMT issues are actually due to upstream GMT bugs (https://forum.generic-mapping-tools.org/t/829). When we open a GMT bug, we need the equivalent bash script
- currently, how PyGMT works is a little fragile. Any unknown arguments are directly passed to GMT. See a bug report #256. The error messages are really confusing. But if the equivalent CLI commands are printed out, it would be much easier to understand why it doesn’t work as expected.
GMT already provides 7 verbosity levels by the -V option. The 7 verbosity levels (higher levels add more messages) are:
q < e < w < t < i < c < d
Here I propose to add one more verbosity level, for example, verbose='p'
. The verbosity level should be between q and e, i.e.,
q < < e < w < t < i < c < d
^
|
p
If verbose='p'
is used, they PyGMT should print the equivalent GMT command when calling the function call_module()
.
I only spent a few seconds to choose the character p
and its verbosity level. So I’m open to better choices.
Are you willing to help implement and maintain this feature?
Yes, it should be easy to implement it in the call_module()
function. Contributions are welcomed.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
3. General Features — GMT 6.2.0 documentation
Verbose reports things such as counts of points read, names of data files processed, convergence of iterative solutions, and the like. Since these...
Read more >Verbose output - HTTPie 3.2.1 (latest) docs
They have the following storage priority: 1—response; 2—command line; 3—session file. Receive a response with a Set-Cookie header: $ http --session=.
Read more >1. The Generic Mapping Tools — GMT 6.0.0_r20460 ...
Nearly all programs have an optional “verbose” operation, which reports on the progress of computation. All programs feature usage messages, which prompt the ......
Read more >Wrong verbosity level when specified in both config file and ...
Bug Report The verbosity level can be specified either on the command line (-v or -vv, etc.) or in the config file (verbosity...
Read more >20.8. Error Reporting and Logging - PostgreSQL
This parameter enables the logging collector, which is a background process that captures log messages sent to stderr and redirects them into log...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I don’t think users need to know the trick when reporting bugs. Perhaps better to document it in CONTRIBUTING.md.
Sure, and actually, we know if we are called from externals (API->external is true) so we could print command when it makes sense.