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

Let pygmt.info support tab autocompletion #1202

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Let all functions support tab autocompletion
  • Loading branch information
seisman committed Apr 11, 2021
commit 998a123918a00c26b4bce117b3d6696b7b40bfd5
12 changes: 11 additions & 1 deletion pygmt/figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,17 @@ def region(self):
Q="anti_aliasing",
)
@kwargs_to_strings()
def psconvert(self, **kwargs):
def psconvert(
self,
crop=None,
gs_option=None,
dpi=None,
prefix=None,
icc_gray=None,
fmt=None,
anti_aliasing=None,
**kwargs,
):
r"""
Convert [E]PS file(s) to other formats.

Expand Down
21 changes: 20 additions & 1 deletion pygmt/src/basemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,26 @@
t="transparency",
)
@kwargs_to_strings(R="sequence", c="sequence_comma", p="sequence")
def basemap(self, **kwargs):
def basemap(
self,
region=None,
projection=None,
zscale=None,
zsize=None,
frame=None,
map_scale=None,
rose=None,
compass=None,
timestamp=None,
verbose=None,
xshift=None,
yshift=None,
panel=None,
coltypes=None,
perspective=None,
transparency=None,
**kwargs
):
r"""
Plot base maps and frames for the figure.

Expand Down
24 changes: 22 additions & 2 deletions pygmt/src/blockm.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,17 @@ def _blockm(block_method, table, outfile, **kwargs):
r="registration",
)
@kwargs_to_strings(R="sequence")
def blockmean(table, outfile=None, **kwargs):
def blockmean(
table,
outfile=None,
spacing=None,
region=None,
verbose=None,
aspatial=None,
coltypes=None,
registration=None,
**kwargs,
):
r"""
Block average (x,y,z) data tables by mean estimation.

Expand Down Expand Up @@ -141,7 +151,17 @@ def blockmean(table, outfile=None, **kwargs):
r="registration",
)
@kwargs_to_strings(R="sequence")
def blockmedian(table, outfile=None, **kwargs):
def blockmedian(
table,
outfile=None,
spacing=None,
region=None,
verbose=None,
aspatial=None,
coltypes=None,
registration=None,
**kwargs,
):
r"""
Block average (x,y,z) data tables by median estimation.

Expand Down
25 changes: 24 additions & 1 deletion pygmt/src/coast.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,30 @@
t="transparency",
)
@kwargs_to_strings(R="sequence", c="sequence_comma", p="sequence")
def coast(self, **kwargs):
def coast(
self,
region=None,
projection=None,
area_thresh=None,
lakes=None,
frame=None,
resolution=None,
dcw=None,
rivers=None,
map_scale=None,
borders=None,
shorelines=None,
land=None,
water=None,
timestamp=None,
verbose=None,
xshift=None,
yshift=None,
panel=None,
perspective=None,
transparency=None,
**kwargs
):
r"""
Plot continents, shorelines, rivers, and borders on maps

Expand Down
20 changes: 19 additions & 1 deletion pygmt/src/colorbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,25 @@
@kwargs_to_strings(
R="sequence", G="sequence", I="sequence", c="sequence_comma", p="sequence"
)
def colorbar(self, **kwargs):
def colorbar(
self,
region=None,
projection=None,
frame=None,
cmap=None,
position=None,
box=None,
truncate=None,
shading=None,
scale=None,
verbose=None,
xshift=None,
yshift=None,
panel=None,
perspective=None,
transparency=None,
**kwargs
):
r"""
Plot a gray or color scale-bar on maps.

Expand Down
27 changes: 26 additions & 1 deletion pygmt/src/contour.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,32 @@
t="transparency",
)
@kwargs_to_strings(R="sequence", c="sequence_comma", i="sequence_comma", p="sequence")
def contour(self, x=None, y=None, z=None, data=None, **kwargs):
def contour(
self,
x=None,
y=None,
z=None,
data=None,
annotation=None,
frame=None,
levels=None,
label_placement=None,
projection=None,
triangular_mesh_pen=None,
no_clip=None,
region=None,
skip=None,
verbose=None,
pen=None,
xshift=None,
yshift=None,
panel=None,
columns=None,
label=None,
perspective=None,
transparency=None,
**kwargs
):
r"""
Contour table data by direct triangulation.

Expand Down
23 changes: 22 additions & 1 deletion pygmt/src/grd2cpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,28 @@
Z="continuous",
)
@kwargs_to_strings(G="sequence", L="sequence", R="sequence", T="sequence")
def grd2cpt(grid, **kwargs):
def grd2cpt(
grid,
transparency=None,
cmap=None,
background=None,
color_model=None,
nlevels=None,
truncate=None,
output=None,
reverse=None,
limit=None,
overrule_bg=None,
no_bg=None,
log=None,
region=None,
series=None,
verbose=None,
categorical=None,
cyclic=None,
continuous=None,
**kwargs,
):
r"""
Make GMT color palette tables from a grid file.

