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

Move description for -l common option to pygmt/helpers/decorators.py #1408

Merged
merged 6 commits into from
Aug 4, 2021

Conversation

maxrjones
Copy link
Member

Description of proposed changes

This PR moves the description for the -l common option to pygmt/helpers/decorators.py for three methods that use the same description. Note that the alias used for PyGMT (label) is different than that for core GMT and GMT.jl (legend).

Fixes #

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

@maxrjones maxrjones added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog labels Aug 3, 2021
Copy link
Contributor

@willschlitzer willschlitzer left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@maxrjones maxrjones added the final review call This PR requires final review and approval from a second reviewer label Aug 3, 2021
@seisman seisman added this to the 0.4.1 milestone Aug 3, 2021
pygmt/helpers/decorators.py Outdated Show resolved Hide resolved
Comment on lines 167 to 168
label : str
Add a legend entry for the symbol or line being plotted.""",
Copy link
Member

Choose a reason for hiding this comment

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

Just checking, do we want to add the complicated -l stuff at https://github.com/GenericMappingTools/gmt/blob/6.2.0/doc/rst/source/explain_-l.rst_? And/or link to https://docs.generic-mapping-tools.org/6.2/gmt.html#l-full?

Suggested change
label : str
Add a legend entry for the symbol or line being plotted.""",
label : str
[*label*]\ [**+D**\ *pen*][**+G**\ *gap*][**+H**\ *header*][**+L**\ [*code*/]\ *txt*][**+N**\ *cols*][**+S**\ *size*\ [/*height*]][**+V**\ [*pen*]][**+f**\ *font*][**+g**\ *fill*][**+j**\ *just*][**+o**\ *off*][**+p**\ *pen*][**+s**\ *scale*][**+w**\ *width*]
Add a legend entry for the symbol or line being plotted.""",

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 could add a link to the GMT docs. I chose not to add the complicated stuff because I thought the argument format could change in the near future with #1082.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, let's just add the link then. I also noticed that contour and grdcontour could benefit from a link to https://docs.generic-mapping-tools.org/6.2/gmt.html#l-full, but we can leave that for someone else to do in the ESWN workshop :)

Copy link
Member

@weiji14 weiji14 left a comment

Choose a reason for hiding this comment

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

Ok to merge in directly. Thanks @meghanrjones!

@weiji14 weiji14 added documentation Improvements or additions to documentation and removed maintenance Boring but important stuff for the core devs labels Aug 4, 2021
@maxrjones maxrjones merged commit 9fdffc0 into master Aug 4, 2021
@maxrjones maxrjones deleted the label-common branch August 4, 2021 15:53
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Aug 4, 2021
sixy6e pushed a commit to sixy6e/pygmt that referenced this pull request Dec 21, 2022
…enericMappingTools#1408)

* Move label description to COMMON OPTIONS

* Add link to full -l docs

Co-authored-by: Dongdong Tian <[email protected]>
Co-authored-by: Michael Grund <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation skip-changelog Skip adding Pull Request to changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants