File size: 1,196 Bytes
5e0b58b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
"""Quality verification for the Brain-5D operator dashboard and embodiment bridge."""

from __future__ import annotations

import subprocess
import sys
from pathlib import Path

ROOT = Path(__file__).resolve().parents[1]


def run(*command: str) -> None:
    """Run one command and fail immediately if it fails."""
    print("+", " ".join(command), flush=True)
    subprocess.run(command, cwd=ROOT, check=True)


def main() -> int:
    """Verify dashboard and embodiment quality surfaces."""
    python = sys.executable
    run(
        python,
        "-m",
        "pytest",
        "tests/test_dashboard.py",
        "tests/test_dashboard_alpha6.py",
        "tests/test_dashboard_alpha7.py",
        "tests/test_embodiment.py",
        "-v",
    )
    run(
        "black",
        "--check",
        "src/dashboard",
        "src/embodiment",
        "tests/test_dashboard.py",
        "tests/test_dashboard_alpha6.py",
        "tests/test_dashboard_alpha7.py",
        "tests/test_embodiment.py",
    )
    run("mypy", "--strict", "src/dashboard", "src/embodiment")
    run("pylint", "src/dashboard", "src/embodiment")
    return 0


if __name__ == "__main__":
    raise SystemExit(main())