forked from narwhals-dev/narwhals
-
Notifications
You must be signed in to change notification settings - Fork 0
/
noxfile.py
57 lines (43 loc) · 1.49 KB
/
noxfile.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import nox
from nox.sessions import Session
nox.options.default_venv_backend = "uv"
nox.options.reuse_venv = True
PYTHON_VERSIONS = ["3.8", "3.9", "3.10", "3.11", "3.12"]
def run_common(session: Session, coverage_threshold: float) -> None:
session.install("-e.", "-r", "requirements-dev.txt")
session.run(
"pytest",
"tests",
"--cov=narwhals",
"--cov=tests",
f"--cov-fail-under={coverage_threshold}",
"--runslow",
)
session.run("pytest", "narwhals", "--doctest-modules")
@nox.session(python=PYTHON_VERSIONS) # type: ignore[misc]
def pytest_coverage(session: Session) -> None:
coverage_threshold = 90 if session.python == "3.8" else 100
session.install("modin[dask]")
run_common(session, coverage_threshold)
@nox.session(python=PYTHON_VERSIONS[0]) # type: ignore[misc]
def minimum_versions(session: Session) -> None:
session.install(
"pandas==0.25.3",
"polars==0.20.3",
"numpy==1.17.5",
"pyarrow==11.0.0",
"scipy==1.5.0",
"scikit-learn==1.1.0",
"tzdata",
)
run_common(session, coverage_threshold=50)
@nox.session(python=PYTHON_VERSIONS[-1]) # type: ignore[misc]
def nightly_versions(session: Session) -> None:
session.install("modin[dask]", "polars")
session.install(
"--pre",
"--extra-index-url",
"https://pypi.anaconda.org/scientific-python-nightly-wheels/simple",
"pandas",
)
run_common(session, coverage_threshold=50)