Skip to content

Commit

Permalink
Add instructions for reporting upstream bugs to contributing.md (Gene…
Browse files Browse the repository at this point in the history
…ricMappingTools#1610)

Co-authored-by: Dongdong Tian <[email protected]>
Co-authored-by: Wei Ji <[email protected]>
  • Loading branch information
3 people authored and Josh Sixsmith committed Dec 21, 2022
1 parent 9d28ff1 commit 105f759
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions doc/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,27 @@ top of the GitHub repository and click *New Issue*.
* After submitting your bug report, try to answer any follow up questions about the bug
as best as you can.

#### Reporting upstream bugs

If you are aware that a bug is caused by an upstream GMT issue rather than a
PyGMT-specific issue, you can optionally take the following steps to help resolve
the problem:

* Add the line `pygmt.config(GMT_VERBOSE='d')` after your import statements, which
will report the equivalent GMT commands as one of the debug messages.
* Either append all messages from running your script to your GitHub issue, or
filter the messages to include only the GMT-equivalent commands using a command
such as:

python <test>.py 2>&1 | awk -F': ' '$2=="GMT_Call_Command string" {print "gmt", $3}'

where `<test>` is the name of your test script.
* If the bug is produced when passing an in-memory data object (e.g., a
pandas.DataFrame or xarray.DataArray) to a PyGMT function, try writing the
data to a file (e.g., a NetCDF or ASCII txt file) and passing the data file
to the PyGMT function instead. In the GitHub issue, please share the results
for both cases along with your code.

### Submitting a Feature Request

* Find the [*Issues*](https://github.com/GenericMappingTools/pygmt/issues) tab on the
Expand Down

0 comments on commit 105f759

Please sign in to comment.