Project Location
- Repository: ~/py/neutral-hibernator/
- Deployed script: /home/john/bin/hibernate-on-approach.py
- Git remote: Track via .git in project directory
Development Setup
Source code in ~/py/neutral-hibernator/:
- hibernate-on-approach.py — main script
- test_hibernate_on_approach.py — unit tests
- sample_history.csv — test fixture
Related scripts:
- david-lloyd-hibernate.py — variant for David Lloyd gym location tracking
Test with history file:
Deployment
Copy updated script to /home/john/bin/:
Restart the running process to load the new code:
Architecture Notes (2026-08-26)
Recently refactored to eliminate hardcoded defaults:
- All neutral sections now loaded from location-db gazetteer table at startup
- Nearest-section calculation uses server-side PostGIS geography functions
- Script fails immediately if gazetteer has no gwml-neutral-sections entries
- No silent fallback to stale hardcoded values
This means updates to the gazetteer (via sudo -u postgres psql on gravlax) take effect on the next restart, without requiring code changes.