Skip to content

Commit

Permalink
Merge branch 'main' into FEAT_add_etopo1
Browse files Browse the repository at this point in the history
  • Loading branch information
smartlixx committed Aug 6, 2023
2 parents 16d7d95 + a6c0835 commit dcc90b5
Show file tree
Hide file tree
Showing 211 changed files with 4,463 additions and 2,159 deletions.
47 changes: 0 additions & 47 deletions .appveyor.yml

This file was deleted.

51 changes: 5 additions & 46 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,57 +12,21 @@ version: 2.1
apt-run: &apt-install
name: Install apt packages
command: |
apt-get -qq update
apt-get install -y \
sudo apt -qq update
sudo apt install -y \
gcc \
g++ \
make
env-run: &env-setup
# Create the basic testing environment
# Mixing conda-forge and defaults in root is a recipe for trouble, so create
# a separate environment.
name: Setup conda environment
command: |
conda config \
--set always_yes yes \
--set changeps1 no \
--set show_channel_urls yes
conda config --add channels conda-forge
conda create -n test-environment python=$PYTHON_VERSION
deps-run: &deps-install
name: Install Python dependencies
command: |
conda install -n test-environment --quiet \
cython \
'matplotlib>3.3' \
numpy \
owslib \
pillow \
pyproj \
pykdtree \
pyshp \
requests \
scipy \
setuptools_scm \
setuptools_scm_git_archive \
shapely \
$EXTRA_PACKAGES \
--file docs/doc-requirements.txt
conda list -n test-environment
cp-run: &cp-install
name: Install Cartopy
command: |
source activate test-environment
pip install -ve .
python -m pip install --upgrade --user pip
python -m pip install --user -ve .[doc,ows,plotting,speedups]
doc-run: &doc-build
name: Build documentation
command: |
source activate test-environment
PYPROJ_GLOBAL_CONTEXT=ON
make -C docs html
Expand All @@ -73,16 +37,11 @@ doc-run: &doc-build
jobs:
docs-python3:
docker:
- image: continuumio/miniconda3:latest
- image: cimg/python:3.11
steps:
- checkout

- run: *apt-install
- run:
<<: *env-setup
environment:
PYTHON_VERSION: 3
- run: *deps-install
- run: *cp-install

- run: *doc-build
Expand Down
9 changes: 1 addition & 8 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,12 @@

