Skip to content

Commit a935d2c

Browse files
Rendering at commit 5aac6eb
0 parents  commit a935d2c

File tree

91 files changed

+96904
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+96904
-0
lines changed

.dask/config.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
distributed:
2+
logging:
3+
bokeh: critical
4+
5+
dashboard:
6+
link: /user/{JUPYTERHUB_USER}/proxy/{port}/status
7+
8+
admin:
9+
tick:
10+
limit: 5s
11+
12+
kubernetes:
13+
worker-name: dask-{JUPYTERHUB_USER}-{uuid}
14+
worker-template:
15+
metadata:
16+
spec:
17+
restartPolicy: Never
18+
containers:
19+
- args:
20+
- dask-worker
21+
- --nthreads
22+
- '2'
23+
- --no-bokeh
24+
- --memory-limit
25+
- 7GB
26+
- --death-timeout
27+
- '60'
28+
image: ${JUPYTER_IMAGE_SPEC}
29+
name: dask-worker
30+
resources:
31+
limits:
32+
cpu: "1.75"
33+
memory: 7G
34+
requests:
35+
cpu: "1.75"
36+
memory: 7G

.github/workflows/main.yml

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
name: CI
2+
env:
3+
micromamba_version: 0.22.0
4+
5+
6+
on:
7+
push:
8+
branches: [ main ]
9+
pull_request:
10+
branches: [ main ]
11+
12+
workflow_dispatch:
13+
14+
15+
jobs:
16+
build_0:
17+
name: wradlib notebooks - linux
18+
runs-on: ubuntu-latest
19+
defaults:
20+
run:
21+
shell: bash -l {0}
22+
env:
23+
WRADLIB_DATA: ./wradlib-data
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
python-version: ["3.10"]
28+
steps:
29+
- name: Cancel Previous Runs
30+
uses: styfle/[email protected]
31+
with:
32+
access_token: ${{ github.token }}
33+
- uses: actions/checkout@v2
34+
with:
35+
fetch-depth: 0
36+
- name: Install micromamba environment
37+
uses: mamba-org/provision-with-micromamba@main
38+
with:
39+
environment-name: wradlib-notebooks
40+
environment-file: ci/requirements/notebooks.yml
41+
extra-specs: |
42+
python=${{ matrix.python-version }}
43+
- name: Install wradlib
44+
run: |
45+
git clone https://github.com/wradlib/wradlib.git
46+
cd wradlib
47+
echo "WRADLIB_TAG=`git name-rev --name-only --tags HEAD`" >> $GITHUB_ENV
48+
python setup.py sdist
49+
python -m pip install . --no-deps
50+
- name: Clone wradlib-data
51+
run: |
52+
git clone https://github.com/wradlib/wradlib-data.git
53+
- name: Version Info
54+
run: |
55+
python -c "import wradlib; print(wradlib.version.version)"
56+
python -c "import wradlib; print(wradlib.show_versions())"
57+
- name: Render with pytest
58+
env:
59+
WRADLIB_EARTHDATA_USER: ${{ secrets.WRADLIB_EARTHDATA_USER }}
60+
WRADLIB_EARTHDATA_PASS: ${{ secrets.WRADLIB_EARTHDATA_PASS }}
61+
run: |
62+
export WRADLIB_DATA=`realpath $WRADLIB_DATA`
63+
pytest -n auto --verbose --durations=15 --pyargs notebooks
64+
- name: Commit files
65+
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
66+
run: |
67+
git config --global user.email "[email protected]"
68+
git config --global user.name "wradlib-docs-bot"
69+
git checkout --orphan render
70+
git add --all .
71+
git commit -m "Rendering at commit $GITHUB_SHA"
72+
- name: Push changes
73+
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
74+
run: |
75+
if [ $WRADLIB_TAG == 'undefined' ]; then
76+
BRANCH=devel
77+
else
78+
BRANCH=$WRADLIB_TAG
79+
fi
80+
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/wradlib/wradlib-notebooks.git render:$BRANCH -fq
81+
82+
build_1:
83+
name: wradlib notebooks - macosx
84+
runs-on: macos-latest
85+
defaults:
86+
run:
87+
shell: bash -l {0}
88+
env:
89+
WRADLIB_DATA: ./wradlib-data
90+
strategy:
91+
fail-fast: false
92+
matrix:
93+
python-version: ["3.10"]
94+
steps:
95+
- name: Cancel Previous Runs
96+
uses: styfle/[email protected]
97+
with:
98+
access_token: ${{ github.token }}
99+
- uses: actions/checkout@v2
100+
with:
101+
fetch-depth: 0
102+
- name: Install micromamba environment
103+
uses: mamba-org/provision-with-micromamba@main
104+
with:
105+
environment-name: wradlib-notebooks
106+
environment-file: ci/requirements/notebooks.yml
107+
extra-specs: |
108+
python=${{ matrix.python-version }}
109+
- name: Install wradlib
110+
run: |
111+
git clone https://github.com/wradlib/wradlib.git
112+
cd wradlib
113+
echo "WRADLIB_TAG=`git name-rev --name-only --tags HEAD`" >> $GITHUB_ENV
114+
python setup.py sdist
115+
python -m pip install . --no-deps
116+
- name: Clone wradlib-data
117+
run: |
118+
git clone https://github.com/wradlib/wradlib-data.git
119+
- name: Version Info
120+
run: |
121+
python -c "import wradlib; print(wradlib.version.version)"
122+
python -c "import wradlib; print(wradlib.show_versions())"
123+
- name: Render with pytest
124+
env:
125+
WRADLIB_EARTHDATA_USER: ${{ secrets.WRADLIB_EARTHDATA_USER }}
126+
WRADLIB_EARTHDATA_PASS: ${{ secrets.WRADLIB_EARTHDATA_PASS }}
127+
run: |
128+
export WRADLIB_DATA=`python -c "import os, sys; print(os.path.realpath(sys.argv[1]))" $WRADLIB_DATA`
129+
pytest -n auto --verbose --doctest-modules --durations=15 --cov-report xml:coverage.xml --cov=wradlib --pyargs notebooks
130+
131+
build_2:
132+
name: wradlib notebooks - windows
133+
runs-on: windows-latest
134+
defaults:
135+
run:
136+
shell: bash -l {0}
137+
env:
138+
WRADLIB_DATA: ./wradlib-data
139+
strategy:
140+
fail-fast: false
141+
matrix:
142+
python-version: ["3.10"]
143+
steps:
144+
- name: Cancel Previous Runs
145+
uses: styfle/[email protected]
146+
with:
147+
access_token: ${{ github.token }}
148+
- uses: actions/checkout@v2
149+
with:
150+
fetch-depth: 0
151+
- name: Install micromamba environment
152+
uses: mamba-org/provision-with-micromamba@main
153+
with:
154+
environment-name: wradlib-notebooks
155+
environment-file: ci/requirements/notebooks.yml
156+
extra-specs: |
157+
python=${{ matrix.python-version }}
158+
- name: Install wradlib
159+
run: |
160+
git clone https://github.com/wradlib/wradlib.git
161+
cd wradlib
162+
python setup.py sdist
163+
python -m pip install . --no-deps
164+
- name: Clone wradlib-data
165+
run: |
166+
git clone https://github.com/wradlib/wradlib-data.git
167+
- name: Version Info
168+
run: |
169+
python -c "import wradlib; print(wradlib.version.version)"
170+
python -c "import wradlib; print(wradlib.show_versions())"
171+
- name: Test with pytest
172+
env:
173+
WRADLIB_EARTHDATA_USER: ${{ secrets.WRADLIB_EARTHDATA_USER }}
174+
WRADLIB_EARTHDATA_PASS: ${{ secrets.WRADLIB_EARTHDATA_PASS }}
175+
run: |
176+
export WRADLIB_DATA=`python -c "import os, sys; print(os.path.realpath(sys.argv[1]))" $WRADLIB_DATA`
177+
pytest -n auto --verbose --doctest-modules --durations=15 --cov-report xml:coverage.xml --cov=wradlib --pyargs notebooks
178+
179+
trigger_rtd:
180+
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
181+
needs: [build_0]
182+
name: trigger readthedocs
183+
runs-on: ubuntu-latest
184+
defaults:
185+
run:
186+
shell: bash -l {0}
187+
env:
188+
RTD_TOKEN: ${{ secrets.RTD_TOKEN }}
189+
RTD_URL: ${{ secrets.RTD_URL }}
190+
steps:
191+
- name: trigger readthedocs
192+
run: |
193+
curl -X POST -d "token=$RTD_TOKEN" "$RTD_URL"
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Render
2+
3+
on:
4+
workflow_dispatch:
5+
6+
7+
jobs:
8+
build_0:
9+
name: wradlib notebooks - linux
10+
runs-on: ubuntu-latest
11+
defaults:
12+
run:
13+
shell: bash -l {0}
14+
env:
15+
WRADLIB_DATA: ./wradlib-data
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
python-version: ["3.10"]
20+
steps:
21+
- name: Cancel Previous Runs
22+
uses: styfle/[email protected]
23+
with:
24+
access_token: ${{ github.token }}
25+
- uses: actions/checkout@v2
26+
with:
27+
fetch-depth: 0
28+
- name: Install micromamba environment
29+
uses: mamba-org/provision-with-micromamba@main
30+
with:
31+
environment-name: wradlib-notebooks
32+
environment-file: ci/requirements/notebooks.yml
33+
extra-specs: |
34+
python=${{ matrix.python-version }}
35+
- name: Install wradlib
36+
run: |
37+
git clone https://github.com/wradlib/wradlib.git
38+
cd wradlib
39+
echo "WRADLIB_TAG=`git name-rev --name-only --tags HEAD`" >> $GITHUB_ENV
40+
python setup.py sdist
41+
python -m pip install . --no-deps
42+
- name: Clone wradlib-data
43+
run: |
44+
git clone https://github.com/wradlib/wradlib-data.git
45+
- name: Version Info
46+
run: |
47+
python -c "import wradlib; print(wradlib.version.version)"
48+
python -c "import wradlib; print(wradlib.show_versions())"
49+
- name: Render with pytest
50+
env:
51+
WRADLIB_EARTHDATA_USER: ${{ secrets.WRADLIB_EARTHDATA_USER }}
52+
WRADLIB_EARTHDATA_PASS: ${{ secrets.WRADLIB_EARTHDATA_PASS }}
53+
run: |
54+
export WRADLIB_DATA=`realpath $WRADLIB_DATA`
55+
pytest -n auto --verbose --durations=15 --pyargs notebooks
56+
- name: Commit files
57+
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
58+
run: |
59+
git config --global user.email "[email protected]"
60+
git config --global user.name "wradlib-docs-bot"
61+
git checkout --orphan render
62+
git add --all .
63+
git commit -m "Rendering at commit $GITHUB_SHA"
64+
- name: Push changes
65+
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
66+
run: |
67+
if [ $WRADLIB_TAG == 'undefined' ]; then
68+
BRANCH=devel
69+
else
70+
BRANCH=$WRADLIB_TAG
71+
fi
72+
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/wradlib/wradlib-notebooks.git render:$BRANCH -fq
73+
74+
trigger_rtd:
75+
if: github.event_name == 'workflow_dispatch'
76+
needs: [build_0]
77+
name: trigger readthedocs
78+
runs-on: ubuntu-latest
79+
defaults:
80+
run:
81+
shell: bash -l {0}
82+
env:
83+
RTD_TOKEN: ${{ secrets.RTD_TOKEN }}
84+
RTD_URL: ${{ secrets.RTD_URL }}
85+
steps:
86+
- name: trigger readthedocs
87+
run: |
88+
curl -X POST -d "token=$RTD_TOKEN" "$RTD_URL"

