Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'
cache: "pip"

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'
cache: "pip"

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
cache: "pip"

- name: Install Python dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install Python 3.11
- name: Install Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'
cache: "pip"

- name: Install pylint
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'
cache: "pip"

- name: Install dependencies + pylint
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pytest-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
python-version: ["3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/pytest-mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: pytest-mac

on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

jobs:
test-mac:
runs-on: macos-latest

strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4

- name: Install Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Install ppmpy
run: pip install --editable .

- name: Print system info
run: |
echo '::group::NumPy'
pip install threadpoolctl &>/dev/null
python -c "import sys, numpy; print(numpy.__version__); print(sys.version); print(numpy.show_runtime())"
echo '::endgroup::'
echo '::group::CPU info'
sysctl -a | grep machdep.cpu
echo '::endgroup::'
echo '::group::Package versions'
pip list --format=freeze
echo '::endgroup::'

- name: Run tests with pytest
run: pytest -v -s --cov=ppmpy --color=yes
3 changes: 1 addition & 2 deletions ppmpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@


from .eigen import eigen
from .euler import Euler
from .grid import FVGrid
from .reconstruction import PPMInterpolant, flattening_coefficient
from .riemann_exact import RiemannProblem, State

from .euler import Euler
3 changes: 2 additions & 1 deletion ppmpy/euler.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

from ppmpy.eigen import eigen
from ppmpy.grid import FVGrid
from ppmpy.reconstruction import PPMInterpolant, HSEPPMInterpolant, flattening_coefficient
from ppmpy.reconstruction import (HSEPPMInterpolant, PPMInterpolant,
flattening_coefficient)
from ppmpy.riemann_exact import RiemannProblem, State


Expand Down
2 changes: 1 addition & 1 deletion ppmpy/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"""


import numpy as np
import matplotlib.pyplot as plt
import numpy as np


class GridPlot:
Expand Down
2 changes: 1 addition & 1 deletion ppmpy/riemann_exact.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
`q_int = rp.sample_solution()`
"""

import numpy as np
import matplotlib.pyplot as plt
import numpy as np
from scipy import optimize


Expand Down
2 changes: 1 addition & 1 deletion ppmpy/tests/test_euler.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from numpy.testing import assert_array_almost_equal_nulp

from ppmpy.euler import Euler, FluidVars
from ppmpy.initial_conditions import sod, acoustic_pulse
from ppmpy.initial_conditions import acoustic_pulse, sod


class TestFluidVars:
Expand Down
2 changes: 1 addition & 1 deletion ppmpy/tests/test_gravity.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import numpy as np

from ppmpy.grid import FVGrid
from ppmpy.gravity import constant_gravity
from ppmpy.grid import FVGrid


class TestGravity:
Expand Down
2 changes: 1 addition & 1 deletion ppmpy/tests/test_grid.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import numpy as np
from numpy.testing import assert_array_equal, assert_array_almost_equal_nulp
from numpy.testing import assert_array_almost_equal_nulp, assert_array_equal
from pytest import approx

from ppmpy.grid import FVGrid
Expand Down
2 changes: 1 addition & 1 deletion ppmpy/tests/test_ppm_reconstruction.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import numpy as np
from numpy.testing import assert_array_equal, assert_array_almost_equal_nulp
from numpy.testing import assert_array_almost_equal_nulp, assert_array_equal

from ppmpy.grid import FVGrid
from ppmpy.reconstruction import PPMInterpolant
Expand Down
2 changes: 1 addition & 1 deletion ppmpy/tests/test_riemann.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from pytest import approx

from ppmpy import State, RiemannProblem
from ppmpy import RiemannProblem, State


class TestGrid:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies = [

[project.urls]
Homepage = "https://github.com/python-hydro/ppmpy"

Documentation = "https://python-hydro.github.io/ppmpy"

# packaging

Expand Down