question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Document how to parse verbose messages to report equivalent GMT commands

See original GitHub issue

Description of the desired feature

Sometimes we may need the equivalent GMT commands. For example,

  1. 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
  2. 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:closed
  • Created 3 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
seismancommented, Oct 6, 2020

perhaps in our bug report template

I don’t think users need to know the trick when reporting bugs. Perhaps better to document it in CONTRIBUTING.md.

1reaction
PaulWesselcommented, Aug 31, 2020

Sure, and actually, we know if we are called from externals (API->external is true) so we could print command when it makes sense.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found