Skip to content

feat: add calibration dashboard and history #1

feat: add calibration dashboard and history

feat: add calibration dashboard and history #1

name: Calibration Dashboard
on:
push:
branches: [main]
paths:
- ".github/workflows/calibration-dashboard.yml"
- "pyproject.toml"
- "src/turkishevalkit/calibration.py"
- "src/turkishevalkit/calibration_dashboard.py"
- "src/turkishevalkit/workbench.py"
- "src/turkishevalkit/templates/calibration.html"
- "src/turkishevalkit/static/calibration.css"
- "src/turkishevalkit/static/calibration.js"
- "tests/test_calibration_dashboard.py"
pull_request:
paths:
- ".github/workflows/calibration-dashboard.yml"
- "pyproject.toml"
- "src/turkishevalkit/calibration.py"
- "src/turkishevalkit/calibration_dashboard.py"
- "src/turkishevalkit/workbench.py"
- "src/turkishevalkit/templates/calibration.html"
- "src/turkishevalkit/static/calibration.css"
- "src/turkishevalkit/static/calibration.js"
- "tests/test_calibration_dashboard.py"
permissions:
contents: read
concurrency:
group: calibration-dashboard-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
dashboard-smoke:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- name: Set up Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1
with:
python-version: "3.12"
cache: pip
- name: Install
run: python -m pip install --disable-pip-version-check -e ".[dev]"
- name: Dashboard backend tests
run: pytest -q tests/test_calibration_dashboard.py
- name: JavaScript syntax
run: node --check src/turkishevalkit/static/calibration.js
- name: Wheel dashboard assets
run: |
rm -rf /tmp/turkishevalkit-dashboard-wheel
python -m pip wheel . --no-deps --wheel-dir /tmp/turkishevalkit-dashboard-wheel
python - <<'PY'
from pathlib import Path
from zipfile import ZipFile
wheel = next(
Path("/tmp/turkishevalkit-dashboard-wheel").glob("turkishevalkit-*.whl")
)
required = {
"turkishevalkit/templates/calibration.html",
"turkishevalkit/static/calibration.css",
"turkishevalkit/static/calibration.js",
}
with ZipFile(wheel) as archive:
names = set(archive.namelist())
missing = required - names
if missing:
raise SystemExit(f"missing calibration dashboard assets: {sorted(missing)}")
PY