Skip to content

Commit fb8bb46

Browse files
committed
Merge branch 'master' into sampling/grdtrack
2 parents 4581a3e + dc178ed commit fb8bb46

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+427
-336
lines changed

.azure-pipelines.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ jobs:
8080

8181
strategy:
8282
matrix:
83+
Python38:
84+
python.version: '3.8'
85+
PYTHON: '3.8'
8386
Python37:
8487
python.version: '3.7'
8588
PYTHON: '3.7'
@@ -164,6 +167,9 @@ jobs:
164167

165168
strategy:
166169
matrix:
170+
Python38:
171+
python.version: '3.8'
172+
PYTHON: '3.8'
167173
Python37:
168174
python.version: '3.7'
169175
PYTHON: '3.7'

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ MANIFEST
1111
.pytest_cache/
1212
.ipynb_checkpoints/
1313
.vscode/
14+
tmp-test-dir-with-unique-name/
1415
build/
1516
dist/
1617
doc/_build

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ env:
3333
matrix:
3434
# Build under the following configurations
3535
include:
36+
- name: "Linux - Python 3.8"
37+
os: linux
38+
env:
39+
- PYTHON=3.8
3640
- name: "Linux - Python 3.7"
3741
os: linux
3842
env:

CONTRIBUTING.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,17 @@ make check # Runs flake8 and black (in check mode)
269269
make lint # Runs pylint, which is a bit slower
270270
```
271271

272+
#### Docstrings
273+
274+
**All docstrings** should follow the
275+
[numpy style guide](https://numpydoc.readthedocs.io/en/latest/format.html#docstring-standard).
276+
All functions/classes/methods should have docstrings with a full description of all
277+
arguments and return values.
278+
279+
While the maximum line length for code is automatically set by *Black*, docstrings
280+
must be formatted manually. To play nicely with Jupyter and IPython, **keep docstrings
281+
limited to 79 characters** per line.
282+
272283
### Testing your code
273284

274285
Automated testing helps ensure that our code is as free of bugs as it can be.
@@ -360,7 +371,7 @@ Sphinx will create a link to the automatically generated page for that
360371
function/class/module.
361372

362373
**All docstrings** should follow the
363-
[numpy style guide](https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt).
374+
[numpy style guide](https://numpydoc.readthedocs.io/en/latest/format.html).
364375
All functions/classes/methods should have docstrings with a full description of all
365376
arguments and return values.
366377

@@ -379,7 +390,7 @@ Some things that will increase the chance that your pull request is accepted qui
379390
*reason* behind non-obvious things.
380391
* Include an example of new features in the gallery or tutorials.
381392
* Follow the [PEP8](http://pep8.org) style guide for code and the
382-
[numpy guide](https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt)
393+
[numpy guide](https://numpydoc.readthedocs.io/en/latest/format.html)
383394
for documentation.
384395

385396
Pull requests will automatically have tests run by TravisCI.

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2017-2019 The PyGMT Developers
1+
Copyright (c) 2017-2020 The PyGMT Developers
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without modification,

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ PyGMT
55

66
`Documentation (development version) <https://www.pygmt.org/dev>`__ |
77
`Contact <https://gitter.im/GenericMappingTools/pygmt>`__ |
8-
`Forum <https://forum.generic-mapping-tools.org>`__ `
8+
`Forum <https://forum.generic-mapping-tools.org>`__
99

1010
.. image:: http://img.shields.io/pypi/v/pygmt.svg?style=flat-square
1111
:alt: Latest version on PyPI

doc/_templates/autosummary/class.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@
44

55
.. autoclass:: {{ objname }}
66

7+
.. rubric:: Methods Summary
8+
9+
.. autosummary::
10+
{% for item in methods %}
11+
{% if item != '__init__' %}
12+
{{ objname }}.{{ item }}
13+
{% endif %}
14+
{% endfor %}
15+
16+
.. include:: backreferences/{{ fullname }}.examples
17+
718
.. raw:: html
819

920
<div style='clear:both'></div>
21+

doc/conf.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,18 @@
2020
"sphinx.ext.viewcode",
2121
"sphinx.ext.extlinks",
2222
"sphinx.ext.intersphinx",
23-
"numpydoc",
23+
"sphinx.ext.napoleon",
2424
"nbsphinx",
2525
"sphinx_gallery.gen_gallery",
2626
]
2727

2828
# Autosummary pages will be generated by sphinx-autogen instead of sphinx-build
29-
autosummary_generate = False
29+
autosummary_generate = []
3030

31-
numpydoc_class_members_toctree = False
31+
# Make the list of returns arguments and attributes render the same as the
32+
# parameters list
33+
napoleon_use_rtype = False
34+
napoleon_use_ivar = True
3235

3336
# configure links to GMT docs
3437
extlinks = {

environment.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ channels:
55
dependencies:
66
- python=3.7
77
- pip
8+
- gmt=6.0.0
89
- numpy
910
- pandas
1011
- xarray
@@ -18,10 +19,9 @@ dependencies:
1819
- pytest-mpl
1920
- coverage
2021
- black
21-
- pylint
22+
- pylint=2.2.2
2223
- flake8
23-
- sphinx<=1.8.5
24-
- sphinx_rtd_theme
24+
- sphinx=2.2.1
25+
- sphinx_rtd_theme=0.4.3
2526
- sphinx-gallery
2627
- nbsphinx
27-
- numpydoc

pygmt/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
#
33
# The main API for PyGMT.
44
#
5-
# All of PyGMT is operated on a "modern mode session" (new to GMT6). When you import the
6-
# pygmt library, a new session will be started automatically. The session will be
7-
# closed when the current Python process terminates. Thus, the Python API does not
8-
# expose the `gmt begin` and `gmt end` commands.
5+
# All of PyGMT is operated on a "modern mode session" (new to GMT6). When you
6+
# import the pygmt library, a new session will be started automatically. The
7+
# session will be closed when the current Python process terminates. Thus, the
8+
# Python API does not expose the `gmt begin` and `gmt end` commands.
99

1010
import atexit as _atexit
1111

@@ -35,8 +35,8 @@ def print_clib_info():
3535
"""
3636
Print information about the GMT shared library that we can find.
3737
38-
Includes the GMT version, default values for parameters, the path to the ``libgmt``
39-
shared library, and GMT directories.
38+
Includes the GMT version, default values for parameters, the path to the
39+
``libgmt`` shared library, and GMT directories.
4040
"""
4141
from .clib import Session
4242

0 commit comments

Comments
 (0)