-
Notifications
You must be signed in to change notification settings - Fork 225
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
Fix the example codes in the contributors guides #2929
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be consistent, we also may want to update:
Lines 580 to 587 in bb82345
```python | |
@pytest.mark.mpl_image_compare | |
def test_my_plotting_case(): | |
"Test that my plotting method works" | |
fig = Figure() | |
fig.basemap(region=[0, 360, -90, 90], projection="W15c", frame=True) | |
return fig | |
``` |
to
@pytest.mark.mpl_image_compare
def test_my_plotting_case():
"""
Test that my plotting method works.
"""
fig = Figure()
fig.basemap(region=[0, 360, -90, 90], projection="W15c", frame=True)
return fig
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And maybe it makes sense to use code highlighting (```python .... ```
) for the following code block:
Lines 334 to 340 in bb82345
Example | |
------- | |
>>> import pygmt | |
>>> # Comment describing what is happening | |
>>> Code example | |
Thanks. They all make sense. Now fixed in 98b4331. |
Co-authored-by: Yvonne Fröhlich <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fine now 🙂.
Co-authored-by: Yvonne Fröhlich <[email protected]>
Preview: https://pygmt-dev--2929.org.readthedocs.build/en/2929/contributing.html#contributing-code