Skip to content

Commit 4fe3184

Browse files
Rendering at commit cad184a
0 parents  commit 4fe3184

File tree

84 files changed

+67792
-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.

84 files changed

+67792
-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: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,219 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
workflow_dispatch:
10+
11+
jobs:
12+
build_0:
13+
name: wradlib notebooks - linux
14+
runs-on: ubuntu-latest
15+
defaults:
16+
run:
17+
shell: bash -l {0}
18+
env:
19+
WRADLIB_DATA: ./wradlib-data
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
python-version: ["3.9"]
24+
steps:
25+
- name: Cancel Previous Runs
26+
uses: styfle/[email protected]
27+
with:
28+
access_token: ${{ github.token }}
29+
- uses: actions/checkout@v2
30+
with:
31+
fetch-depth: 0
32+
- name: install micromamba
33+
run: |
34+
wget -qO- https://micromamba.snakepit.net/api/micromamba/linux-64/latest | tar -xvj bin/micromamba --strip-components=1
35+
mv "$HOME/.bashrc" .bashrcBAK
36+
touch "$HOME/.bashrc"
37+
./micromamba shell init -s bash -p ~/micromamba
38+
cat "$HOME/.bashrc" >> "$HOME/.bash_profile"
39+
mv .bashrcBAK "$HOME/.bashrc"
40+
- name: Install deps
41+
run: |
42+
micromamba create -y -n wradlib-tests python=${{ matrix.python-version }} -f ci/requirements/notebooks.txt --channel conda-forge
43+
echo "set -eo pipefail" >> "$HOME/.bash_profile"
44+
echo "micromamba activate wradlib-tests" >> "$HOME/.bash_profile"
45+
- name: Install wradlib
46+
run: |
47+
git clone https://github.com/wradlib/wradlib.git
48+
cd wradlib
49+
echo "WRADLIB_TAG=`git name-rev --name-only --tags HEAD`" >> $GITHUB_ENV
50+
python setup.py sdist
51+
python -m pip install . --no-deps
52+
- name: Clone wradlib-data
53+
run: |
54+
git clone https://github.com/wradlib/wradlib-data.git
55+
- name: Version Info
56+
run: |
57+
micromamba list
58+
python -c "import wradlib; print(wradlib.version.full_version)"
59+
python -c "import wradlib; print(wradlib.show_versions())"
60+
- name: Render with pytest
61+
env:
62+
WRADLIB_EARTHDATA_USER: ${{ secrets.WRADLIB_EARTHDATA_USER }}
63+
WRADLIB_EARTHDATA_PASS: ${{ secrets.WRADLIB_EARTHDATA_PASS }}
64+
run: |
65+
export WRADLIB_DATA=`realpath $WRADLIB_DATA`
66+
pytest -n auto --verbose --durations=15 --pyargs notebooks
67+
- name: Commit files
68+
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
69+
run: |
70+
git config --global user.email "[email protected]"
71+
git config --global user.name "wradlib-docs-bot"
72+
git checkout --orphan render
73+
git add --all .
74+
git commit -m "Rendering at commit $GITHUB_SHA"
75+
- name: Push changes
76+
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
77+
run: |
78+
if [ $WRADLIB_TAG == 'undefined' ]; then
79+
BRANCH=devel
80+
else
81+
BRANCH=$WRADLIB_TAG
82+
fi
83+
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/wradlib/wradlib-notebooks.git render:$BRANCH -fq
84+
85+
build_1:
86+
name: wradlib notebooks - macosx
87+
runs-on: macos-latest
88+
defaults:
89+
run:
90+
shell: bash -l {0}
91+
env:
92+
WRADLIB_DATA: ./wradlib-data
93+
strategy:
94+
fail-fast: false
95+
matrix:
96+
python-version: ["3.9"]
97+
steps:
98+
- name: Cancel Previous Runs
99+
uses: styfle/[email protected]
100+
with:
101+
access_token: ${{ github.token }}
102+
- uses: actions/checkout@v2
103+
with:
104+
fetch-depth: 0
105+
- name: install micromamba
106+
run: |
107+
curl -Ls https://micromamba.snakepit.net/api/micromamba/osx-64/latest | tar -xvj bin/micromamba
108+
mv bin/micromamba .
109+
mv "$HOME/.bashrc" .bashrcBAK
110+
touch "$HOME/.bashrc"
111+
./micromamba shell init -s bash -p ~/micromamba
112+
cat "$HOME/.bashrc" >> "$HOME/.bash_profile"
113+
mv .bashrcBAK "$HOME/.bashrc"
114+
- name: Install deps
115+
run: |
116+
micromamba create -y -n wradlib-tests python=${{ matrix.python-version }} -f ci/requirements/notebooks.txt --channel conda-forge
117+
echo "set -eo pipefail" >> "$HOME/.bash_profile"
118+
echo "micromamba activate wradlib-tests" >> "$HOME/.bash_profile"
119+
- name: Install wradlib
120+
run: |
121+
git clone https://github.com/wradlib/wradlib.git
122+
cd wradlib
123+
echo "WRADLIB_TAG=`git name-rev --name-only --tags HEAD`" >> $GITHUB_ENV
124+
python setup.py sdist
125+
python -m pip install . --no-deps
126+
- name: Clone wradlib-data
127+
run: |
128+
git clone https://github.com/wradlib/wradlib-data.git
129+
- name: Version Info
130+
run: |
131+
micromamba list
132+
python -c "import wradlib; print(wradlib.version.full_version)"
133+
python -c "import wradlib; print(wradlib.show_versions())"
134+
- name: Render with pytest
135+
env:
136+
WRADLIB_EARTHDATA_USER: ${{ secrets.WRADLIB_EARTHDATA_USER }}
137+
WRADLIB_EARTHDATA_PASS: ${{ secrets.WRADLIB_EARTHDATA_PASS }}
138+
run: |
139+
export WRADLIB_DATA=`python -c "import os, sys; print(os.path.realpath(sys.argv[1]))" $WRADLIB_DATA`
140+
pytest -n auto --verbose --doctest-modules --durations=15 --cov-report xml:coverage.xml --cov=wradlib --pyargs notebooks
141+
142+
build_2:
143+
name: wradlib notebooks - windows
144+
runs-on: windows-latest
145+
defaults:
146+
run:
147+
shell: bash
148+
env:
149+
WRADLIB_DATA: ./wradlib-data
150+
strategy:
151+
fail-fast: false
152+
matrix:
153+
python-version: ["3.9"]
154+
steps:
155+
- name: Cancel Previous Runs
156+
uses: styfle/[email protected]
157+
with:
158+
access_token: ${{ github.token }}
159+
- uses: actions/checkout@v2
160+
with:
161+
fetch-depth: 0
162+
- name: install micromamba
163+
run: |
164+
Invoke-Webrequest -URI https://micromamba.snakepit.net/api/micromamba/win-64/latest -OutFile micromamba.tar.bz2
165+
C:\PROGRA~1\7-Zip\7z.exe x micromamba.tar.bz2 -aoa
166+
C:\PROGRA~1\7-Zip\7z.exe x micromamba.tar -ttar -aoa -r Library\bin\micromamba.exe
167+
MOVE -Force Library\bin\micromamba.exe micromamba.exe
168+
.\micromamba.exe shell init -s powershell -p $HOME/micromamba
169+
shell: powershell
170+
- name: Install deps
171+
run: |
172+
$Env:MAMBA_ROOT_PREFIX=(Join-Path -Path $HOME -ChildPath micromamba)
173+
$Env:MAMBA_EXE=(Join-Path -Path (Get-Location) -ChildPath micromamba.exe)
174+
.\micromamba.exe create -y -n wradlib-tests python=${{ matrix.python-version }} -f ci/requirements/notebooks.txt --channel conda-forge
175+
shell: powershell
176+
- name: Install wradlib
177+
run: |
178+
eval "$(./micromamba shell hook -s bash)"
179+
git clone https://github.com/wradlib/wradlib.git
180+
cd wradlib
181+
echo "WRADLIB_TAG=`git name-rev --name-only --tags HEAD`" >> $GITHUB_ENV
182+
micromamba activate wradlib-tests
183+
python setup.py sdist
184+
python -m pip install . --no-deps
185+
- name: Clone wradlib-data
186+
run: |
187+
git clone https://github.com/wradlib/wradlib-data.git
188+
- name: Version Info
189+
run: |
190+
eval "$(./micromamba shell hook -s bash)"
191+
micromamba activate wradlib-tests
192+
micromamba list
193+
python -c "import wradlib; print(wradlib.version.full_version)"
194+
python -c "import wradlib; print(wradlib.show_versions())"
195+
- name: Test with pytest
196+
env:
197+
WRADLIB_EARTHDATA_USER: ${{ secrets.WRADLIB_EARTHDATA_USER }}
198+
WRADLIB_EARTHDATA_PASS: ${{ secrets.WRADLIB_EARTHDATA_PASS }}
199+
run: |
200+
eval "$(./micromamba shell hook -s bash)"
201+
micromamba activate wradlib-tests
202+
export WRADLIB_DATA=`python -c "import os, sys; print(os.path.realpath(sys.argv[1]))" $WRADLIB_DATA`
203+
pytest -n auto --verbose --doctest-modules --durations=15 --cov-report xml:coverage.xml --cov=wradlib --pyargs notebooks
204+
205+
trigger_rtd:
206+
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
207+
needs: [build_0]
208+
name: trigger readthedocs
209+
runs-on: ubuntu-latest
210+
defaults:
211+
run:
212+
shell: bash -l {0}
213+
env:
214+
RTD_TOKEN: ${{ secrets.RTD_TOKEN }}
215+
RTD_URL: ${{ secrets.RTD_URL }}
216+
steps:
217+
- name: trigger readthedocs
218+
run: |
219+
curl -X POST -d "token=$RTD_TOKEN" "$RTD_URL"
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
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.9"]
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
29+
run: |
30+
wget -qO- https://micromamba.snakepit.net/api/micromamba/linux-64/latest | tar -xvj bin/micromamba --strip-components=1
31+
mv "$HOME/.bashrc" .bashrcBAK
32+
touch "$HOME/.bashrc"
33+
./micromamba shell init -s bash -p ~/micromamba
34+
cat "$HOME/.bashrc" >> "$HOME/.bash_profile"
35+
mv .bashrcBAK "$HOME/.bashrc"
36+
- name: Install deps
37+
run: |
38+
micromamba create -y -n wradlib-tests python=${{ matrix.python-version }} -f ci/requirements/notebooks.txt --channel conda-forge
39+
echo "set -eo pipefail" >> "$HOME/.bash_profile"
40+
echo "micromamba activate wradlib-tests" >> "$HOME/.bash_profile"
41+
- name: Install wradlib
42+
run: |
43+
git clone https://github.com/wradlib/wradlib.git
44+
cd wradlib
45+
echo "WRADLIB_TAG=`git name-rev --name-only --tags HEAD`" >> $GITHUB_ENV
46+
python setup.py sdist
47+
python -m pip install . --no-deps
48+
- name: Clone wradlib-data
49+
run: |
50+
git clone https://github.com/wradlib/wradlib-data.git
51+
- name: Version Info
52+
run: |
53+
micromamba list
54+
python -c "import wradlib; print(wradlib.version.full_version)"
55+
python -c "import wradlib; print(wradlib.show_versions())"
56+
- name: Render with pytest
57+
env:
58+
WRADLIB_EARTHDATA_USER: ${{ secrets.WRADLIB_EARTHDATA_USER }}
59+
WRADLIB_EARTHDATA_PASS: ${{ secrets.WRADLIB_EARTHDATA_PASS }}
60+
run: |
61+
export WRADLIB_DATA=`realpath $WRADLIB_DATA`
62+
pytest -n auto --verbose --durations=15 --pyargs notebooks
63+
- name: Commit files
64+
if: github.event_name == 'workflow_dispatch'
65+
run: |
66+
git config --global user.email "[email protected]"
67+
git config --global user.name "wradlib-docs-bot"
68+
git checkout --orphan render
69+
git add --all .
70+
git commit -m "Rendering at commit $GITHUB_SHA"
71+
- name: Push changes
72+
if: github.event_name == 'workflow_dispatch'
73+
run: |
74+
if [ $WRADLIB_TAG == 'undefined' ]; then
75+
BRANCH=devel
76+
else
77+
BRANCH=$WRADLIB_TAG
78+
fi
79+
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/wradlib/wradlib-notebooks.git render:$BRANCH -fq
80+
81+
trigger_rtd:
82+
if: github.event_name == 'workflow_dispatch'
83+
needs: [build_0]
84+
name: trigger readthedocs
85+
runs-on: ubuntu-latest
86+
defaults:
87+
run:
88+
shell: bash -l {0}
89+
env:
90+
RTD_TOKEN: ${{ secrets.RTD_TOKEN }}
91+
RTD_URL: ${{ secrets.RTD_URL }}
92+
steps:
93+
- name: trigger readthedocs
94+
run: |
95+
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*

0 commit comments

Comments
 (0)