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

Update COMMON_OPTIONS arguments to GMT standard #783

Closed
Changes from 12 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7e0892b
Update region arguments docstring in decorators.py
willschlitzer Jan 2, 2021
62e8aad
Merge branch 'master' into common-options-doc-update
willschlitzer Jan 21, 2021
6c870fe
Removing raw string from COMMON_OPTIONS
willschlitzer Jan 21, 2021
3793b78
Update region doc string
willschlitzer Jan 21, 2021
81d4653
Update projection doc string
willschlitzer Jan 21, 2021
75c8c83
Merge branch 'master' into common-options-doc-update
willschlitzer Jan 22, 2021
cd28c78
Update pygmt/helpers/decorators.py
willschlitzer Jan 22, 2021
0d6180f
Add full-stop period
willschlitzer Jan 22, 2021
96acac0
Fix formatting typo
willschlitzer Jan 22, 2021
ccae62b
Updating COMMON_OPTIONS test
willschlitzer Jan 22, 2021
30993fd
Fix trailing whitespaces
willschlitzer Jan 22, 2021
a0d3c77
Merge branch 'master' into common-options-doc-update
seisman Feb 7, 2021
9d207c0
Update pygmt/helpers/decorators.py
willschlitzer Feb 8, 2021
15b66c0
Merge branch 'master' into common-options-doc-update
willschlitzer Feb 8, 2021
dafc436
Update common options to use raw strings
willschlitzer Feb 8, 2021
3a7e4ec
Change remaining COMMON_OPTIONS to use raw strings
willschlitzer Feb 8, 2021
e432f2e
Fix style errors
willschlitzer Feb 8, 2021
d35d7d7
Fix style errors
willschlitzer Feb 8, 2021
2fe9720
Update XY doc
willschlitzer Feb 9, 2021
6393047
Update distcalc doc
willschlitzer Feb 9, 2021
09bfb6d
Update interpolation doc
willschlitzer Feb 9, 2021
e6ef47d
Update perspective doc
willschlitzer Feb 9, 2021
a82bf6c
Update cores doc; remove unnecessary raw strings
willschlitzer Feb 9, 2021
c0a096d
Merge branch 'master' into common-options-doc-update
willschlitzer Feb 9, 2021
af72e6f
Fix trailing whitespace
willschlitzer Feb 9, 2021
5459dd5
Apply suggestions from code review
willschlitzer Feb 10, 2021
bc6f1e8
Add blank lines to change render
willschlitzer Feb 10, 2021
5609b6e
Merge remote-tracking branch 'origin/common-options-doc-update' into …
willschlitzer Feb 10, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions pygmt/helpers/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
COMMON_OPTIONS = {
"R": """\
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"R": """\
"R": r"""\

Need to make this a raw r-string to avoid the pylint warning (W605 invalid escape sequence '\ ')

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It rendered incorrectly when I would have raw strings in both COMMON_OPTIONS and the function doc strings (check out the deployment for 62e8aad at the top). My guess is some issue with a raw string with escape characters being passed into another raw string.

Copy link
Member

Choose a reason for hiding this comment

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

I see, might need to rethink this a bit then or just ignore the pylint error if it's harmless.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I add a pylint: disable=invalid-escape-sequence (is that the correct wording/syntax?)?

region : str or list
willschlitzer marked this conversation as resolved.
Show resolved Hide resolved
*Required if this is the first plot command*.
``'xmin/xmax/ymin/ymax[+r][+uunit]'``.
Specify the region of interest.""",
*xmin/xmax/ymin/ymax*\ [**+r**\ ][**+u**\ *unit*].
Specify the region of interest. This is a required argument if this
is the first plot command.""",
"J": """\
seisman marked this conversation as resolved.
Show resolved Hide resolved
projection : str
*Required if this is the first plot command*.
Select map projection.""",
*projection*\ [*projection-specific arguments*\ ]\ *figure size*.
Select map projection. This is a required argument if this
is the first plot command.""",
"B": """\
frame : str or list
Set map boundary frame and axes attributes.""",
Expand Down Expand Up @@ -172,12 +173,13 @@ def fmt_docstring(module_func):
Parameters
----------
region : str or list
*Required if this is the first plot command*.
``'xmin/xmax/ymin/ymax[+r][+uunit]'``.
Specify the region of interest.
*xmin/xmax/ymin/ymax*\ [**+r**\ ][**+u**\ *unit*].
Specify the region of interest. This is a required argument if this
is the first plot command.
projection : str
*Required if this is the first plot command*.
Select map projection.
*projection*\ [*projection-specific arguments*\ ]\ *figure size*.
Select map projection. This is a required argument if this
is the first plot command.
<BLANKLINE>
**Aliases:**
<BLANKLINE>
Expand Down