.gitignore

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Ignore everything
2+
*
3+
4+
# whitelist notebooks, png and shell
5+
!*.ipynb
6+
!*.png
7+
!*.sh
8+
9+
# whitelist scripts
10+
!scripts/
11+
!/scripts/*
12+
13+
# whitelist notebooks
14+
!notebooks/
15+
#!/notebooks/**
16+
17+
# whitelist .dask
18+
!.dask/
19+
!/.dask/*
20+
21+
# whitelist ci
22+
!ci/
23+
24+
# whitelist binder
25+
!binder/
26+
!/binder/*
27+
28+
# Whitelist root files
29+
!.gitignore
30+
!conftest.py
31+
!README.md
32+
!LICENSE.txt
33+
!Welcome_Pangeo.md
34+
35+
# blacklist standard notebook copies
36+
*-Copy*.ipynb
37+
38+
# blacklist checkpoints
39+
*checkpoint*

LICENSE.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016-2021 wradlib developers
4+
5+
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:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
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.

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# README #
2+
3+
## wradlib-notebooks ##
4+
5+
This repository consists of jupyter notebooks to give examples of wradlib usage and help users via tutorials.
6+
7+
- [An incomplete introduction to python](notebooks/learnpython.ipynb)
8+
- [Getting started with wradlib](notebooks/basics.ipynb)
9+
- [Data Input - Data Output](notebooks/fileio.ipynb)
10+
- [Attenuation correction](notebooks/attenuation/wradlib_attenuation.ipynb)
11+
- [Beam Blockage Calculation using DEM](notebooks/beamblockage/wradlib_beamblock.ipynb)
12+
- [Clutter and Echo Classification](notebooks/classify.ipynb)
13+
- [Georeferencing](notebooks/georeferencing.ipynb)
14+
- [Match spaceborn SR (GPM/TRRM) with ground radars GR](notebooks/match3d/wradlib_match_workflow.ipynb)
15+
- [Data Interpolation](notebooks/interpolation/wradlib_ipol_example.ipynb)
16+
- [Adjusting rainfall estimates by rain gauges](notebooks/multisensor/wradlib_adjust_example.ipynb)
17+
- [Verification for precipitation estimates](notebooks/verification/wradlib_verify_example.ipynb)
18+
- [Recipes](notebooks/recipes.ipynb)
19+
- [RADOLAN Composite](notebooks/radolan.ipynb)
20+
- [Zonal Statistics](notebooks/zonalstats/wradlib_zonalstats_classes.ipynb)

0 commit comments

Comments
 (0)