Skip to content

Commit c7198e6

Browse files
authored
DOC: Make bullet point lists consistent in docstrings (":" and lower-case) Part II (#3752)
1 parent 664a9ed commit c7198e6

File tree

7 files changed

+67
-67
lines changed

7 files changed

+67
-67
lines changed

pygmt/helpers/decorators.py

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,17 @@
3737
(using ``binary="o"``), where *ncols* is the number of data columns
3838
of *type*, which must be one of:
3939
40-
- **c** - int8_t (1-byte signed char)
41-
- **u** - uint8_t (1-byte unsigned char)
42-
- **h** - int16_t (2-byte signed int)
43-
- **H** - uint16_t (2-byte unsigned int)
44-
- **i** - int32_t (4-byte signed int)
45-
- **I** - uint32_t (4-byte unsigned int)
46-
- **l** - int64_t (8-byte signed int)
47-
- **L** - uint64_t (8-byte unsigned int)
48-
- **f** - 4-byte single-precision float
49-
- **d** - 8-byte double-precision float
50-
- **x** - use to skip *ncols* anywhere in the record
40+
- **c**: int8_t (1-byte signed char)
41+
- **u**: uint8_t (1-byte unsigned char)
42+
- **h**: int16_t (2-byte signed int)
43+
- **H**: uint16_t (2-byte unsigned int)
44+
- **i**: int32_t (4-byte signed int)
45+
- **I**: uint32_t (4-byte unsigned int)
46+
- **l**: int64_t (8-byte signed int)
47+
- **L**: uint64_t (8-byte unsigned int)
48+
- **f**: 4-byte single-precision float
49+
- **d**: 8-byte double-precision float
50+
- **x**: use to skip *ncols* anywhere in the record
5151
5252
For records with mixed types, append additional comma-separated
5353
combinations of *ncols* *type* (no space). The following modifiers
@@ -84,9 +84,9 @@
8484
**e**\|\ **f**\|\ **g**.
8585
Determine how spherical distances are calculated.
8686
87-
- **e** - Ellipsoidal (or geodesic) mode
88-
- **f** - Flat Earth mode
89-
- **g** - Great circle distance [Default]
87+
- **e**: Ellipsoidal (or geodesic) mode
88+
- **f**: Flat Earth mode
89+
- **g**: Great circle distance [Default]
9090
9191
All spherical distance calculations depend on the current ellipsoid
9292
(:gmt-term:`PROJ_ELLIPSOID`), the definition of the mean radius
@@ -118,16 +118,16 @@
118118
a list with each item containing a string describing one set of
119119
criteria.
120120
121-
- **x**\|\ **X** - define a gap when there is a large enough
121+
- **x**\|\ **X**: define a gap when there is a large enough
122122
change in the x coordinates (upper case to use projected
123123
coordinates).
124-
- **y**\|\ **Y** - define a gap when there is a large enough
124+
- **y**\|\ **Y**: define a gap when there is a large enough
125125
change in the y coordinates (upper case to use projected
126126
coordinates).
127-
- **d**\|\ **D** - define a gap when there is a large enough
127+
- **d**\|\ **D**: define a gap when there is a large enough
128128
distance between coordinates (upper case to use projected
129129
coordinates).
130-
- **z** - define a gap when there is a large enough change in
130+
- **z**: define a gap when there is a large enough change in
131131
the z data. Use **+c**\ *col* to change the z data column
132132
[Default *col* is 2 (i.e., 3rd column)].
133133
@@ -146,9 +146,9 @@
146146
147147
One of the following modifiers can be appended:
148148
149-
- **+n** - specify that the previous value minus the current
149+
- **+n**: specify that the previous value minus the current
150150
column value must exceed *gap* for a break to be imposed.
151-
- **+p** - specify that the current value minus the previous
151+
- **+p**: specify that the current value minus the previous
152152
value must exceed *gap* for a break to be imposed.""",
153153
"grid": r"""
154154
grid : str or xarray.DataArray
@@ -367,13 +367,13 @@
367367
Select verbosity level [Default is **w**], which modulates the messages
368368
written to stderr. Choose among 7 levels of verbosity:
369369
370-
- **q** - Quiet, not even fatal error messages are produced
371-
- **e** - Error messages only
372-
- **w** - Warnings [Default]
373-
- **t** - Timings (report runtimes for time-intensive algorithms)
374-
- **i** - Informational messages (same as ``verbose=True``)
375-
- **c** - Compatibility warnings
376-
- **d** - Debugging messages""",
370+
- **q**: Quiet, not even fatal error messages are produced
371+
- **e**: Error messages only
372+
- **w**: Warnings [Default]
373+
- **t**: Timings (report runtimes for time-intensive algorithms)
374+
- **i**: Informational messages (same as ``verbose=True``)
375+
- **c**: Compatibility warnings
376+
- **d**: Debugging messages""",
377377
"wrap": r"""
378378
wrap : str
379379
**y**\|\ **a**\|\ **w**\|\ **d**\|\ **h**\|\ **m**\|\ **s**\|\
@@ -382,14 +382,14 @@
382382
different column if selected via **+c**\ *col*. The following
383383
cyclical coordinate transformations are supported:
384384
385-
- **y** - yearly cycle (normalized)
386-
- **a** - annual cycle (monthly)
387-
- **w** - weekly cycle (day)
388-
- **d** - daily cycle (hour)
389-
- **h** - hourly cycle (minute)
390-
- **m** - minute cycle (second)
391-
- **s** - second cycle (second)
392-
- **c** - custom cycle (normalized)
385+
- **y**: yearly cycle (normalized)
386+
- **a**: annual cycle (monthly)
387+
- **w**: weekly cycle (day)
388+
- **d**: daily cycle (hour)
389+
- **h**: hourly cycle (minute)
390+
- **m**: minute cycle (second)
391+
- **s**: second cycle (second)
392+
- **c**: custom cycle (normalized)
393393
394394
Full documentation is at :gmt-docs:`gmt.html#w-full`.""",
395395
}

