forked from clawpack/riemann
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from carlosmunozmoncayo/implicit_none
Update branch, add testing workflow, use implicit none in more Riemann solvers
- Loading branch information
Showing
40 changed files
with
907 additions
and
352 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Test Riemann solvers with AMRClaw tests | ||
|
||
on: | ||
push: | ||
branches: [ "implicit_none" ] | ||
pull_request: | ||
branches: [ "implicit_none" ] | ||
|
||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
env: | ||
CLAW: ${{ github.workspace }} | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install gfortran | ||
python -m pip install --upgrade pip | ||
pip install 'numpy<2.0' | ||
pip install matplotlib #Some imports require matplotlib | ||
pip install scipy #To not skip tests | ||
pip install nose | ||
pip install flake8 meson-python ninja pytest | ||
- name: Checkout Clawpack | ||
uses: actions/[email protected] | ||
with: | ||
repository: clawpack/clawpack | ||
submodules: true | ||
|
||
- name: Checkout AMRClaw branch | ||
uses: actions/[email protected] | ||
with: | ||
repository: clawpack/amrclaw # | ||
path: amrclaw | ||
ref: master | ||
|
||
- name: Checkout implicit_none from this repo | ||
uses: actions/[email protected] | ||
with: | ||
repository: ${{ github.repository }} | ||
path: ${{ env.CLAW }}/riemann | ||
ref: implicit_none | ||
|
||
- name: Install Clawpack | ||
run: | | ||
cd ${CLAW} | ||
pip install --no-build-isolation --editable . | ||
- name: Test with pytest | ||
run: | | ||
cd ${CLAW}/riemann | ||
bash collect_pytests_amrclaw.sh |
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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Test Riemann solvers with Classic Clawpack tests | ||
|
||
on: | ||
push: | ||
branches: [ "implicit_none" ] | ||
pull_request: | ||
branches: [ "implicit_none" ] | ||
|
||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
env: | ||
CLAW: ${{ github.workspace }} | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install gfortran | ||
python -m pip install --upgrade pip | ||
pip install 'numpy<2.0' | ||
pip install matplotlib #Some imports require matplotlib | ||
pip install scipy #To not skip tests | ||
pip install nose | ||
pip install flake8 meson-python ninja pytest | ||
- name: Checkout Clawpack | ||
uses: actions/[email protected] | ||
with: | ||
repository: clawpack/clawpack | ||
submodules: true | ||
|
||
- name: Checkout Classic branch | ||
uses: actions/[email protected] | ||
with: | ||
repository: clawpack/classic # | ||
path: classic | ||
ref: master | ||
|
||
- name: Checkout implicit_none from this repo | ||
uses: actions/[email protected] | ||
with: | ||
repository: ${{ github.repository }} | ||
path: ${{ env.CLAW }}/riemann | ||
ref: implicit_none | ||
|
||
- name: Install Clawpack | ||
run: | | ||
cd ${CLAW} | ||
pip install --no-build-isolation --editable . | ||
- name: Test with pytest | ||
run: | | ||
cd ${CLAW}/classic | ||
pytest tests |
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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Test Riemann solvers with PyClaw tests | ||
|
||
on: | ||
push: | ||
branches: [ "implicit_none" ] | ||
pull_request: | ||
branches: [ "implicit_none" ] | ||
|
||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
env: | ||
CLAW: ${{ github.workspace }} | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install gfortran | ||
python -m pip install --upgrade pip | ||
pip install 'numpy<2.0' | ||
pip install matplotlib #Some imports require matplotlib | ||
pip install scipy #To not skip tests | ||
pip install flake8 meson-python ninja pytest | ||
- name: Checkout Clawpack | ||
uses: actions/[email protected] | ||
with: | ||
repository: clawpack/clawpack | ||
submodules: true | ||
|
||
- name: Checkout PyClaw branch | ||
uses: actions/[email protected] | ||
with: | ||
repository: clawpack/pyclaw # | ||
path: pyclaw | ||
ref: master | ||
|
||
- name: Checkout implicit_none from this repo | ||
uses: actions/[email protected] | ||
with: | ||
repository: ${{ github.repository }} | ||
path: ${{ env.CLAW }}/riemann | ||
ref: implicit_none | ||
|
||
- name: Install Clawpack | ||
run: | | ||
cd ${CLAW} | ||
pip install --no-build-isolation --editable . | ||
- name: Test with pytest | ||
run: | | ||
cd ${CLAW}/pyclaw | ||
pytest --ignore=development --ignore=examples/shallow_sphere |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#Collect Pytest tests for AMRClaw | ||
cd ${CLAW}/amrclaw/tests | ||
pathlist=() | ||
for dir in $(ls -d */); do | ||
cd $dir | ||
#Check if there are any test files | ||
#Capture the error message and check if it is empty | ||
if [ -z "$(ls *test*.py 2>/dev/null )" ]; then | ||
cd .. | ||
continue | ||
fi | ||
for file in $(ls *test*.py); do | ||
pathlist+=($(pwd)/$file) | ||
done | ||
cd .. | ||
done | ||
|
||
#Run the tests | ||
pytest ${pathlist[@]} |
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
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.