Skip to content

Commit fad37a5

Browse files
Allow saving and loading the 3D grid to and from an HDF5 file (#38)
* build: include static images * build: bump scipy and numpy version in requirements * style: apply ruff suggestions + improve verbose prints * style: apply Ruffs code quality suggestions * Potential fix for pull request finding 'Except block handles 'BaseException'' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> * feature: add load_from_h5 and save_to_h5 functions * Potential fix for pull request finding 'Unnecessary pass' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> * fix: MPI test failing fix: re-compute z with the final subdomain samples * fix: wakis install failed * fix: mpi tests_007 passing, fixed typo Nz->NZ * style: apply RUFFs style suggestions * fix: put 3D plot flag back to false * style: fix Ruffs warnings * style: add RUFFs suggestions + remove the `if False` at the end of the file * test: add workflow to run MPI tests on pull request update * style: minor improvements and Ruff fixes * style: improve notebook 006 to match CST result, clear outputs * tests: include test functions for load and save grid * style: add Ruffs suggestions + improve load_results to update self.folder and/or take folder from class constructor. Ez_file is now None, and default value is result_folder+Ez.h5 * refact: move verbosity in __init__ to `load_from_h5` and improved information * fix: add logger lines, wrongly skipped during merge + fix MPI workflow action * reafact+test: fix logger updates and included them in load_from_h5.Included domain boundaries in logger and updated test_007 to compare dict with tolerances * test: update static dict with use_mpi for MPI tests --------- Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
1 parent 86ab32d commit fad37a5

12 files changed

+1233
-865
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# This is a basic workflow that is manually triggered
2+
3+
name: pull_request_tests_MPI_python10
4+
5+
# Controls when the action will run. Workflow runs when manually triggered using the UI
6+
# or API.
7+
on:
8+
# Run tests for every pull request targeting main
9+
pull_request:
10+
branches:
11+
- main
12+
types: [opened, synchronize, reopened]
13+
14+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
15+
jobs:
16+
run_tests:
17+
# The type of runner that the job will run on
18+
runs-on: ubuntu-latest
19+
20+
# Make the default shell a login shell, so that conda is initialised properly
21+
defaults:
22+
run:
23+
shell: bash -el {0}
24+
25+
# Steps represent a sequence of tasks that will be executed as part of the job
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
with:
30+
path: wakis
31+
- name: Setup Miniforge
32+
uses: conda-incubator/setup-miniconda@v2
33+
with:
34+
miniforge-version: latest
35+
python-version: "3.11"
36+
- name: mpi install
37+
run: |
38+
conda install -c conda-forge openmpi
39+
conda install -c conda-forge mpi4py
40+
- name: pip install
41+
run: |
42+
cd wakis
43+
pip install .['notebook']
44+
- name: Print versions
45+
run: conda list
46+
- name: Run pytest
47+
run: |
48+
cd wakis
49+
mpiexec -n 2 python -m pytest --color=yes -v -s tests/test_007_mpi_lossy_cavity.py

0 commit comments

Comments
 (0)