pygmt/src/grdfilter.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ def grdfilter(grid, outgrid: str | None = None, **kwargs) -> xr.DataArray | None
4848
[/*width2*\][*modifiers*].
4949
Name of the filter type you wish to apply, followed by the *width*:
5050
51-
- **b** - Box Car
52-
- **c** - Cosine Arch
53-
- **g** - Gaussian
54-
- **o** - Operator
55-
- **m** - Median
56-
- **p** - Maximum Likelihood probability
57-
- **h** - Histogram
51+
- **b**: Box Car
52+
- **c**: Cosine Arch
53+
- **g**: Gaussian
54+
- **o**: Operator
55+
- **m**: Median
56+
- **p**: Maximum Likelihood probability
57+
- **h**: Histogram
5858
5959
distance : str
6060
State how the grid (x,y) relates to the filter *width*:

pygmt/src/grdgradient.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ def grdgradient(grid, outgrid: str | None = None, **kwargs) -> xr.DataArray | No
6969
Find the direction of the positive (up-slope) gradient of the data.
7070
The following options are supported:
7171
72-
- **a** - Find the aspect (i.e., the down-slope direction)
73-
- **c** - Use the conventional Cartesian angles measured
72+
- **a**: Find the aspect (i.e., the down-slope direction)
73+
- **c**: Use the conventional Cartesian angles measured
7474
counterclockwise from the positive x (east) direction.
75-
- **o** - Report orientations (0-180) rather than directions (0-360).
76-
- **n** - Add 90 degrees to all angles (e.g., to give local strikes of
75+
- **o**: Report orientations (0-180) rather than directions (0-360).
76+
- **n**: Add 90 degrees to all angles (e.g., to give local strikes of
7777
the surface).
7878
radiance : str or list
7979
[**m**\|\ **s**\|\ **p**]\ *azim/elev*\ [**+a**\ *ambient*][**+d**\
@@ -102,14 +102,14 @@ def grdgradient(grid, outgrid: str | None = None, **kwargs) -> xr.DataArray | No
102102
given, it is set to the average of :math:`g`. The following forms are
103103
supported:
104104
105-
- **True** - Normalize using :math:`g_n = \mbox{{amp}}\
105+
- **True**: Normalize using :math:`g_n = \mbox{{amp}}\
106106
(\frac{{g - \mbox{{offset}}}}{{max(|g - \mbox{{offset}}|)}})`
107-
- **e** - Normalize using a cumulative Laplace distribution yielding:
107+
- **e**: Normalize using a cumulative Laplace distribution yielding:
108108
:math:`g_n = \mbox{{amp}}(1 - \
109109
\exp{{(\sqrt{{2}}\frac{{g - \mbox{{offset}}}}{{\sigma}}))}}`, where
110110
:math:`\sigma` is estimated using the L1 norm of
111111
:math:`(g - \mbox{{offset}})` if it is not given.
112-
- **t** - Normalize using a cumulative Cauchy distribution yielding:
112+
- **t**: Normalize using a cumulative Cauchy distribution yielding:
113113
:math:`g_n = \
114114
\frac{{2(\mbox{{amp}})}}{{\pi}}(\tan^{{-1}}(\frac{{g - \
115115
\mbox{{offset}}}}{{\sigma}}))` where :math:`\sigma` is estimated

pygmt/src/grdview.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ def grdview(self, grid, **kwargs):
7676
Specify cover type of the grid.
7777
Select one of following settings:
7878
79-
- **m** - mesh plot [Default].
80-
- **mx** or **my** - waterfall plots (row or column profiles).
81-
- **s** - surface plot, and optionally append **m** to have mesh lines
79+
- **m**: mesh plot [Default].
80+
- **mx** or **my**: waterfall plots (row or column profiles).
81+
- **s**: surface plot, and optionally append **m** to have mesh lines
8282
drawn on top of the surface.
83-
- **i** - image plot.
84-
- **c** - Same as **i** but will make nodes with z = NaN transparent.
83+
- **i**: image plot.
84+
- **c**: Same as **i** but will make nodes with z = NaN transparent.
8585
8686
For any of these choices, you may force a monochrome image by
8787
appending the modifier **+m**.

pygmt/src/sphdistance.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ def sphdistance(
6565
Specify the quantity that should be assigned to the grid nodes [Default
6666
is **d**]:
6767
68-
- **d** - compute distances to the nearest data point
69-
- **n** - assign the ID numbers of the Voronoi polygons that each
68+
- **d**: compute distances to the nearest data point
69+
- **n**: assign the ID numbers of the Voronoi polygons that each
7070
grid node is inside
71-
- **z** - assign all nodes inside the polygon the z-value of the center
71+
- **z**: assign all nodes inside the polygon the z-value of the center
7272
node for a natural nearest-neighbor grid.
7373
7474
Optionally, append the resampling interval along Voronoi arcs in

pygmt/src/x2sys_cross.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ def x2sys_cross(
145145
Sets the interpolation mode for estimating values at the crossover.
146146
Choose among:
147147
148-
- **l** - Linear interpolation [Default].
149-
- **a** - Akima spline interpolation.
150-
- **c** - Cubic spline interpolation.
148+
- **l**: Linear interpolation [Default].
149+
- **a**: Akima spline interpolation.
150+
- **c**: Cubic spline interpolation.
151151
152152
coe : str
153153
Use **e** for external COEs only, and **i** for internal COEs only

pygmt/src/x2sys_init.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ def x2sys_init(tag, **kwargs):
8585
programs. Append **d** for distance or **s** for speed, then give the
8686
desired *unit* as:
8787
88-
- **c** - Cartesian userdist or userdist/usertime
89-
- **e** - meters or m/s
90-
- **f** - feet or ft/s
91-
- **k** - kilometers or km/hr
92-
- **m** - miles or mi/hr
93-
- **n** - nautical miles or knots
94-
- **u** - survey feet or sft/s
88+
- **c**: Cartesian userdist or userdist/usertime
89+
- **e**: meters or m/s
90+
- **f**: feet or ft/s
91+
- **k**: kilometers or km/hr
92+
- **m**: miles or mi/hr
93+
- **n**: nautical miles or knots
94+
- **u**: survey feet or sft/s
9595
9696
[Default is ``units=["dk", "se"]`` (km and m/s) if ``discontinuity`` is
9797
set, and ``units=["dc", "sc"]`` otherwise (e.g., for Cartesian units)].

0 commit comments

Comments
 (0)