Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions for reporting upstream bugs to contributing.md #1610

Merged
merged 3 commits into from
Nov 10, 2021

Conversation

maxrjones
Copy link
Member

Description of proposed changes

Add a section to the reporting a bug section of the contributing guide with steps to provide helpful information about upstream bugs.

Fixes #573

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If adding new functionality, add an example to docstrings or tutorials.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash commands are:

  • /format: automatically format and lint the code
  • /test-gmt-dev: run full tests on the latest GMT development version

@weiji14 weiji14 added the maintenance Boring but important stuff for the core devs label Nov 6, 2021
@seisman seisman added this to the 0.6.0 milestone Nov 6, 2021
filter the messages to include only the GMT-equivalent commands using a command
such as:

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

@seisman seisman Nov 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about this command? It doesn't call grep.

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, this command works for both Linux (GNU awk) and macOS (BSD awk).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to have an equivalent command for Windows users? 🙂

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does Windows provide any built-in tools to do tasks like awk?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A quick search yields this https://superuser.com/questions/524822/awk-equivalent-functionality-on-windows/524836#524836, but not sure if it works with stderr/stdout from GMT.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really think we need to spend time on this, since it only applies to the subset of people who are voluntarily providing additional information about upstream bugs without WSL or Git for Windows installed. They can always post the full error message or we could extract the equivalent commands on a *nix system.

doc/contributing.md Outdated Show resolved Hide resolved
filter the messages to include only the GMT-equivalent commands using a command
such as:

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to have an equivalent command for Windows users? 🙂

Co-authored-by: Dongdong Tian <[email protected]>
Co-authored-by: Wei Ji <[email protected]>
@seisman seisman added the final review call This PR requires final review and approval from a second reviewer label Nov 9, 2021
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Nov 10, 2021
@seisman seisman merged commit 46fc49e into main Nov 10, 2021
@seisman seisman deleted the reporting-upstream-bugs branch November 10, 2021 02:17
sixy6e pushed a commit to sixy6e/pygmt that referenced this pull request Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Boring but important stuff for the core devs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document how to parse verbose messages to report equivalent GMT commands
3 participants