diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 8f218cb..ebb97b2 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -18,7 +18,9 @@ jobs: strategy: fail-fast: false matrix: - os: ["ubuntu-latest", "macos-latest", "windows-latest"] + # Exclude Windows for now since it causes MPI issues + # os: ["ubuntu-latest", "macos-latest", "windows-latest"] + os: ["ubuntu-latest", "macos-latest"] python-version: ["3.10", "3.11", "3.12", "3.13"] steps: @@ -35,7 +37,7 @@ jobs: run: pip list - name: Run tests with pytest & nox run: | - nox -s test-${{ matrix.python-version }} + nox -s tests-${{ matrix.python-version }} # You only need to upload code coverage once to codecov unless you have a # more complex build that you need coverage for. # - name: Upload coverage to Codecov diff --git a/noxfile.py b/noxfile.py index b0dcbfa..7925ec4 100644 --- a/noxfile.py +++ b/noxfile.py @@ -1,10 +1,10 @@ import nox -@nox.session(python=["3.10", "3.11", "3.12", "3.13"]) -def test(session): +@nox.session(python=["3.10", "3.11", "3.12", "3.13"]) +def tests(session): # install - session.install(".[test]") + session.install(".[tests]") # Run tests session.run("pytest") diff --git a/pyproject.toml b/pyproject.toml index ecff3e1..b566e62 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,6 +42,7 @@ dependencies = [ "mpi4py", "neighpy", "numpy", + "openmpi", "schwimmbad", "scipy", "scikit-learn", @@ -50,7 +51,7 @@ dependencies = [ [project.optional-dependencies] lint = ["mypy", "ruff"] notebook = ["jupyterlab"] -test = ["pytest"] +tests = ["mpi4py", "openmpi", "pytest"] [project.urls] homepage = "https://tc1d.readthedocs.io/" @@ -124,3 +125,4 @@ jupyterlab = ">=4.4.7,<5" ruff = ">=0.12.12,<0.13" hatchling = ">=1.27.0,<2" mypy = ">=1.17.1,<2" +pip = ">=25.2,<26" diff --git a/src/tc1d/__init__.py b/src/tc1d/__init__.py index 6bd624a..646e7fe 100644 --- a/src/tc1d/__init__.py +++ b/src/tc1d/__init__.py @@ -1,6 +1,5 @@ +import importlib.metadata from .tc1d import init_params, prep_model # Versioning -import importlib.metadata - __version__ = importlib.metadata.version("tc1d")