Skip to content

Commit

Permalink
Merge branch 'master' into gt/make-dd-work-for-non-raster
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastien-lenard committed Sep 1, 2022
2 parents f96a696 + 2db9ebb commit ad2c26a
Show file tree
Hide file tree
Showing 395 changed files with 40,396 additions and 5,609 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ jobs:
- uses: actions/setup-python@v2
- uses: psf/black@stable
with:
args: ". --check"
options: "--check --verbose --diff"
src: "setup.py landlab tests"
26 changes: 26 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Check

on:
pull_request:
types: [labeled, unlabeled, opened, reopened, synchronize]

jobs:
check-changelog-entry:
name: changelog entry
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
# `towncrier check` runs `git diff --name-only origin/main...`, which
# needs a non-shallow clone.
fetch-depth: 0

- name: Check changelog
if: "!contains(github.event.pull_request.labels.*.name, 'Skip Changelog')"
run: |
if ! pipx run towncrier check --compare-with origin/${{ github.base_ref }}; then
echo "Please see https://landlab.readthedocs.io/en/master/development/contribution/index.html?highlight=towncrier#news-entries for guidance."
false
fi
27 changes: 3 additions & 24 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
name: Documentation

on:
push:
paths:
- "docs/**"
- "AUTHORS.rst"
- "CHANGES.rst"
- "CONTRIBUTING.rst"
- "LICENSE.rst"
- "README.rst"
pull_request:
paths:
- "docs/**"
- "AUTHORS.rst"
- "CHANGES.rst"
- "CONTRIBUTING.rst"
- "LICENSE.rst"
- "README.rst"
on: [push, pull_request]

jobs:
build:
Expand Down Expand Up @@ -46,14 +30,9 @@ jobs:
- name: Show conda installation info
run: |
conda info
conda list
- name: Install dependencies
run: |
conda install mamba
mamba install --file=requirements.txt
pip install -r requirements-docs.txt
pip install -e .
run: pip install nox

- name: Build documentation
run: make -C docs clean html
run: nox -s docs
4 changes: 2 additions & 2 deletions .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ jobs:

- name: Lint
run: |
pip install flake8
flake8 landlab tests
pip install nox
nox -s lint
62 changes: 28 additions & 34 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: TestPyPI
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+[ab][0-9]*
- 'v[0-9]+.[0-9]+.[0-9]+[ab][0-9]+'

env:
TWINE_USERNAME: __token__
Expand All @@ -20,22 +20,14 @@ jobs:
shell: bash -l {0}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.7, 3.8, 3.9]
include:
- os: ubuntu-latest
platform: manylinux
python_versions: 'cp37-cp37m cp38-cp38 cp39-cp39'
- os: macos-latest
platform: macosx
- os: windows-latest
platform: win
exclude:
- os: ubuntu-latest
python-version: 3.7
- os: ubuntu-latest
python-version: 3.9
env:
CIBW_BUILD: 'cp38-* cp39-* cp310-*'
CIBW_SKIP: '*-musllinux_*'
CIBW_ARCHS_MACOS: "x86_64 arm64"
CIBW_ARCHS_LINUX: "auto aarch64"

steps:
- uses: actions/checkout@v2
Expand All @@ -47,33 +39,35 @@ jobs:
channels: conda-forge
channel-priority: true

- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v1
with:
platforms: all

- name: Install cibuildwheel
run: |
conda install pip
python --version
pip --version
python -m pip install cibuildwheel==2.3.0 twine
- name: Show conda installation info
run: |
conda info
conda list
- name: Install build environment
run: pip install twine wheel numpy cython

