Skip to content

Commit 1dbfff5

Browse files
author
Meghan Jones
committed
Merge branch 'main' into grdhisteq
2 parents 1cf0a95 + f7d5526 commit 1dbfff5

File tree

163 files changed

+2346
-1187
lines changed

Some content is hidden

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

163 files changed

+2346
-1187
lines changed

.github/workflows/cache_data.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,21 @@ jobs:
2424
# fecth all history so that setuptools-scm works
2525
fetch-depth: 0
2626

27-
# Setup Miniconda
28-
- name: Setup Miniconda
27+
# Install Mambaforge with conda-forge dependencies
28+
- name: Setup Mambaforge
2929
uses: conda-incubator/setup-miniconda@v2.1.1
3030
with:
31-
channels: conda-forge
32-
miniconda-version: "latest"
31+
channels: conda-forge,nodefaults
32+
channel-priority: strict
33+
miniforge-version: latest
34+
miniforge-variant: Mambaforge
35+
mamba-version: "*"
36+
use-mamba: true
3337

3438
# Install GMT and other required dependencies from conda-forge
3539
- name: Install dependencies
3640
run: |
37-
conda install gmt=6.2.0 \
41+
mamba install gmt=6.2.0 \
3842
numpy pandas xarray netCDF4 packaging matplotlib
3943
4044
# Install the package that we want to test

.github/workflows/ci_docs.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,25 +54,29 @@ jobs:
5454
# fecth all history so that setuptools-scm works
5555
fetch-depth: 0
5656

57-
# Setup Miniconda
58-
- name: Setup Miniconda
57+
# Install Mambaforge with conda-forge dependencies
58+
- name: Setup Mambaforge
5959
uses: conda-incubator/setup-miniconda@v2.1.1
6060
with:
6161
activate-environment: pygmt
6262
python-version: ${{ matrix.python-version }}
63-
channels: conda-forge
64-
miniconda-version: "latest"
63+
channels: conda-forge,nodefaults
64+
channel-priority: strict
65+
miniforge-version: latest
66+
miniforge-variant: Mambaforge
67+
mamba-version: "*"
68+
use-mamba: true
6569

6670
# Install GMT and other required dependencies from conda-forge
6771
- name: Install dependencies
6872
run: |
69-
conda install gmt=6.2.0 numpy pandas xarray netCDF4 packaging \
70-
ipython make myst-parser \
73+
mamba install gmt=6.2.0 numpy pandas xarray netCDF4 packaging \
74+
ipython make myst-parser geopandas \
7175
sphinx sphinx-copybutton sphinx-gallery sphinx_rtd_theme
7276
7377
# Show installed pkg information for postmortem diagnostic
7478
- name: List installed packages
75-
run: conda list
79+
run: mamba list
7680

7781
# Download cached remote files (artifacts) from GitHub
7882
- name: Download remote data from GitHub

.github/workflows/ci_tests.yaml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ jobs:
4444
# - os: ubuntu-latest
4545
# python-version: 3.7
4646
# isDraft: true
47-
# Pair Python 3.7 with NumPy 1.17 and Python 3.9 with NumPy 1.21
47+
# Pair Python 3.7 with NumPy 1.18 and Python 3.9 with NumPy 1.21
4848
# Only install optional packages on Python 3.9/NumPy 1.21
4949
include:
5050
- python-version: 3.7
51-
numpy-version: '1.17'
51+
numpy-version: '1.18'
5252
optional-packages: ''
5353
- python-version: 3.9
5454
numpy-version: '1.21'
@@ -77,28 +77,32 @@ jobs:
7777
# fecth all history so that setuptools-scm works
7878
fetch-depth: 0
7979

80-
# Setup Miniconda
81-
- name: Setup Miniconda
80+
# Install Mambaforge with conda-forge dependencies
81+
- name: Setup Mambaforge
8282
uses: conda-incubator/setup-miniconda@v2.1.1
8383
with:
8484
activate-environment: pygmt
8585
python-version: ${{ matrix.python-version }}
86-
channels: conda-forge
87-
miniconda-version: "latest"
86+
channels: conda-forge,nodefaults
87+
channel-priority: strict
88+
miniforge-version: latest
89+
miniforge-variant: Mambaforge
90+
mamba-version: "*"
91+
use-mamba: true
8892

