Skip to content

Commit 4782b7c

Browse files
authored
Merge pull request #107 from zingale/split_tests
update test scripts to latest actions fix a few lint issues switch from deprecated AxesGrid to ImageGrid
2 parents 18f6f7f + 377f0e3 commit 4782b7c

10 files changed

Lines changed: 494 additions & 276 deletions

File tree

.github/workflows/flake8.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: flake8
2+
3+
on:
4+
# Trigger the workflow on push or pull request,
5+
# but only for the main branch
6+
push:
7+
branches:
8+
- main
9+
pull_request:
10+
branches:
11+
- main
12+
13+
jobs:
14+
flake-8:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- name: Install Python
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: '3.10'
24+
25+
- name: Cache pip
26+
uses: actions/cache@v3
27+
with:
28+
# this path is specific to Ubuntu
29+
path: ~/.cache/pip
30+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
31+
restore-keys: |
32+
${{ runner.os }}-pip-
33+
34+
- name: Install dependencies
35+
run: |
36+
python -m pip install --upgrade pip
37+
pip install -r requirements.txt
38+
pip install flake8
39+
40+
- name: Install pyro
41+
run: python setup.py install --user
42+
43+
- name: Run flake8
44+
run: flake8 .

.github/workflows/pylint.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: pylint
2+
3+
on:
4+
# Trigger the workflow on push or pull request,
5+
# but only for the main branch
6+
push:
7+
branches:
8+
- main
9+
pull_request:
10+
branches:
11+
- main
12+
13+
jobs:
14+
pylint:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- name: Install Python 3.10
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: '3.10'
24+
25+
- name: Cache pip
26+
uses: actions/cache@v3
27+
with:
28+
# this path is specific to Ubuntu
29+
path: ~/.cache/pip
30+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
31+
restore-keys: |
32+
${{ runner.os }}-pip-
33+
34+
- name: Install dependencies + pylint
35+
run: |
36+
python -m pip install --upgrade pip
37+
pip install -r requirements.txt
38+
pip install pylint
39+
40+
- name: Install pyro
41+
run: python setup.py install --user
42+
43+
- name: Validate
44+
run: pylint --errors-only pyro.py ./advection ./advection_fv4 ./advection_nonuniform ./advection_rk ./advection_weno ./analysis ./compressible ./compressible_fv4 ./compressible_react ./compressible_rk ./compressible_sdc ./compressible_sr ./diffusion ./incompressible ./lm_atm ./mesh ./multigrid ./particles ./swe ./util
45+
Lines changed: 5 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -11,54 +11,23 @@ on:
1111
- main
1212

1313
jobs:
14-
flake-8:
15-
runs-on: ubuntu-latest
16-
17-
steps:
18-
- uses: actions/checkout@v2
19-
20-
- name: Install Python
21-
uses: actions/setup-python@v2
22-
with:
23-
python-version: '3.x'
24-
25-
- name: Cache pip
26-
uses: actions/cache@v2
27-
with:
28-
# this path is specific to Ubuntu
29-
path: ~/.cache/pip
30-
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
31-
restore-keys: |
32-
${{ runner.os }}-pip-
33-
34-
- name: Install dependencies
35-
run: |
36-
python -m pip install --upgrade pip
37-
pip install -r requirements.txt
38-
39-
- name: Install pynucastro
40-
run: python setup.py install --user
41-
42-
- name: Run flake8
43-
run: flake8 .
44-
4514
pytest:
4615
runs-on: ubuntu-latest
4716

4817
strategy:
4918
matrix:
50-
python-version: [3.7, 3.8, 3.9]
19+
python-version: ["3.8", "3.9", "3.10"]
5120

5221
steps:
53-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v3
5423

5524
- name: Install Python ${{ matrix.python-version }}
56-
uses: actions/setup-python@v2
25+
uses: actions/setup-python@v4
5726
with:
5827
python-version: ${{ matrix.python-version }}
5928

6029
- name: Cache pip
61-
uses: actions/cache@v2
30+
uses: actions/cache@v3
6231
with:
6332
# this path is specific to Ubuntu
6433
path: ~/.cache/pip
@@ -71,7 +40,7 @@ jobs:
7140
python -m pip install --upgrade pip
7241
pip install -r requirements.txt
7342
74-
- name: Install pynucastro
43+
- name: Install pyro
7544
run: python setup.py install --user
7645

7746
- name: Run tests with pytest

0 commit comments

Comments
 (0)