Skip to content

MNT: do not use wetterdienst, revert to plain html download, use bearer token #142

MNT: do not use wetterdienst, revert to plain html download, use bearer token

MNT: do not use wetterdienst, revert to plain html download, use bearer token #142

Workflow file for this run

name: CI
env:
micromamba_version: 1.5
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_0:
name: wradlib notebooks - linux
runs-on: ubuntu-20.04
defaults:
run:
shell: bash -l {0}
env:
WRADLIB_DATA: ./wradlib-data
CONDA_ENV_FILE: ci/requirements/notebooks.yml
strategy:
fail-fast: false
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install micromamba environment
uses: mamba-org/setup-micromamba@v1
with:
environment-name: wradlib-notebooks
environment-file: ${{env.CONDA_ENV_FILE}}
cache-environment: true
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
create-args: >-
python=${{matrix.python-version}}
- name: Install wradlib
run: |
git clone https://github.com/wradlib/wradlib.git
cd wradlib
echo "WRADLIB_TAG=`git name-rev --name-only --tags HEAD`" >> $GITHUB_ENV
python -m pip install . --no-deps
- name: Install wradlib-data
run: |
python -m pip install git+https://github.com/wradlib/wradlib-data@pooch
mkdir ./wradlib-data
- name: Version Info
run: |
python -c "import wradlib; print(wradlib.version.version)"
python -c "import wradlib; print(wradlib.show_versions())"
- name: Render with pytest
env:
WRADLIB_EARTHDATA_BEARER_TOKEN: ${{ secrets.WRADLIB_EARTHDATA_BEARER_TOKEN }}
run: |
export WRADLIB_DATA=`realpath $WRADLIB_DATA`
pytest -n auto --verbose --durations=15 --pyargs notebooks
- name: Commit files
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
run: |
git config --global user.email "[email protected]"
git config --global user.name "wradlib-docs-bot"
git checkout --orphan render
git add --all .
git commit -m "Rendering at commit $GITHUB_SHA"
- name: Push changes
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
run: |
if [ $WRADLIB_TAG == 'undefined' ]; then
BRANCH=devel
else
BRANCH=$WRADLIB_TAG
fi
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/wradlib/wradlib-notebooks.git render:$BRANCH -fq
build_1:
name: wradlib notebooks - macosx
runs-on: macos-latest
defaults:
run:
shell: bash -l {0}
env:
WRADLIB_DATA: ./wradlib-data
CONDA_ENV_FILE: ci/requirements/notebooks.yml
strategy:
fail-fast: false
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install micromamba environment
uses: mamba-org/setup-micromamba@v1
with:
environment-name: wradlib-notebooks
environment-file: ${{env.CONDA_ENV_FILE}}
cache-environment: true
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
create-args: >-
python=${{matrix.python-version}}
- name: Install wradlib
run: |
git clone https://github.com/wradlib/wradlib.git
cd wradlib
echo "WRADLIB_TAG=`git name-rev --name-only --tags HEAD`" >> $GITHUB_ENV
python -m pip install . --no-deps
- name: Install wradlib-data
run: |
python -m pip install git+https://github.com/wradlib/wradlib-data@pooch
mkdir ./wradlib-data
- name: Version Info
run: |
python -c "import wradlib; print(wradlib.version.version)"
python -c "import wradlib; print(wradlib.show_versions())"
- name: Render with pytest
env:
WRADLIB_EARTHDATA_BEARER_TOKEN: ${{ secrets.WRADLIB_EARTHDATA_BEARER_TOKEN }}
run: |
export WRADLIB_DATA=`python -c "import os, sys; print(os.path.realpath(sys.argv[1]))" $WRADLIB_DATA`
pytest -n auto --verbose --durations=15 --pyargs notebooks
build_2:
name: wradlib notebooks - windows
runs-on: windows-latest
defaults:
run:
shell: bash -l {0}
env:
WRADLIB_DATA: ./wradlib-data
CONDA_ENV_FILE: ci/requirements/notebooks.yml
strategy:
fail-fast: false
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install micromamba environment
uses: mamba-org/setup-micromamba@v1
with:
environment-name: wradlib-notebooks
environment-file: ${{env.CONDA_ENV_FILE}}
cache-environment: true
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}"
create-args: >-
python=${{matrix.python-version}}
- name: Install wradlib
run: |
git clone https://github.com/wradlib/wradlib.git
cd wradlib
python -m pip install . --no-deps
- name: Install wradlib-data
run: |
python -m pip install git+https://github.com/wradlib/wradlib-data@pooch
mkdir ./wradlib-data
- name: Version Info
run: |
python -c "import wradlib; print(wradlib.version.version)"
python -c "import wradlib; print(wradlib.show_versions())"
- name: Test with pytest
env:
WRADLIB_EARTHDATA_BEARER_TOKEN: ${{ secrets.WRADLIB_EARTHDATA_BEARER_TOKEN }}
run: |
export WRADLIB_DATA=`python -c "import os, sys; print(os.path.realpath(sys.argv[1]))" $WRADLIB_DATA`
pytest -n auto --verbose --durations=15 --pyargs notebooks
trigger_rtd:
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
needs: [build_0]
name: trigger readthedocs
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
env:
RTD_TOKEN: ${{ secrets.RTD_TOKEN }}
RTD_URL: ${{ secrets.RTD_URL }}
steps:
- name: trigger readthedocs
run: |
echo "triggering"
curl -X POST -H "Authorization: Token $RTD_TOKEN" "$RTD_URL"