Skip to content

Commit

Permalink
Rendering at commit e6c1e3a
Browse files Browse the repository at this point in the history
  • Loading branch information
wradlib-docs-bot committed Feb 13, 2023
0 parents commit d5e5ba8
Show file tree
Hide file tree
Showing 93 changed files with 117,024 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .dask/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
distributed:
logging:
bokeh: critical

dashboard:
link: /user/{JUPYTERHUB_USER}/proxy/{port}/status

admin:
tick:
limit: 5s

kubernetes:
worker-name: dask-{JUPYTERHUB_USER}-{uuid}
worker-template:
metadata:
spec:
restartPolicy: Never
containers:
- args:
- dask-worker
- --nthreads
- '2'
- --no-bokeh
- --memory-limit
- 7GB
- --death-timeout
- '60'
image: ${JUPYTER_IMAGE_SPEC}
name: dask-worker
resources:
limits:
cpu: "1.75"
memory: 7G
requests:
cpu: "1.75"
memory: 7G
190 changes: 190 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
name: CI
env:
micromamba_version: 1.3


on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

workflow_dispatch:


jobs:
build_0:
name: wradlib notebooks - linux
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
env:
WRADLIB_DATA: ./wradlib-data
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install micromamba environment
uses: mamba-org/provision-with-micromamba@main
with:
environment-name: wradlib-notebooks
environment-file: ci/requirements/notebooks.yml
extra-specs: |
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
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install micromamba environment
uses: mamba-org/provision-with-micromamba@main
with:
environment-name: wradlib-notebooks
environment-file: ci/requirements/notebooks.yml
extra-specs: |
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 --doctest-modules --durations=15 --cov-report xml:coverage.xml --cov=wradlib --pyargs notebooks
build_2:
name: wradlib notebooks - windows
runs-on: windows-latest
defaults:
run:
shell: bash -l {0}
env:
WRADLIB_DATA: ./wradlib-data
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install micromamba environment
uses: mamba-org/provision-with-micromamba@main
with:
environment-name: wradlib-notebooks
environment-file: ci/requirements/notebooks.yml
extra-specs: |
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 --doctest-modules --durations=15 --cov-report xml:coverage.xml --cov=wradlib --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: |
curl -X POST -d "token=$RTD_TOKEN" "$RTD_URL"
87 changes: 87 additions & 0 deletions .github/workflows/render_notebooks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Render

on:
workflow_dispatch:


jobs:
build_0:
name: wradlib notebooks - linux
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
env:
WRADLIB_DATA: ./wradlib-data
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install micromamba environment
uses: mamba-org/provision-with-micromamba@main
with:
environment-name: wradlib-notebooks
environment-file: ci/requirements/notebooks.yml
extra-specs: |
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
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: |
curl -X POST -d "token=$RTD_TOKEN" "$RTD_URL"
39 changes: 39 additions & 0 deletions .gitignore
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*
33 changes: 33 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
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.tags"'
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.0.244'
hooks:
- id: ruff
args: [ "--fix" ]
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
- id: black-jupyter
9 changes: 9 additions & 0 deletions LICENSE.txt
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.
Loading

0 comments on commit d5e5ba8

Please sign in to comment.