- name: Build macosx/win Python wheels
if: matrix.os == 'macos-latest' || matrix.os == 'windows-latest'
run: |
conda install mamba
mamba install --file=requirements.txt
python setup.py bdist_wheel
- name: Build source distribution
if: matrix.os == 'ubuntu-latest'
run: |
python setup.py sdist
twine upload --skip-existing dist/*.tar.gz
pip install numpy
python setup.py sdist --dist-dir wheelhouse
twine upload --skip-existing wheelhouse/*.tar.gz
- name: Build manylinux Python wheels
if: matrix.os == 'ubuntu-latest'
uses: RalfG/python-wheels-manylinux-build@v0.3.3-manylinux2010_x86_64
with:
python-versions: ${{ matrix.python_versions }}
build-requirements: 'cython numpy'
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse

- name: Upload distributions
run: twine upload --skip-existing dist/*-${{ matrix.platform }}*.whl
run: |
twine upload --skip-existing wheelhouse/*.whl
64 changes: 29 additions & 35 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: PyPI
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
- '!*[ab][0-9]*'
- 'v[0-9]+.[0-9]+.[0-9]+'
- '!v[0-9]+.[0-9]+.[0-9]+[ab][0-9]+'


env:
Expand All @@ -21,22 +21,15 @@ jobs:
shell: bash -l {0}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.7, 3.8, 3.9]
include:
- os: ubuntu-latest
platform: manylinux
python_versions: 'cp37-cp37m cp38-cp38 cp39-cp39'
- os: macos-latest
platform: macosx
- os: windows-latest
platform: win
exclude:
- os: ubuntu-latest
python-version: 3.7
- os: ubuntu-latest
python-version: 3.9

env:
CIBW_BUILD: 'cp38-* cp39-* cp310-*'
CIBW_SKIP: '*-musllinux_*'
CIBW_ARCHS_MACOS: "x86_64 arm64"
CIBW_ARCHS_LINUX: "auto aarch64"

steps:
- uses: actions/checkout@v2
Expand All @@ -48,33 +41,34 @@ jobs:
channels: conda-forge
channel-priority: true

- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v1
with:
platforms: all

- name: Install cibuildwheel
run: |
conda install pip
python --version
pip --version
python -m pip install cibuildwheel==2.3.0 twine
- name: Show conda installation info
run: |
conda info
conda list
- name: Install build environment
run: pip install twine wheel numpy cython

- name: Build macosx/win Python wheels
if: matrix.os == 'macos-latest' || matrix.os == 'windows-latest'
run: |
conda install mamba
mamba install --file=requirements.txt
python setup.py bdist_wheel
- name: Build source distribution
if: matrix.os == 'ubuntu-latest'
run: |
python setup.py sdist
twine upload --skip-existing dist/*.tar.gz
pip install numpy
python setup.py sdist --dist-dir wheelhouse
twine upload --skip-existing wheelhouse/*.tar.gz
- name: Build manylinux Python wheels
if: matrix.os == 'ubuntu-latest'
uses: RalfG/python-wheels-manylinux-build@v0.3.3-manylinux2010_x86_64
with:
python-versions: ${{ matrix.python_versions }}
build-requirements: 'cython numpy'
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse

- name: Upload distributions
run: twine upload --skip-existing dist/*-${{ matrix.platform }}*.whl
run: |
twine upload --skip-existing wheelhouse/*.whl
37 changes: 29 additions & 8 deletions .github/workflows/test-notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ name: Notebooks

on: [push, pull_request]

# on:
# push:
# paths:
# - "landlab/**"
# - "notebooks/**"
# pull_request:
# paths:
# - "landlab/**"
# - "notebooks/**"

jobs:
build-and-test:
name: Check notebooks
Expand All @@ -21,7 +31,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.7, 3.8, 3.9]
python-version: ["3.9"]

steps:
- uses: actions/checkout@v2
Expand All @@ -35,24 +45,35 @@ jobs:

- name: Show conda installation info
run: |
conda install mamba
conda info
conda list
- name: Install requirements
- name: Install richdem requirements
run: |
conda install mamba
mamba install --file=requirements.txt
mamba install richdem -c conda-forge
mamba list
- name: Install testing requirements
run: |
mamba install click pytest pytest-xdist pyyaml -c conda-forge
mamba list
- name: Install notebook requirements
run: |
mamba install --file=requirements-notebooks.txt -c conda-forge
mamba list
- name: Build and install package
run: |
pip install -e .
- name: Install testing dependencies
run: mamba install --file=requirements-testing.txt -c conda-forge
- name: Test jupyter notebooks are clean
run: python notebooks/run_notebook_checks.py notebooks

- name: Test jupyter notebooks
env:
OPENTOPOGRAPHY_API_KEY: ${{ secrets.OPENTOPOGRAPHY_API_KEY }}
run: |
python -c 'import landlab; print(landlab.__version__)'
pip install -r requirements-notebooks.txt
pytest notebooks --run-notebook -vvv
pytest notebooks --run-notebook -n auto -vvv
26 changes: 19 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ name: Test

on: [push, pull_request]

# on:
# push:
# paths:
# - "landlab/**"
# - "tests/**"
# pull_request:
# paths:
# - "landlab/**"
# - "tests/**"

jobs:
build-and-test:
name: Run the tests
Expand All @@ -21,7 +31,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.7, 3.8, 3.9]
python-version: ["3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
Expand All @@ -38,23 +48,25 @@ jobs:
conda info
conda list
- name: Install requirements
- name: Install and test richdem engine
run: |
conda install mamba
mamba install --file=requirements.txt
mamba list
mamba install richdem -c conda-forge
python -c 'import _richdem'
- name: Build and install package
run: |
pip install -e .
- name: Install testing dependencies
run: mamba install --file=requirements-testing.txt
- name: Install testing requirements
run: pip install -e .[testing]

- name: Test
env:
HYPOTHESIS_PROFILE: "ci"
run: |
python -c 'import landlab; print(landlab.__version__)'
pytest --cov=landlab --cov-report=xml:$(pwd)/coverage.xml -vvv
pytest --cov=landlab --cov-report=xml:$(pwd)/coverage.xml -vvv -n auto
- name: Coveralls
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9'
Expand Down

0 comments on commit ad2c26a

Please sign in to comment.