Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 34 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ jobs:
runner:
- macos-12
- ubuntu-22.04
- windows-2022
python:
- "3.8"
- "3.9"
Expand All @@ -76,6 +77,8 @@ jobs:
pip-cache-dir: ~/Library/Caches/pip
- runner: ubuntu-22.04
pip-cache-dir: ~/.cache/pip
- runner: windows-2022
pip-cache-dir: ~\AppData\Local\pip\Cache
exclude:
- runner: ubuntu-22.04
python: "3.10" # https://github.com/ContinuumIO/anaconda-issues/issues/13122
Expand Down Expand Up @@ -107,6 +110,7 @@ jobs:
run:
echo "GDAL_VERSION=$(poetry show gdal | tr -d ' ' | grep '^version:' |
cut -d ':' -f 2)" >> $GITHUB_ENV
shell: bash
working-directory: flooding/sentinel2_water_extraction

- name: Setup Conda
Expand All @@ -129,9 +133,38 @@ jobs:
conda install --channel=conda-forge --quiet --yes gdal=${{
env.GDAL_VERSION }} poetry

- name: Install Python packages
- name: Install Python packages on non-Windows runner
run: poetry install --only=main --no-root
working-directory: flooding/sentinel2_water_extraction
if: ${{ !startsWith(runner.os, 'Windows') }}

- name:
Reinstall Python 3.10 on Windows runner (Workaround from
https://github.com/nltk/nltk/issues/3027#issuecomment-1197689886)
uses: nick-fields/retry@v2.8.3
with:
timeout_minutes: 9999 # Workaround for https://github.com/nick-fields/retry/issues/107
max_attempts: 6
command:
conda install --channel=conda-forge --quiet --yes python=${{
matrix.python }}
if: ${{ startsWith(runner.os, 'Windows') && matrix.python == '3.10' }}

- name:
Install Python packages on Windows runner (Workaround for
https://github.com/python-poetry/poetry/issues/1031)
uses: nick-fields/retry@v2.8.3
with:
timeout_minutes: 9999 # Workaround for https://github.com/nick-fields/retry/issues/107
max_attempts: 6
command: cd flooding/sentinel2_water_extraction && poetry install
--only=main --no-root # Workaround for https://github.com/python-poetry/poetry/issues/7363 / https://github.com/nick-fields/retry/issues/89
shell: bash
if: ${{ startsWith(runner.os, 'Windows') }}

- name: Get Geopandas versions for debugging purposes
run: poetry run python -c 'import geopandas; geopandas.show_versions()'
working-directory: flooding/sentinel2_water_extraction

- name: Run test
run:
Expand Down
3 changes: 2 additions & 1 deletion flooding/sentinel2_water_extraction/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Below are the instructions to get the Notebook up and running

## Prerequisites

- Linux (tested on Ubuntu 22.04) or macOS (tested on version 12, Monterey)
- Linux (tested on Ubuntu 22.04), macOS (tested on version 12, Monterey), or
Windows (tested on Windows Server 2022)
- Python 3.8, 3.9, or 3.10
([except for Ubuntu](https://github.com/ContinuumIO/anaconda-issues/issues/13122))
- GDAL 3.4
Expand Down