-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Quadtree read/write, no build (#226)
* potential bugfix havg * undo previous commit and update computation of wet fractions (and increased readability) * fix wet fractions and corresponding havg * add dependencies * add reading/writing quadtree netcdf files * add read/write subgrid quadtree * add quadtree io in main sfincs.py * Solve some linting warnings * make datashader optional dep * add bounds property (since the original calls read_grid) and remove grid api * fixing read_results and plot_basemap for quadtree models. Also fixed #133 * add quadtree IO tests * extended tests for quadtree io, plot_basemap and read_results * imrpoved downscaling methods (both bugfixes and allow for ugrids) * pre-commit linting * pre-commit test-data * changed fix for plotting; not longer reprojecting to epsg4326 by default but using another cartopy projection * fix pyflwdir version for now (to be investigated) * fix typo in pyproject.toml * test fixing docs workflows, since Mambaforge gets deprecated ... * miniforge3? * Delete tests/data/sfincs_test_quadtree/sfincs_log.txt * bugfix so sfincs_his.nc files are closed correctly (#232) * bugfix so that the .nc file is closed automatically when erroring or when leaving the context manager (with block). see pydata/xarray#1629 (comment) * fixed all occurences of xr.opendataset with the safe open&close pattern * review comments by Roel * fix linting --------- Co-authored-by: roeldegoede <[email protected]> * added xu_open_dataset wrapper (#236) * added xu_open_dataset wrapper. * load_dataset -> open_dataset * linting --------- Co-authored-by: roeldegoede <[email protected]> --------- Co-authored-by: DirkEilander <[email protected]> Co-authored-by: Tim Leijnse <[email protected]> Co-authored-by: LuukBlom <[email protected]>
- Loading branch information
1 parent
abe9323
commit 8de6cf2
Showing
20 changed files
with
915 additions
and
368 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
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 |
---|---|---|
@@ -1,62 +1,63 @@ | ||
name: Tests with HydroMT dev | ||
# Uncomment when we move to HydroMT v1 | ||
# name: Tests with HydroMT dev | ||
|
||
on: | ||
# trigger weekly on monday at 00:00 UTC | ||
schedule: | ||
- cron: '0 0 * * 1' | ||
push: | ||
branches: [main] | ||
paths: | ||
- .github/workflows/tests_dev.yml | ||
- tests/* | ||
- hydromt_sfincs/* | ||
- pyproject.toml | ||
pull_request: | ||
branches: [main] | ||
paths: | ||
- .github/workflows/tests_dev.yml | ||
- tests/* | ||
- hydromt_sfincs/* | ||
- pyproject.toml | ||
# on: | ||
# # trigger weekly on monday at 00:00 UTC | ||
# schedule: | ||
# - cron: '0 0 * * 1' | ||
# push: | ||
# branches: [main] | ||
# paths: | ||
# - .github/workflows/tests_dev.yml | ||
# - tests/* | ||
# - hydromt_sfincs/* | ||
# - pyproject.toml | ||
# pull_request: | ||
# branches: [main] | ||
# paths: | ||
# - .github/workflows/tests_dev.yml | ||
# - tests/* | ||
# - hydromt_sfincs/* | ||
# - pyproject.toml | ||
|
||
jobs: | ||
build: | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
strategy: | ||
fail-fast: false | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ matrix.python-version }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
steps: | ||
# jobs: | ||
# build: | ||
# defaults: | ||
# run: | ||
# shell: bash -l {0} | ||
# strategy: | ||
# fail-fast: false | ||
# runs-on: ubuntu-latest | ||
# timeout-minutes: 30 | ||
# concurrency: | ||
# group: ${{ github.workflow }}-${{ matrix.python-version }}-${{ github.ref }} | ||
# cancel-in-progress: true | ||
# steps: | ||
|
||
- uses: actions/checkout@v3 | ||
# - uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-python@v5 | ||
id: pip | ||
with: | ||
# caching, see https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#caching-packages | ||
cache: 'pip' | ||
python-version: '3.9' # 3.9 is not supported by last released version of hydromt | ||
cache-dependency-path: pyproject.toml | ||
# - uses: actions/setup-python@v5 | ||
# id: pip | ||
# with: | ||
# # caching, see https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#caching-packages | ||
# cache: 'pip' | ||
# python-version: '3.9' # 3.9 is not supported by last released version of hydromt | ||
# cache-dependency-path: pyproject.toml | ||
|
||
# true if cache-hit occurred on the primary key | ||
- name: Cache hit | ||
run: echo '${{ steps.pip.outputs.cache-hit }}' | ||
# # true if cache-hit occurred on the primary key | ||
# - name: Cache hit | ||
# run: echo '${{ steps.pip.outputs.cache-hit }}' | ||
|
||
# build environment with pip | ||
- name: Install hydromt-sfincs | ||
run: | | ||
pip install --upgrade pip | ||
pip install .[test,examples] | ||
pip install git+https://github.com/Deltares/hydromt.git | ||
pip list | ||
# # build environment with pip | ||
# - name: Install hydromt-sfincs | ||
# run: | | ||
# pip install --upgrade pip | ||
# pip install .[test,examples] | ||
# pip install git+https://github.com/Deltares/hydromt.git | ||
# pip list | ||
|
||
# run test | ||
- name: Test | ||
run: | | ||
export NUMBA_DISABLE_JIT=1 | ||
python -m pytest --verbose | ||
# # run test | ||
# - name: Test | ||
# run: | | ||
# export NUMBA_DISABLE_JIT=1 | ||
# python -m pytest --verbose |
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
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
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
Oops, something went wrong.