forked from rerun-io/rerun
-
Notifications
You must be signed in to change notification settings - Fork 0
/
noxfile.py
26 lines (18 loc) · 962 Bytes
/
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
"""Nox sessions.
This file is used by `nox` to run tests and examples against multiple Python versions.
See: http://nox.thea.codes
"""
from __future__ import annotations
import nox # type: ignore
@nox.session(python=["3.8", "3.9", "3.10", "3.11"])
def tests(session: nox.Session) -> None:
"""Run the Python test suite"""
session.install("-r", "rerun_py/requirements-build.txt")
session.install("./rerun_py")
session.run("just", "py-test", external=True)
@nox.session(python=["3.8", "3.9", "3.10", "3.11"])
def run_all(session: nox.Session) -> None:
"""Run all examples through the run_all.py script (pass args with: "-- <args>")"""
# Note: the run_all.py scripts installs all dependencies itself. In particular, we can install from
# examples/python/requirements.txt because it includes pyrealsense2, which is not available for mac.
session.run("python", "scripts/run_all.py", "--install-requirements", *session.posargs)