8993
# Install GMT and other required dependencies from conda-forge
9094
- name: Install dependencies
9195
run: |
92-
conda install gmt=6.2.0 numpy=${{ matrix.numpy-version }} \
96+
mamba install gmt=6.2.0 numpy=${{ matrix.numpy-version }} \
9397
pandas xarray netCDF4 packaging \
9498
${{ matrix.optional-packages }} \
95-
codecov coverage[toml] dvc ipython make \
99+
coverage[toml] dvc ipython make \
96100
pytest-cov pytest-mpl pytest>=6.0 \
97101
sphinx-gallery
98102
99103
# Show installed pkg information for postmortem diagnostic
100104
- name: List installed packages
101-
run: conda list
105+
run: mamba list
102106

103107
# Download cached remote files (artifacts) from GitHub
104108
- name: Download remote data from GitHub
@@ -144,7 +148,7 @@ jobs:
144148

145149
# Upload coverage to Codecov
146150
- name: Upload coverage to Codecov
147-
uses: codecov/codecov-action@v2.0.2
151+
uses: codecov/codecov-action@v2.1.0
148152
with:
149153
file: ./coverage.xml # optional
150154
env_vars: OS,PYTHON,NUMPY

.github/workflows/ci_tests_dev.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,23 @@ jobs:
7171
# fecth all history so that setuptools-scm works
7272
fetch-depth: 0
7373

74-
# Setup Miniconda
75-
- name: Setup Miniconda
74+
# Install Mambaforge with conda-forge dependencies
75+
- name: Setup Mambaforge
7676
uses: conda-incubator/setup-miniconda@v2.1.1
7777
with:
7878
activate-environment: pygmt
7979
python-version: ${{ matrix.python-version }}
80-
channels: conda-forge
81-
miniconda-version: "latest"
80+
channels: conda-forge,nodefaults
81+
channel-priority: strict
82+
miniforge-version: latest
83+
miniforge-variant: Mambaforge
84+
mamba-version: "*"
85+
use-mamba: true
8286

8387
# Install dependencies from conda-forge
8488
- name: Install dependencies
8589
run: |
86-
conda install ninja cmake libblas libcblas liblapack fftw gdal geopandas \
90+
mamba install ninja cmake libblas libcblas liblapack fftw gdal geopandas \
8791
ghostscript libnetcdf hdf5 zlib curl pcre make dvc
8892
pip install --pre numpy pandas xarray netCDF4 packaging \
8993
ipython pytest-cov pytest-mpl pytest>=6.0 sphinx-gallery \
@@ -98,7 +102,7 @@ jobs:
98102
if: runner.os != 'Windows'
99103

100104
- name: Install GMT dev version from conda-forge (Windows)
101-
run: conda install -c conda-forge/label/dev gmt
105+
run: mamba install -c conda-forge/label/dev gmt=6.3
102106
if: runner.os == 'Windows'
103107

104108
# Download cached remote files (artifacts) from GitHub

.github/workflows/dvc-diff.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
uses: iterative/setup-dvc@v1.0.3
2323

2424
- name: Setup continuous machine learning (CML)
25-
uses: iterative/setup-cml@v1.0.3
25+
uses: iterative/setup-cml@v1.1.0
2626

2727
- name: Pull image data from cloud storage
2828
run: dvc pull --remote upstream
@@ -95,7 +95,7 @@ jobs:
9595
echo ::set-output name=report::$report
9696
9797
- name: Find comment with image diff report
98-
uses: peter-evans/find-comment@v1.2.0
98+
uses: peter-evans/find-comment@v1.3.0
9999
id: fc
100100
with:
101101
issue-number: ${{ github.event.pull_request.number }}

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ BLACK_FILES=$(PROJECT) setup.py doc/conf.py examples
88
BLACKDOC_OPTIONS=--line-length 79
99
DOCFORMATTER_FILES=$(PROJECT) setup.py doc/conf.py examples
1010
DOCFORMATTER_OPTIONS=--recursive --pre-summary-newline --make-summary-multi-line --wrap-summaries 79 --wrap-descriptions 79
11-
FLAKE8_FILES=$(PROJECT) setup.py doc/conf.py
11+
FLAKE8_FILES=$(PROJECT) setup.py doc/conf.py examples
1212
LINT_FILES=$(PROJECT) setup.py doc/conf.py
1313

1414
help:

