Skip to content

Commit ac99e08

Browse files
committed
Merge branch 'wrap-histogram' of github.com:GenericMappingTools/pygmt into wrap-histogram
2 parents f1cbad2 + c2ec478 commit ac99e08

File tree

301 files changed

+3067
-1587
lines changed

Some content is hidden

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

301 files changed

+3067
-1587
lines changed

.dvc/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/config.local
2+
/tmp
3+
/cache

.dvc/config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[core]
2+
remote = upstream
3+
['remote "upstream"']
4+
url = https://dagshub.com/GenericMappingTools/pygmt.dvc

.dvcignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Add patterns of files dvc should ignore, which could improve
2+
# the performance. Learn more at
3+
# https://dvc.org/doc/user-guide/dvcignore

.github/codecov.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,15 @@ codecov:
44

55
coverage:
66
status:
7+
project:
8+
default:
9+
target: auto # increase overall coverage on each pull request
10+
threshold: 0.25% # Allow the coverage to drop by X%
11+
if_not_found: success
12+
if_ci_failed: failure
713
patch:
814
default:
9-
target: '90'
10-
if_no_uploads: error
15+
target: 90% # >=90% of new changes should be tested
1116
if_not_found: success
1217
if_ci_failed: failure
1318

.github/release-drafter.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ exclude-labels:
2323
category-template: '### $TITLE'
2424
change-template: '* $TITLE ([#$NUMBER]($URL))'
2525
template: |
26-
## Release v$NEXT_PATCH_VERSION (20YY/MM/DD)
26+
## Release v$RESOLVED_VERSION (20YY/MM/DD)
2727
28-
[![Digital Object Identifier for PyGMT v$NEXT_PATCH_VERSION](https://zenodo.org/badge/DOI/10.5281/zenodo.3781524.svg)](https://doi.org/10.5281/zenodo.3781524)
28+
[![Digital Object Identifier for PyGMT v$RESOLVED_VERSION](https://zenodo.org/badge/DOI/10.5281/zenodo.3781524.svg)](https://doi.org/10.5281/zenodo.3781524)
2929
3030
### Highlights
3131

.github/workflows/cache_data.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
steps:
2020
# Setup Miniconda
2121
- name: Setup Miniconda
22-
uses: conda-incubator/setup-miniconda@v2.0.1
22+
uses: conda-incubator/setup-miniconda@v2.1.0
2323
with:
2424
channels: conda-forge
2525
miniconda-version: "latest"
@@ -40,9 +40,11 @@ jobs:
4040
# The naming scheme may change.
4141
# DO NOT USE IT IN SCRIPTS.
4242
gmt which -Ga @N35E135.earth_relief_03s_g.nc
43+
# @srtm_tiles.nc is needed for 03s and 01s relief data
44+
gmt which -Ga @srtm_tiles.nc
4345
gmt which -Ga @ridge.txt @Table_5_11.txt @test.dat.nc \
4446
@tut_bathy.nc @tut_quakes.ngdc @tut_ship.xyz \
45-
@usgs_quakes_22.txt
47+
@usgs_quakes_22.txt @fractures_06.txt
4648
4749
# Upload the downloaded files as artifacts to GitHub
4850
- name: Upload artifacts to GitHub

.github/workflows/check-links.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
path: documentation
2727

2828
- name: Link Checker
29-
uses: lycheeverse/lychee-action@v1.0.4
29+
uses: lycheeverse/lychee-action@v1.0.6
3030
with:
3131
# 429: Too many requests
3232
args: >

.github/workflows/ci_docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656

5757
# Setup Miniconda
5858
- name: Setup Miniconda
59-
uses: conda-incubator/setup-miniconda@v2.0.1
59+
uses: conda-incubator/setup-miniconda@v2.1.0
6060
with:
6161
activate-environment: pygmt
6262
python-version: ${{ matrix.python-version }}
@@ -68,7 +68,7 @@ jobs:
6868
run: |
6969
conda install gmt=6.1.1 numpy pandas xarray netCDF4 packaging \
7070
ipython make myst-parser \
71-
sphinx sphinx-copybutton sphinx-gallery sphinx_rtd_theme=0.4.3
71+
sphinx sphinx-copybutton sphinx-gallery sphinx_rtd_theme=0.5.1
7272
7373
# Show installed pkg information for postmortem diagnostic
7474
- name: List installed packages

.github/workflows/ci_tests.yaml

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ on:
2525

2626
jobs:
2727
test:
28-
name: ${{ matrix.os }} - Python ${{ matrix.python-version }}
28+
name: ${{ matrix.os }} - Python ${{ matrix.python-version }} / NumPy ${{ matrix.numpy-version }}
2929
runs-on: ${{ matrix.os }}
3030
strategy:
3131
fail-fast: false
3232
matrix:
33-
python-version: [3.7, 3.8, 3.9]
33+
python-version: [3.7, 3.9]
3434
os: [ubuntu-latest, macOS-latest, windows-latest]
3535
# Is it a draft Pull Request (true or false)?
3636
isDraft:
@@ -41,20 +41,24 @@ jobs:
4141
isDraft: true
4242
- os: windows-latest
4343
isDraft: true
44-
- os: ubuntu-latest
45-
python-version: 3.7
46-
isDraft: true
47-
- os: ubuntu-latest
48-
python-version: 3.8
49-
isDraft: true
44+
# - os: ubuntu-latest
45+
# python-version: 3.7
46+
# isDraft: true
47+
# Pair Python 3.7 with NumPy 1.17 and Python 3.9 with NumPy 1.20
48+
include:
49+
- python-version: 3.7
50+
numpy-version: '1.17'
51+
- python-version: 3.9
52+
numpy-version: '1.20'
5053
defaults:
5154
run:
5255
shell: bash -l {0}
5356

54-
# environmental variables used in coverage
57+
# Environment variables used by codecov
5558
env:
5659
OS: ${{ matrix.os }}
5760
PYTHON: ${{ matrix.python-version }}
61+
NUMPY: ${{ matrix.numpy-version }}
5862

5963
steps:
6064
# Cancel previous runs that are not completed
@@ -72,7 +76,7 @@ jobs:
7276

7377
# Setup Miniconda
7478
- name: Setup Miniconda
75-
uses: conda-incubator/setup-miniconda@v2.0.1
79+
uses: conda-incubator/setup-miniconda@v2.1.0
7680
with:
7781
activate-environment: pygmt
7882
python-version: ${{ matrix.python-version }}
@@ -82,8 +86,9 @@ jobs:
8286
# Install GMT and other required dependencies from conda-forge
8387
- name: Install dependencies
8488
run: |
85-
conda install gmt=6.1.1 numpy pandas xarray netCDF4 packaging \
86-
codecov coverage[toml] ipython make \
89+
conda install gmt=6.1.1 numpy=${{ matrix.numpy-version }} \
90+
pandas xarray netCDF4 packaging \
91+
codecov coverage[toml] dvc ipython make \
8792
pytest-cov pytest-mpl pytest>=6.0 \
8893
sphinx-gallery
8994
@@ -109,6 +114,12 @@ jobs:
109114
touch ~/.gmt/server/gmt_data_server.txt ~/.gmt/server/gmt_hash_server.txt
110115
ls -lhR ~/.gmt
111116
117+
# Pull baseline image data from dvc remote (DAGsHub)
118+
- name: Pull baseline image data from dvc remote
119+
run: |
120+
dvc pull
121+
ls -lhR pygmt/tests/baseline/
122+
112123
# Install the package that we want to test
113124
- name: Install the package
114125
run: |
@@ -129,8 +140,8 @@ jobs:
129140

130141
# Upload coverage to Codecov
131142
- name: Upload coverage to Codecov
132-
uses: codecov/codecov-action@v1.2.2
143+
uses: codecov/codecov-action@v1.3.1
133144
with:
134145
file: ./coverage.xml # optional
135-
env_vars: OS,PYTHON
146+
env_vars: OS,PYTHON,NUMPY
136147
fail_ci_if_error: false

.github/workflows/ci_tests_dev.yaml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# This workflow installs PyGMT dependencies, builds documentation and runs tests on GMT dev version
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
1+
# This workflow installs PyGMT and runs tests on GMT dev version
32

43
name: GMT Dev Tests
54

@@ -10,10 +9,13 @@ on:
109
types: [ready_for_review]
1110
paths-ignore:
1211
- 'doc/**'
12+
- 'examples/**'
1313
- '*.md'
1414
- '*.json'
1515
- 'README.rst'
1616
- 'LICENSE.txt'
17+
- '.gitignore'
18+
- '.pylintrc'
1719
repository_dispatch:
1820
types: [test-gmt-dev-command]
1921
# Schedule daily tests
@@ -28,7 +30,7 @@ jobs:
2830
fail-fast: false
2931
matrix:
3032
python-version: [3.9]
31-
os: [ubuntu-20.04, macOS-10.15, windows-latest]
33+
os: [ubuntu-latest, macOS-11.0, windows-latest]
3234
gmt_git_ref: [master]
3335
defaults:
3436
run:
@@ -71,17 +73,20 @@ jobs:
7173

7274
# Setup Miniconda
7375
- name: Setup Miniconda
74-
uses: conda-incubator/setup-miniconda@v2.0.1
76+
uses: conda-incubator/setup-miniconda@v2.1.0
7577
with:
78+
activate-environment: pygmt
7679
python-version: ${{ matrix.python-version }}
7780
channels: conda-forge
7881
miniconda-version: "latest"
7982

80-
# Install build dependencies from conda-forge
81-
- name: Install build dependencies
83+
# Install dependencies from conda-forge
84+
- name: Install dependencies
8285
run: |
83-
conda install ninja cmake libblas libcblas liblapack fftw gdal ghostscript \
84-
libnetcdf hdf5 zlib curl pcre ipython pytest pytest-cov pytest-mpl
86+
conda install ninja cmake libblas libcblas liblapack fftw gdal \
87+
ghostscript libnetcdf hdf5 zlib curl pcre make dvc
88+
pip install --pre numpy pandas xarray netCDF4 packaging \
89+
ipython pytest-cov pytest-mpl pytest>=6.0 sphinx-gallery
8590
8691
# Build and install latest GMT from GitHub
8792
- name: Install GMT ${{ matrix.gmt_git_ref }} branch (Linux/macOS)
@@ -113,6 +118,12 @@ jobs:
113118
touch ~/.gmt/server/gmt_data_server.txt ~/.gmt/server/gmt_hash_server.txt
114119
ls -lhR ~/.gmt
115120
121+
# Pull baseline image data from dvc remote (DAGsHub)
122+
- name: Pull baseline image data from dvc remote
123+
run: |
124+
dvc pull
125+
ls -lhR pygmt/tests/baseline/
126+
116127
# Install the package that we want to test
117128
- name: Install the package
118129
run: |

0 commit comments

Comments
 (0)