Skip to content

Commit

Permalink
REF: Use pyproj 2+ for PROJ 6+ migration
Browse files Browse the repository at this point in the history
  • Loading branch information
snowman2 committed Aug 13, 2021
1 parent 73f7f9a commit 726ebac
Show file tree
Hide file tree
Showing 20 changed files with 721 additions and 869 deletions.
5 changes: 3 additions & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ install:
- conda config --add channels conda-forge
- conda config --add channels conda-forge/label/testing
- set ENV_NAME=test-environment
- set PACKAGES=%PACKAGES% flufl.lock owslib pep8 pillow pyepsg pyshp pytest
- set PACKAGES=%PACKAGES% flufl.lock owslib pep8 pillow pyshp pytest
- set PACKAGES=%PACKAGES% requests setuptools_scm setuptools_scm_git_archive
- set PACKAGES=%PACKAGES% shapely
- set PACKAGES=%PACKAGES% shapely pyproj
- conda create -n %ENV_NAME% python=%PYTHON_VERSION% %PACKAGES%
- activate %ENV_NAME%
- set INCLUDE=%CONDA_PREFIX%\Library\include;%INCLUDE%
Expand All @@ -37,6 +37,7 @@ build_script:

test_script:
- set MPLBACKEND=Agg
- set PYPROJ_GLOBAL_CONTEXT=ON
- pytest --pyargs cartopy

artifacts:
Expand Down
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ deps-run: &deps-install
owslib \
pillow \
'proj<8' \
pyepsg \
pyproj \
pykdtree \
pyshp \
requests \
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ jobs:
if: matrix.python-version == '3.6' && matrix.os == 'macos-latest'
id: minimum-packages
run: |
echo "PACKAGES=cython=0.28.5 matplotlib=2.2.2 numpy=1.16 owslib=0.17 proj4=5.2.0 scipy=1.2.0" >> $GITHUB_ENV
echo "PACKAGES=cython=0.28.5 matplotlib=2.2.2 numpy=1.16 owslib=0.17 pyproj=2.5 proj=6.3.1 scipy=1.2.0" >> $GITHUB_ENV
echo "CFLAGS=-stdlib=libc++" >> $GITHUB_ENV
- name: Latest packages
if: steps.minimum-packages.conclusion == 'skipped'
run: |
echo "PACKAGES=cython fiona matplotlib-base numpy proj<8 pykdtree scipy" >> $GITHUB_ENV
echo "PACKAGES=cython fiona matplotlib-base numpy pyproj proj pykdtree scipy" >> $GITHUB_ENV
- name: Coverage packages
id: coverage
Expand All @@ -48,7 +48,7 @@ jobs:
- name: Install dependencies
run: |
PACKAGES="$PACKAGES flufl.lock owslib pep8 pillow pyepsg pyshp pytest"
PACKAGES="$PACKAGES flufl.lock owslib pep8 pillow pyshp pytest"
PACKAGES="$PACKAGES pytest-xdist requests setuptools_scm"
PACKAGES="$PACKAGES setuptools_scm_git_archive shapely"
conda install $PACKAGES
Expand All @@ -70,7 +70,7 @@ jobs:
# Check that the downloader tool at least knows where to get the data from (but don't actually download it)
python tools/cartopy_feature_download.py gshhs physical --dry-run
CARTOPY_GIT_DIR=$PWD
pytest -n 4 --doctest-modules --pyargs cartopy ${EXTRA_TEST_ARGS}
PYPROJ_GLOBAL_CONTEXT=ON pytest -n 4 --doctest-modules --pyargs cartopy ${EXTRA_TEST_ARGS}
- name: Coveralls
if: steps.coverage.conclusion == 'success'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:

- name: Install dependencies
run: |
PACKAGES="cython fiona matplotlib-base numpy proj<8 pykdtree scipy"
PACKAGES="$PACKAGES flufl.lock owslib pep8 pillow pyepsg pyshp pytest"
PACKAGES="cython fiona matplotlib-base numpy pyproj proj pykdtree scipy"
PACKAGES="$PACKAGES flufl.lock owslib pep8 pillow pyshp pytest"
PACKAGES="$PACKAGES pytest-xdist requests setuptools_scm"
PACKAGES="$PACKAGES setuptools_scm_git_archive shapely"
conda install $PACKAGES
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ benchmarks/envs/
*.swp
.ipynb_checkpoints/
.idea/
.vscode/

# Operating system files
\.DS_Store
Expand Down
9 changes: 4 additions & 5 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,10 @@ Further information about the required dependencies can be found here:
**pyshp** 2.0 or later (https://pypi.python.org/pypi/pyshp)
Pure Python read/write support for ESRI Shapefile format.

**PROJ** 4.9.0 or later (https://proj4.org/)
Cartographic Projections library.
**PROJ** 4.9.0 or later; 6.2 or later recommended (https://proj4.org/).

**pyproj** 2.5.0 or later (https://github.com/pyproj4/pyproj/)
Python interface to PROJ (cartographic projections and coordinate transformations library).

Optional Dependencies
~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -109,9 +111,6 @@ to install these optional dependencies.
**Pillow** 1.7.8 or later (https://pypi.python.org/pypi/Pillow/2.3.0)
A popular fork of PythonImagingLibrary.

**pyepsg** 0.4.0 or later (https://github.com/rhattersley/pyepsg)
A simple Python interface to https://epsg.io

**pykdtree** 1.2.2 or later (https://github.com/storpipfugl/pykdtree)
A fast kd-tree implementation that is used for faster warping
of images than SciPy.
Expand Down
20 changes: 0 additions & 20 deletions lib/cartopy/_crs.pxd

This file was deleted.

Loading

0 comments on commit 726ebac

Please sign in to comment.