mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-28 13:01:38 +00:00
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
45 lines
1.1 KiB
Python
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}")
|