Skip to content

Commit 46fc49e

Browse files
Meghan Jonesseismanweiji14
authored
Add instructions for reporting upstream bugs to contributing.md (#1610)
Co-authored-by: Dongdong Tian <[email protected]> Co-authored-by: Wei Ji <[email protected]>
1 parent c5ef5c3 commit 46fc49e

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

doc/contributing.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,27 @@ top of the GitHub repository and click *New Issue*.
5050
* After submitting your bug report, try to answer any follow up questions about the bug
5151
as best as you can.
5252

53+
#### Reporting upstream bugs
54+
55+
If you are aware that a bug is caused by an upstream GMT issue rather than a
56+
PyGMT-specific issue, you can optionally take the following steps to help resolve
57+
the problem:
58+
59+
* Add the line `pygmt.config(GMT_VERBOSE='d')` after your import statements, which
60+
will report the equivalent GMT commands as one of the debug messages.
61+
* Either append all messages from running your script to your GitHub issue, or
62+
filter the messages to include only the GMT-equivalent commands using a command
63+
such as:
64+
65+
python <test>.py 2>&1 | awk -F': ' '$2=="GMT_Call_Command string" {print "gmt", $3}'
66+
67+
where `<test>` is the name of your test script.
68+
* If the bug is produced when passing an in-memory data object (e.g., a
69+
pandas.DataFrame or xarray.DataArray) to a PyGMT function, try writing the
70+
data to a file (e.g., a NetCDF or ASCII txt file) and passing the data file
71+
to the PyGMT function instead. In the GitHub issue, please share the results
72+
for both cases along with your code.
73+
5374
### Submitting a Feature Request
5475

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

0 commit comments

Comments
 (0)