Mirrors the CI-green safeguards rolled out repo-wide (see screen-locker): - scripts/check_requirements_sync.py: pre-commit hook that fails if a package import isn't declared in requirements.txt. Added a kasa -> python-kasa entry to the import->distribution map (python-kasa ships the `kasa` import, already declared correctly in requirements.txt). - scripts/ci_mirror.sh: pre-push gate = requirements.txt-only venv (hash-gated) running `pre-commit run --all-files` + `pytest`, replacing the plain pytest-coverage pre-push hook. Verified: mirror green (210 passed). Only the tooling files are committed; unrelated in-flight work in the tree is left untouched. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018PMRRVVkeRyrSaaqueMZKG |
||
|---|---|---|
| .github/workflows | ||
| phone_app | ||
| scripts | ||
| wake_alarm | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| CLAUDE.md | ||
| install.sh | ||
| pyproject.toml | ||
| README.md | ||
| requirements.txt | ||
| shutdown-wrapper.sh | ||
| sleep-hook.sh | ||
| wake-alarm-fans.sh | ||
| wake-alarm.service | ||
wake_alarm
A hibernate-scheduled weekend wake alarm: the machine hibernates overnight
on alarm days and wakes itself via rtcwake, then shows a fullscreen,
challenge-dismissed alarm with fan ramp and optional TP-Link Tapo P110
smart-plug control.
Install
bash install.sh
This installs the package + dependencies into system Python's user
site-packages (the systemd service runs /usr/bin/python directly, not a
venv — see CLAUDE.md), installs the systemd user service, the
systemd-sleep resume hook, the shutdown wrapper that triggers hibernate on
alarm nights, the fan-ramp script, and (optionally) python-kasa for
smart-plug control.
Usage
python -m wake_alarm._alarm --demo # test the alarm window (safe, closeable)
The alarm fires automatically via the hibernate/wake cycle once installed; no manual invocation is needed in normal operation.
Development
python -m venv .venv && .venv/bin/pip install -r requirements.txt
.venv/bin/pre-commit install && .venv/bin/pre-commit install --hook-type pre-push
.venv/bin/python -m pytest wake_alarm/tests/ --cov=wake_alarm --cov-branch --cov-fail-under=100
See CLAUDE.md for scheduling details, the hibernate/rtcwake mechanism,
the cross-repo workout_log.json read, and production deployment gotchas.