Skip to content
Open
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
9 changes: 7 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ jobs:
strategy:
matrix:
# Oldest non-EOL and newest released
# scipy-stubs does not support Python 3.9
python-version: ["3.10", "3.13"]
python-version: ["3.9", "3.13"]
# Tier 1 OSes
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
fail-fast: false
Expand All @@ -35,6 +34,12 @@ jobs:
- name: Install dependencies
run: python -m pip install --group tests

- name: Install scipy-stubs on Python 3.9
if: ${{ matrix.python-version == '3.9' }}
# scipy-stubs claims to not support Python 3.9
# Manually install last version claiming Python 3.10 support
run: python -m pip install 'scipy-stubs<1.16' 'optype<0.10' --ignore-requires-python

- name: Run pyright tests
uses: jakebailey/pyright-action@v2
with:
Expand Down
11 changes: 9 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ tests = [
"matplotlib >=3.8",
"pandas-stubs",
"pytest",
"scipy-stubs",
# scipy-stubs claims to not support Python 3.9
# Manually install it separately (see .github/workflows/test.yml)
"scipy-stubs; python_version >= '3.10'",
"types-networkx",
"typing_extensions",

Expand All @@ -30,7 +32,12 @@ tests = [
"sympy",
"vispy",
]
dev = [{ include-group = "hygiene" }, { include-group = "tests" }]
dev = [
{ include-group = "hygiene" },
{ include-group = "tests" },
# Test scripts force a dependency update using pip, which doesn't come bundled in all venvs
"pip",
]


# Allow these stubs to be installed from GitHub
Expand Down
4 changes: 4 additions & 0 deletions tests/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ def install_requirements() -> None:
print("\nInstalling requirements...")
subprocess.check_call((sys.executable, "-m", "pip", "install", "pip>=25.1"))
subprocess.check_call((sys.executable, "-m", "pip", "install", "--upgrade", "--group", "tests"))
if sys.version_info < (3, 10):
subprocess.check_call(
(sys.executable, "-m", "pip", "install", "scipy-stubs<1.16", "optype<0.10", "--ignore-requires-python")
)


def run_pyright() -> subprocess.CompletedProcess[bytes]:
Expand Down