Standalone support for the ThermalGrizzly WireView Pro II without depending on the external wireview_reporter exporter: - wireview.py: serial protocol (STX/ETX + 16-bit CRC16-CCITT) with vendor-data product identification, config version, UID, build string, screen layout, and temperature/power/current sensor reads; hwmon fallback with per-channel index resolution; udev-based detection (vendor 0x2560 / product 0x0101) with fallback port probing; serial read timeout and watchdog reconnect - server.py: startup detection (root only), 1 Hz poller gated on subscribed clients, WS 'wireview' channel, GET /api/wireview, rejected-product memoization, stale-read race guard - frontend: WireView tab (visible when a device is detected) with live temperature/power/current cards, sparkline history, and device info; nullable temp channels - tests: 76 tests covering parser, CRC, fault classification, hwmon resolution, JSON safety, and the serial transport against a pty-based fake device Verified live: tab appears with the device connected, disappears when unplugged, reconnects on re-plug, no serial traffic when idle.
46 lines
1.0 KiB
TOML
46 lines
1.0 KiB
TOML
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[project]
|
|
name = "nvcurve"
|
|
version = "0.5.1"
|
|
description = "Linux GPU V/F curve editor for NVIDIA GPUs"
|
|
requires-python = ">=3.12"
|
|
dependencies = [
|
|
"fastapi>=0.115",
|
|
"uvicorn[standard]>=0.30",
|
|
"nvidia-ml-py>=12.0",
|
|
"pydantic>=2.0",
|
|
"httpx>=0.27",
|
|
"bcrypt>=4.0",
|
|
"pyserial>=3.5",
|
|
]
|
|
|
|
[project.scripts]
|
|
nvcurve = "nvcurve.cli:main"
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"hatchling", # enables local `hatch build` and resolves hatch_build.py imports
|
|
]
|
|
|
|
[tool.hatch.build.hooks.custom]
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["nvcurve"]
|
|
|
|
# The custom build hook (hatch_build.py) compiles the React frontend when
|
|
# frontend/dist is missing or stale, so `uv tool install git+<repo-url>` works
|
|
# as a single command. It runs for both wheel and sdist builds.
|
|
|
|
[tool.hatch.build.targets.wheel.force-include]
|
|
"frontend/dist" = "nvcurve/frontend/dist"
|
|
|
|
[tool.hatch.build.targets.sdist]
|
|
include = [
|
|
"/nvcurve",
|
|
"/frontend/dist",
|
|
"/README.md",
|
|
]
|