Skip to content

Commit d5e5ba8

Browse files
Rendering at commit e6c1e3a
0 parents  commit d5e5ba8

File tree

93 files changed

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

93 files changed

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

.pre-commit-config.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.4.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-docstring-first
8+
- id: check-json
9+
- id: check-yaml
10+
- id: debug-statements
11+
- id: mixed-line-ending
12+
- repo: https://github.com/asottile/pyupgrade
13+
rev: v3.3.1
14+
hooks:
15+
- id: pyupgrade
16+
args:
17+
- '--py38-plus'
18+
- repo: https://github.com/kynan/nbstripout
19+
rev: 0.6.1
20+
hooks:
21+
- id: nbstripout
22+
args:
23+
- '--extra-keys "metadata.kernelspec cell.metadata.tags"'
24+
- repo: https://github.com/charliermarsh/ruff-pre-commit
25+
rev: 'v0.0.244'
26+
hooks:
27+
- id: ruff
28+
args: [ "--fix" ]
29+
- repo: https://github.com/psf/black
30+
rev: 23.1.0
31+
hooks:
32+
- id: black
33+
- id: black-jupyter

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.

0 commit comments

Comments
 (0)