Skip to content

Commit f8d2fcd

Browse files
authored
Merge pull request #1483 from jthielen/cartopy-to-pyproj-calc
Use PyProj instead of Cartopy for internal coordinate transforms and rename crs coordinate
2 parents 6bf9e25 + ee2117d commit f8d2fcd

26 files changed

Lines changed: 700 additions & 698 deletions

.github/workflows/docs.yml

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

9999
- name: Enable linkchecker for PRs
100100
if: ${{ github.event_name == 'pull_request' && matrix.check-links == true }}
101-
run: echo "::set-env name=LINKCHECKER::linkcheck"
101+
run: echo "LINKCHECKER=linkcheck" >> $GITHUB_ENV
102102

103103
- name: Build docs
104104
run: |
@@ -120,7 +120,7 @@ jobs:
120120
# branch that's not master (which is confined to n.nn.x above) or on a tag.
121121
- name: Set doc version
122122
if: ${{ github.event_name != 'push' || !contains(github.ref, 'master') }}
123-
run: echo "::set-env name=DOC_VERSION::v$(python -c 'import metpy; print(metpy.__version__.rsplit(".", maxsplit=2)[0])')"
123+
run: echo "DOC_VERSION=v$(python -c 'import metpy; print(metpy.__version__.rsplit(".", maxsplit=2)[0])')" >> $GITHUB_ENV
124124

125125
- name: Upload to GitHub Pages
126126
if: ${{ github.event_name != 'pull_request' && matrix.experimental == false }}

.github/workflows/linting.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
curl -sfL \
2626
https://github.com/reviewdog/reviewdog/raw/master/install.sh | \
2727
sh -s -- -b $HOME/bin
28-
echo ::add-path::$HOME/bin
28+
echo "$HOME/bin" >> $GITHUB_PATH
2929
3030
- name: Run flake8
3131
env:

.github/workflows/tests-conda.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ jobs:
108108
path: test_output/
109109

110110
- name: Upload coverage
111+
if: ${{ always() }}
111112
uses: codecov/codecov-action@v1
112113
with:
113114
name: conda-${{ matrix.python-version }}-${{ runner.os }}

.github/workflows/tests-pypi.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ jobs:
126126
path: test_output/
127127

128128
- name: Upload coverage
129+
if: ${{ always() }}
129130
uses: codecov/codecov-action@v1
130131
with:
131132
name: pypi-${{ matrix.python-version }}-${{ matrix.dep-versions }}-${{ matrix.no-extras }}-${{ runner.os }}

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ script:
8888
fi
8989

9090
after_script:
91-
- if [[ $TASK != "coverage" ]]; then
91+
- if [[ $TASK == "coverage" ]]; then
9292
pip install codecov codacy-coverage;
9393
coverage xml;
9494
codecov -X gcov -f coverage.xml -e TRAVIS_PYTHON_VERSION;

ci/Current.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
importlib_metadata==2.0.0
2+
importlib_resources==3.0.0
13
matplotlib==3.3.2
24
numpy==1.19.1
3-
scipy==1.5.2
5+
pandas==1.1.3
6+
pooch==1.2.0
47
pint==0.16.1
5-
xarray==0.16.1
8+
pyproj==2.6.1.post1
9+
scipy==1.5.2
610
traitlets==4.3.3
7-
pooch==1.2.0
8-
pandas==1.1.3
9-
importlib_metadata==2.0.0
10-
importlib_resources==3.0.0
11+
xarray==0.16.1

ci/Minimum

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
importlib_metadata==1.0.0
2+
importlib_resources==1.3.0
13
matplotlib==2.1.0
24
numpy==1.16.0
3-
scipy==1.0.0
5+
pandas==0.22.0
46
pint==0.10.1
5-
xarray==0.14.1
6-
traitlets==4.3.0
77
pooch==0.1
8-
pandas==0.22.0
9-
importlib_metadata==1.0.0
10-
importlib_resources==1.3.0
8+
pyproj==2.3.0
9+
scipy==1.0.0
10+
traitlets==4.3.0
11+
xarray==0.14.1

ci/Prerelease

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
matplotlib>=0.0.dev0
22
numpy>=0.0.dev0
3-
scipy>=0.0.dev0
4-
traitlets>=0.0.dev0
53
pooch>=0.0.dev0
64
pandas>=0.0.dev0
5+
pyproj>=0.0.dev0
6+
scipy>=0.0.dev0
7+
traitlets>=0.0.dev0

ci/extra_requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
cartopy==0.18.0
2-
pyproj==2.6.1.post1

conftest.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import numpy
1111
import pandas
1212
import pooch
13+
import pyproj
1314
import pytest
1415
import scipy
1516
import traitlets
@@ -25,10 +26,10 @@
2526
def pytest_report_header(config, startdir):
2627
"""Add dependency information to pytest output."""
2728
return (f'Dep Versions: Matplotlib {matplotlib.__version__}, '
28-
f'NumPy {numpy.__version__}, SciPy {scipy.__version__}, '
29-
f'Xarray {xarray.__version__}, Pint {pint.__version__}, '
30-
f'Pandas {pandas.__version__}, Traitlets {traitlets.__version__}, '
31-
f'Pooch {pooch.version.full_version}')
29+
f'NumPy {numpy.__version__}, Pandas {pandas.__version__}, '
30+
f'Pint {pint.__version__}, Pooch {pooch.version.full_version}\n'
31+
f'\tPyProj {pyproj.__version__}, SciPy {scipy.__version__}, '
32+
f'Traitlets {traitlets.__version__}, Xarray {xarray.__version__}')
3233

3334

3435
@pytest.fixture(autouse=True)
@@ -45,6 +46,7 @@ def ccrs():
4546
4647
Any testing function/fixture that needs access to ``cartopy.crs`` can simply add this to
4748
their parameter list.
49+
4850
"""
4951
return pytest.importorskip('cartopy.crs')
5052

@@ -55,15 +57,14 @@ def cfeature():
5557
5658
Any testing function/fixture that needs access to ``cartopy.feature`` can simply add this
5759
to their parameter list.
60+
5861
"""
5962
return pytest.importorskip('cartopy.feature')
6063

6164

6265
@pytest.fixture()
6366
def test_da_lonlat():
6467
"""Return a DataArray with a lon/lat grid and no time coordinate for use in tests."""
65-
pytest.importorskip('cartopy')
66-
6768
data = numpy.linspace(300, 250, 3 * 4 * 4).reshape((3, 4, 4))
6869
ds = xarray.Dataset(
6970
{'temperature': (['isobaric', 'lat', 'lon'], data)},
@@ -96,8 +97,6 @@ def test_da_lonlat():
9697
@pytest.fixture()
9798
def test_da_xy():
9899
"""Return a DataArray with a x/y grid and a time coordinate for use in tests."""
99-
pytest.importorskip('cartopy')
100-
101100
data = numpy.linspace(300, 250, 3 * 3 * 4 * 4).reshape((3, 3, 4, 4))
102101
ds = xarray.Dataset(
103102
{'temperature': (['time', 'isobaric', 'y', 'x'], data),

0 commit comments

Comments
 (0)