-
Notifications
You must be signed in to change notification settings - Fork 224
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
Update the docstrings in the plotting modules #881
Update the docstrings in the plotting modules #881
Conversation
I'm not sure how to mark this PR as 'draft' (edit: nevermind, found it). Currently done with the plotting modules and will update the data processing modules tomorrow. |
Wow, you're fast!
To keep things small (and easier to review, see https://github.com/GenericMappingTools/pygmt/blob/master/CONTRIBUTING.md#general-guidelines), you can split it into 2 PRs, 1 for plotting modules (this PR), 1 for data processing modules. Just ask @willschlitzer to review if you think it's ready, I think he'll be keen and it's his ideal timezone now too. |
Sounds good. grd2cpt, makecpt, savefig, show, and psconvert also remain but those could similarly go in a different PR to keep things small. Also based on that recommendation, it seems that it's probably fine that this PR really just covers the simplest cases. An example of a more complex situation is meca, in which the arguments do not map simply to GMT options. |
Many of the arguments refer to other arguments, for example lakes from
Most of the references to other arguments are formatted in a |
IMHO, we should try our best to document the arguments of PyGMT modules, rather than refering users to read the GMT documentation. That's why I prefer to use code blocks for PyGMT arguments. |
Nice work! |
@meghanrjones I changed this PR to just be for plotting functions and I'm about to tackle the non-plotting functions. I looked through your fork's branches and it looks like you haven't started on that. |
Co-authored-by: Dongdong Tian <[email protected]>
Perhaps we can just ignore my last-minute suggestions and merge this PR as it is? @weiji14 |
They seem to be fair suggestions, should be ok to just batch commit them before merging. |
I can't do the batch commit, possibly because this PR comes from @meghanrjones's own fork. |
Ah I see. Let's just merge it then (and apply the changes in another small PR?) since it's a public holiday in the US. And we should add her to the PyGMT team so she can create branches on |
Great!
I'm heading to the grocery. Feel free to many small changes in PRs.
She is already in the python team. |
Ah ok, must have missed one of the messages. I'll merge this in in a bit. |
Should I batch commit them now? |
Co-authored-by: Dongdong Tian <[email protected]>
Oh hi @meghanrjones! Sorry for bothering you on a weekend/public holiday. Yes go ahead please! |
Please do (assuming you agree with the proposed changes)! |
Co-authored-by: Dongdong Tian <[email protected]>
/format And also, could you click on the 'Update branch' button (or check the 'Allow updates from maintainers' box so we can update it for you). Thanks. |
I can create branches from GenericMappingTools in the future if that's preferred. Sorry, I didn't want to make any assumptions when setting up this branch. |
Co-authored-by: Wei Ji <[email protected]>
Yes please! I realize that this probably needs to be in CONTRIBUTING.md (create branches on GenericMappingTools) since Will was doing branches on his own fork for a while too. And sorry for all the haste, just that we really want to finish that v0.3.0 milestone (but that shouldn't come at the expense of people's lives, not everyone is or should be a workaholic). |
No problem, I'll be free for the next half hour or so and if this extends beyond that then I'll click the box for you all to be able to finish it up. |
There was an unescaped return in decorators.py that was causing a space in the |
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.
All this attention to detail! Alright, merging this now.
Update docstrings in basemap, coast, colorbar, contour, grdcontour, grdimage, grdview, image, inset, legend, logo, plot, plot3d, and text following the convention in GenericMappingTools#631. Also fixed an unescaped return in decorators.py. Co-authored-by: Dongdong Tian <[email protected]> Co-authored-by: Will Schlitzer <[email protected]> Co-authored-by: Wei Ji <[email protected]>
Description of proposed changes
Update the docstrings of aliases following the convention in #631.
To do:
Reminders
make format
andmake check
to make sure the code follows the style guide.doc/api/index.rst
.Slash Commands
You can write slash commands (
/command
) in the first line of a comment to performspecific operations. Supported slash commands are:
/format
: automatically format and lint the code/test-gmt-dev
: run full tests on the latest GMT development version