-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rendering at wradlib-notebooks commit 7ab8658 for wradlib version
- Loading branch information
0 parents
commit ef1f962
Showing
79 changed files
with
263,780 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
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.11"] | ||
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 | ||
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 "wradlib-docs@wradlib.org" | ||
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.11"] | ||
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 | ||
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.11"] | ||
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 | ||
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 -d "token=$RTD_TOKEN" "$RTD_URL" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
name: Render | ||
env: | ||
micromamba_version: 1.5 | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build_0: | ||
name: wradlib notebooks - linux | ||
runs-on: ubuntu-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.11"] | ||
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 | ||
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 "wradlib-docs@wradlib.org" | ||
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 | ||
trigger_rtd: | ||
if: 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 -d "token=$RTD_TOKEN" "$RTD_URL" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Ignore everything | ||
* | ||
|
||
# whitelist notebooks, png and shell | ||
!*.ipynb | ||
!*.png | ||
!*.sh | ||
|
||
# whitelist scripts | ||
!scripts/ | ||
!/scripts/* | ||
|
||
# whitelist notebooks | ||
!notebooks/ | ||
#!/notebooks/** | ||
|
||
# whitelist .dask | ||
!.dask/ | ||
!/.dask/* | ||
|
||
# whitelist ci | ||
!ci/ | ||
|
||
# whitelist binder | ||
!binder/ | ||
!/binder/* | ||
|
||
# Whitelist root files | ||
!.gitignore | ||
!conftest.py | ||
!README.md | ||
!LICENSE.txt | ||
!Welcome_Pangeo.md | ||
|
||
# blacklist standard notebook copies | ||
*-Copy*.ipynb | ||
|
||
# blacklist checkpoints | ||
*checkpoint* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-docstring-first | ||
- id: check-json | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: mixed-line-ending | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.3.1 | ||
hooks: | ||
- id: pyupgrade | ||
args: | ||
- '--py38-plus' | ||
- repo: https://github.com/kynan/nbstripout | ||
rev: 0.6.1 | ||
hooks: | ||
- id: nbstripout | ||
args: ['--extra-keys', 'metadata.kernelspec cell.metadata.pycharm cell.metadata.tags'] | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: 'v0.0.254' | ||
hooks: | ||
- id: ruff | ||
args: [ "--fix" ] | ||
- repo: https://github.com/psf/black | ||
rev: 23.1.0 | ||
hooks: | ||
- id: black | ||
- id: black-jupyter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2016-2021 wradlib developers | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# README # | ||
|
||
## wradlib-notebooks ## | ||
|
||
This repository consists of jupyter notebooks to give examples of wradlib usage and help users via tutorials. | ||
|
||
Rendered versions are available in the tagged branches. In [devel-branch](https://github.com/wradlib/wradlib-notebooks/tree/devel) the most recent rendered snapshot comprising the latest changes in this repo as well as [wradlib](https://github.com/wradlib/wradlib) can be found. The notebooks are also rendered in the [wradlib documentation](https://docs.wradlib.org/en/latest/). | ||
|
||
- [An incomplete introduction to python](notebooks/python/learnpython.ipynb) | ||
- [Getting started with wradlib](notebooks/basics/basics.ipynb) | ||
- [Data Input - Data Output](notebooks/fileio.ipynb) | ||
- [Attenuation correction](notebooks/attenuation/wradlib_attenuation.ipynb) | ||
- [Beam Blockage Calculation using DEM](notebooks/beamblockage/wradlib_beamblock.ipynb) | ||
- [Clutter and Echo Classification](notebooks/classify.ipynb) | ||
- [Georeferencing](notebooks/georeferencing.ipynb) | ||
- [Match spaceborn SR (GPM/TRRM) with ground radars GR](notebooks/match3d/wradlib_match_workflow.ipynb) | ||
- [Data Interpolation](notebooks/interpolation/wradlib_ipol_example.ipynb) | ||
- [Adjusting rainfall estimates by rain gauges](notebooks/multisensor/wradlib_adjust_example.ipynb) | ||
- [Verification for precipitation estimates](notebooks/verification/wradlib_verify_example.ipynb) | ||
- [Recipes](notebooks/recipes.ipynb) | ||
- [RADOLAN Composite](notebooks/fileio/radolan.ipynb) | ||
- [Zonal Statistics](notebooks/zonalstats/wradlib_zonalstats_classes.ipynb) |
Oops, something went wrong.