Files
OpenBB/.github/scripts/noxfile.py
dlee-bq e99af5a2a0 Drop Python 3.10 support
Python 3.10 reached end of life on 2026-10-01, and the patched releases of
Pillow (13.0.0) and filelock (>=4.2.1) require Python >=3.11, so the 3.10
resolution fork kept vulnerable versions in every lockfile.

- requires-python = ">=3.11,<4" in all pyproject.toml files, the
  cookiecutter template, and the CLI codegen project template
- CI: drop the ubuntu 3.10 matrix rows, move the macOS/Windows minimum
  rows and the lint jobs to 3.11, drop 3.10 from the nox sessions
- READMEs: state 3.11 as the minimum supported version
2026-10-24 00:56:30 -07:00

45 lines
1.1 KiB
Python

"""Nox sessions."""
from pathlib import Path
import nox
ROOT_DIR = Path(__file__).parent.parent.parent
PLATFORM_DIR = ROOT_DIR / "openbb_platform"
PLATFORM_TESTS = [
str(PLATFORM_DIR / p) for p in ["tests", "core", "providers", "extensions"]
]
CLI_DIR = ROOT_DIR / "cli"
CLI_TESTS = CLI_DIR / "tests"
@nox.session(python=["3.11", "3.12", "3.13", "3.14"])
def unit_test_platform(session):
"""Run the test suite."""
session.install("uv")
session.run(
"python", str(PLATFORM_DIR / "dev_install.py"), "--routers", external=True
)
session.install("pytest")
session.install("pytest-cov")
session.run(
"pytest",
*PLATFORM_TESTS,
f"--cov={PLATFORM_DIR}",
"-m",
"not integration",
)
@nox.session(python=["3.11", "3.12", "3.13", "3.14"])
def unit_test_cli(session):
"""Run the test suite."""
session.install("uv")
session.run(
"python", str(PLATFORM_DIR / "dev_install.py"), "--routers", external=True
)
session.install("pytest")
session.install("pytest-cov")
session.run("pytest", CLI_TESTS, f"--cov={CLI_DIR}")