Expand Down
25 changes: 24 additions & 1 deletion pygmt/src/grdcontour.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,30 @@
@kwargs_to_strings(
R="sequence", L="sequence", A="sequence_plus", c="sequence_comma", p="sequence"
)
def grdcontour(self, grid, **kwargs):
def grdcontour(
self,
grid,
annotation=None,
frame=None,
interval=None,
label_placement=None,
projection=None,
limit=None,
cut=None,
region=None,
resample=None,
timestamp=None,
verbose=None,
pen=None,
label=None,
xshift=None,
yshift=None,
panel=None,
coltypes=None,
perspective=None,
transparency=None,
**kwargs
):
r"""
Convert grids or images to contours and plot them on maps.

Expand Down
13 changes: 12 additions & 1 deletion pygmt/src/grdcut.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,18 @@
f="coltypes",
)
@kwargs_to_strings(R="sequence")
def grdcut(grid, **kwargs):
def grdcut(
grid,
outgrid=None,
region=None,
projection=None,
extend=None,
circ_subregion=None,
verbose=None,
z_subregion=None,
coltypes=None,
**kwargs
):
r"""
Extract subregion from a grid.

Expand Down
15 changes: 14 additions & 1 deletion pygmt/src/grdfilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,20 @@
r="registration",
)
@kwargs_to_strings(R="sequence")
def grdfilter(grid, **kwargs):
def grdfilter(
grid,
distance=None,
filter=None,
outgrid=None,
spacing=None,
nans=None,
region=None,
toggle=None,
verbose=None,
coltypes=None,
registration=None,
**kwargs
):
r"""
Filter a grid in the space (or time) domain.

Expand Down
28 changes: 27 additions & 1 deletion pygmt/src/grdimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,33 @@
x="cores",
)
@kwargs_to_strings(R="sequence", c="sequence_comma", p="sequence")
def grdimage(self, grid, **kwargs):
def grdimage(
self,
grid,
img_out=None,
frame=None,
cmap=None,
img_in=None,
dpi=None,
bit_color=None,
shading=None,
projection=None,
monochrome=None,
no_clip=None,
nan_transparent=None,
region=None,
timestamp=None,
verbose=None,
xshift=None,
yshift=None,
interpolation=None,
panel=None,
coltypes=None,
perspective=None,
transparency=None,
cores=None,
**kwargs
):
r"""
Project and plot grids or images.

Expand Down
15 changes: 14 additions & 1 deletion pygmt/src/grdinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,20 @@
f="coltypes",
)
@kwargs_to_strings(D="sequence", I="sequence", R="sequence")
def grdinfo(grid, **kwargs):
def grdinfo(
grid,
per_column=None,
tiles=None,
geographic=None,
spacing=None,
force_scan=None,
minmax_pos=None,
region=None,
nearest_multiple=None,
verbose=None,
coltypes=None,
**kwargs
):
r"""
Get information about a grid.

Expand Down
11 changes: 10 additions & 1 deletion pygmt/src/grdtrack.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,16 @@

@fmt_docstring
@use_alias(V="verbose", f="coltypes", n="interpolation")
def grdtrack(points, grid, newcolname=None, outfile=None, **kwargs):
def grdtrack(
points,
grid,
newcolname=None,
outfile=None,
verbose=None,
coltypes=None,
interpolation=None,
**kwargs,
):
"""
Sample grids at specified (x,y) locations.

Expand Down
26 changes: 25 additions & 1 deletion pygmt/src/grdview.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,31 @@
t="transparency",
)
@kwargs_to_strings(R="sequence", c="sequence_comma", p="sequence")
def grdview(self, grid, **kwargs):
def grdview(
self,
grid,
region=None,
projection=None,
zscale=None,
zsize=None,
frame=None,
cmap=None,
drapegrid=None,
plane=None,
surftype=None,
contourpen=None,
meshpen=None,
facadepen=None,
shading=None,
verbose=None,
xshift=None,
yshift=None,
panel=None,
coltypes=None,
perspective=None,
transparency=None,
**kwargs,
):
r"""
Create 3-D perspective image or surface mesh from a grid.

Expand Down
Loading