[run]
branch = True
omit =
lib/cartopy/examples/*
lib/cartopy/sphinxext/*
omit =
lib/cartopy/tests/*
lib/cartopy/_version.py
*.pxd
plugins = Cython.Coverage

[paths]
source =
lib/cartopy
/home/travis/miniconda/envs/test-environment/lib/python?.?/site-packages/cartopy

[report]
exclude_lines =
pragma: no cover
Expand Down
11 changes: 11 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# style: start of pre-commit and whitespace fixes
16aba40dd09fb95c85fac1a0bee0f795b9f8b5fe

# format: spell checking (#2153)
eb1dd508e087396948de5a3d20c5791500743ddf

# style: sort __all__ statements (#2151)
c00e0adae1b1e8695e173f4482369face82206ee

# style: adopt isort to enforce import ordering (#2150)
030a78b0f5cd6a88b04dd2fbe78f12b4b3e5e60d
1 change: 0 additions & 1 deletion .git_archival.txt

This file was deleted.

3 changes: 1 addition & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Getting started
1. Fork the Cartopy repository, create your new fix/feature branch, and
start committing code. We broadly follow the [gitwash guidelines](https://matthew-brett.github.io/pydagogue/gitwash/git_development.html).
1. Remember to add appropriate documentation and tests to supplement any new or changed functionality.
1. If you're not already on it (and would like to be), please add yourself to the
1. If you're not already on it (and would like to be), please add yourself to the
contributors list (docs/source/contributors.rst)


Expand All @@ -29,4 +29,3 @@ Submitting changes
1. Push your branch to your fork of cartopy.
1. Submit your pull request.
1. Sit back and wait for the core Cartopy development team to review your code.

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ questions on StackOverflow can be found at https://stackoverflow.com/questions/t
```

#### Traceback
#### Traceback

```
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ request could be broken into smaller parts before submitting.
* If this is a new feature, please provide an example of its use in the description. We may want to make a
follow-on pull request to put the example in the gallery!
* Ensure there is a suitable item in the cartopy test suite for the change you are proposing.
* Ensure there is a suitable item in the cartopy test suite for the change you are proposing.
-->
4 changes: 3 additions & 1 deletion .github/SUPPORT.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
* Ask usage questions on [StackOverflow](https://stackoverflow.com/questions/tagged/cartopy).
* For less well defined questions, ideas, general discussion or announcements of related projects use the [Google Group](https://groups.google.com/forum/#!forum/scitools-iris).
* For less well defined questions, ideas, general discussion or announcements of related projects use the
[Cartopy category on Matplotlib's Discourse](https://discourse.matplotlib.org/c/3rdparty/cartopy/19).
* Report bugs, suggest features or view the source code on [GitHub](https://github.com/SciTools/cartopy).
* To chat with developers and other users you can use the [Gitter Chat](https://gitter.im/SciTools/cartopy).
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Reference:
# - https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot
# - https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every weekday
interval: "daily"
labels:
- "🤖 Bot"
38 changes: 38 additions & 0 deletions .github/workflows/ci-manifest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Reference:
# - https://github.com/actions/checkout

name: ci-manifest

on:
pull_request:
branches:
- "*"

push:
branches-ignore:
- "dependabot/*"

workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
manifest:
name: "check-manifest"

runs-on: ubuntu-latest

defaults:
run:
shell: bash -l {0}

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: "check-manifest"
run: |
pipx run check-manifest
75 changes: 40 additions & 35 deletions .github/workflows/ci-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,73 +4,78 @@ on: [push, pull_request]

jobs:
build:
if: github.repository == 'scitools/cartopy'

runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.7, 3.8, 3.9]
defaults:
run:
shell: bash -l {0}
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.9, '3.10', '3.11']
shapely-dev: [false]
include:
- os: ubuntu-latest
python-version: '3.11'
shapely-dev: true

steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
activate-environment: test-environment
python-version: ${{ matrix.python-version }}
channels: conda-forge/label/testing,conda-forge
cache: 'pip'

- name: Minimum packages
# Only run on macos for now
# Conda's linux packages don't grab the testing label of matplotlib causing failures due to freetype differences
if: matrix.python-version == '3.7' && matrix.os == 'macos-latest'
if: matrix.python-version == '3.9' && matrix.os == 'ubuntu-latest'
id: minimum-packages
run: |
echo "PACKAGES=cython=0.28.5 matplotlib=3.1 numpy=1.18 owslib=0.17 pyproj=3.0 proj=8.0 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 pyproj pykdtree scipy" >> $GITHUB_ENV
pip install cython==0.29.24 matplotlib==3.4.3 numpy==1.21 owslib==0.24.1 pyproj==3.1 scipy==1.6.3 shapely==1.7.1
- name: Coverage packages
id: coverage
# only want the coverage to be run on the latest ubuntu
if: matrix.python-version == '3.9' && matrix.os == 'ubuntu-latest'
if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
run: |
echo "PACKAGES=$PACKAGES pytest-cov coveralls" >> $GITHUB_ENV
echo "CYTHON_COVERAGE=1" >> $GITHUB_ENV
echo "EXTRA_TEST_ARGS=--cov=cartopy -ra" >> $GITHUB_ENV
# Also add doctest here to avoid windows runners which expect a different path separator
echo "EXTRA_TEST_ARGS=--cov=cartopy -ra --doctest-modules" >> $GITHUB_ENV
pip install cython
- name: Install dependencies
- name: Install Shapely dev
if: matrix.shapely-dev
run: |
PACKAGES="$PACKAGES owslib pep8 pillow pyshp pytest pytest-mpl"
PACKAGES="$PACKAGES pytest-xdist requests setuptools_scm"
PACKAGES="$PACKAGES setuptools_scm_git_archive shapely"
conda install $PACKAGES
conda info -a
conda list
# Install Shapely from source on ubuntu
sudo apt-get update
sudo apt-get install -yy libgeos-dev
pip install git+https://github.com/shapely/shapely.git@main
- name: Install Cartopy
id: install
run: |
MPL_CONFIG_DIR=~/.config/matplotlib
mkdir -p $MPL_CONFIG_DIR
echo "backend : agg" > $MPL_CONFIG_DIR/matplotlibrc
pip install --no-deps -e .
pip install -e .[test]
python -c "import cartopy; print('Version ', cartopy.__version__)"
- name: Install extras
# Default is to install just the minimum testing requirements,
# but we want to get as much coverage as possible.
if: steps.minimum-packages.conclusion == 'skipped'
run: |
pip install .[ows,plotting,speedups]
- name: Testing
id: test
# we need to force bash to use line continuations on Windows
shell: bash
run: |
# 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
PYPROJ_GLOBAL_CONTEXT=ON pytest -ra -n 4 --doctest-modules \
pytest -ra -n 4 \
--color=yes \
--mpl --mpl-generate-summary=html \
--mpl-results-path="cartopy_test_output-${{ matrix.os }}-${{ matrix.python-version }}" \
--pyargs cartopy ${EXTRA_TEST_ARGS}
Expand All @@ -83,7 +88,7 @@ jobs:
coveralls --service=github

- name: Upload image results
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
if: failure()
with:
name: image-failures-${{ matrix.os }}-${{ matrix.python-version }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/circleci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ jobs:
uses: larsoner/circleci-artifacts-redirector-action@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
api-token: ${{ secrets.CIRCLECI_TOKEN }}
artifact-path: 0/docs/build/html/index.html
circleci-jobs: docs-python3
Loading

0 comments on commit dcc90b5

Please sign in to comment.