README.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ PyGMT
1616
.. image:: https://github.com/GenericMappingTools/pygmt/workflows/GMT%20Dev%20Tests/badge.svg
1717
:alt: GitHub Actions GMT Dev Tests status
1818
:target: https://github.com/GenericMappingTools/pygmt/actions/workflows/ci_tests_dev.yaml
19-
.. image:: https://img.shields.io/codecov/c/github/GenericMappingTools/pygmt/main.svg?style=flat-square
19+
.. image:: https://codecov.io/gh/GenericMappingTools/pygmt/branch/main/graph/badge.svg?token=78Fu4EWstx
2020
:alt: Test coverage status
21-
:target: https://codecov.io/gh/GenericMappingTools/pygmt
21+
:target: https://app.codecov.io/gh/GenericMappingTools/pygmt
2222
.. image:: https://img.shields.io/pypi/pyversions/pygmt.svg?style=flat-square
2323
:alt: Compatible Python versions.
2424
:target: https://pypi.python.org/pypi/pygmt
@@ -228,16 +228,21 @@ Compatibility with GMT/Python/NumPy versions
228228
- GMT
229229
- Python
230230
- Numpy
231+
* - `v0.5.0 <https://github.com/GenericMappingTools/pygmt/milestone/8>`_ (upcoming release)
232+
- `Dev Documentation <https://www.pygmt.org/dev>`_ (reflects `main branch <https://github.com/GenericMappingTools/pygmt>`_)
233+
- >=6.2.0
234+
- >=3.7
235+
- >=1.18
231236
* - `v0.4.1 <https://github.com/GenericMappingTools/pygmt/releases/tag/v0.4.1>`_ (latest release)
232237
- `v0.4.1 Documentation <https://www.pygmt.org/v0.4.1>`_
233238
- >=6.2.0
234239
- >=3.7
235-
- >=1.17.0
240+
- >=1.17
236241
* - `v0.4.0 <https://github.com/GenericMappingTools/pygmt/releases/tag/v0.4.0>`_
237242
- `v0.4.0 Documentation <https://www.pygmt.org/v0.4.0>`_
238243
- >=6.2.0
239244
- >=3.7
240-
- >=1.17.0
245+
- >=1.17
241246
* - `v0.3.1 <https://github.com/GenericMappingTools/pygmt/releases/tag/v0.3.1>`_
242247
- `v0.3.1 Documentation <https://www.pygmt.org/v0.3.1>`_
243248
- >=6.1.1
@@ -273,6 +278,3 @@ Compatibility with GMT/Python/NumPy versions
273278
- >=6.0.0
274279
- 3.6 - 3.8
275280
-
276-
277-
The unstable development documentation, which reflects the `main branch <https://github.com/GenericMappingTools/pygmt>`_
278-
on GitHub, can be found at https://www.pygmt.org/dev/.

doc/api/index.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ Operations on tabular data:
8181

8282
blockmean
8383
blockmedian
84+
blockmode
8485
surface
8586

8687
Operations on grids:
@@ -92,11 +93,13 @@ Operations on grids:
9293
grdcut
9394
grdfill
9495
grdfilter
96+
grdgradient
9597
grdhisteq
9698
grdlandmask
97-
grdgradient
99+
grdproject
98100
grdsample
99101
grdtrack
102+
sphdistance
100103
xyz2grd
101104

102105
Crossover analysis with x2sys:
@@ -107,6 +110,14 @@ Crossover analysis with x2sys:
107110
x2sys_init
108111
x2sys_cross
109112

113+
Input/output
114+
------------
115+
116+
.. autosummary::
117+
:toctree: generated
118+
119+
load_dataarray
120+
110121
GMT Defaults
111122
------------
112123

@@ -162,6 +173,7 @@ and store them in the GMT cache folder.
162173
datasets.load_sample_bathymetry
163174
datasets.load_usgs_quakes
164175
datasets.load_fractures_compilation
176+
datasets.load_hotspots
165177

166178
.. automodule:: pygmt.exceptions
167179

doc/conf.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,9 @@
127127
release = __version__
128128

129129
# These enable substitutions using |variable| in the rst files
130-
rst_epilog = """
130+
rst_epilog = f"""
131131
.. |year| replace:: {year}
132-
""".format(
133-
year=year
134-
)
132+
"""
135133

136134
html_last_updated_fmt = "%b %d, %Y"
137135
html_title = "PyGMT"

doc/install.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Dependencies
8080

8181
PyGMT requires the following libraries to be installed:
8282

83-
* `numpy <https://numpy.org>`__ (>= 1.17)
83+
* `numpy <https://numpy.org>`__ (>= 1.18)
8484
* `pandas <https://pandas.pydata.org>`__
8585
* `xarray <https://xarray.pydata.org>`__
8686
* `netCDF4 <https://unidata.github.io/netcdf4-python>`__

0 commit comments

Comments
 (0)