41 Commits
Author SHA1 Message Date
ClaudeandJames Woglom ddeaa79ded Fix #156: handle LidMalfunctionActivated in ProcessAlarm; add typed guardrail
ProcessAlarm.skip_event() read event.alarmId on every EventClass.ALARM event,
but LidMalfunctionActivated (a sibling of LidAlarmActivated in that class) has
no alarmId, so a malfunction alarm crashed the sync with AttributeError.

- Narrow with isinstance before reading alarmId; malfunction events now upload
  as "Malfunction" as intended, and sync continues.
- Type the alarm handlers against an explicit AlarmEvent union and add an
  assert_never exhaustiveness guard, so a type checker rejects unguarded
  subtype attribute access and flags any newly added ALARM event type.
- Fix a latent None-leak: alarm_to_nsentry now always returns a dict.
- Add mypy as a gradual-typing beachhead (setup.cfg [mypy], CI step, Pipfile
  typecheck script), scoped to process_alarm.py. This configuration fails on
  exactly the #156 class of bug.
- Add regression tests: malfunction processing, mixed alarm batches, the event
  shape, and an AlarmEvent/EventClass.ALARM sync guard.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LpMTd5LzkqFLZTUKd3H8em
2026-07-20 20:49:43 -04:00
James Woglom 7f88d88ea4 Fix PyPI publish workflow: use setup-python@v5 with Python 3.11
setup-python@v1 could not find Python 3.9 on current GitHub runners.
Bump checkout to v4 and pin an available Python version.
2026-07-01 07:26:32 +00:00
James Woglom 9619174958 CI: run on dev branch (replaces develop)
The develop branch was replaced by dev, so point the push/pull_request
triggers at dev instead of the now-removed develop branch.
2026-07-01 00:27:19 +00:00
James Woglom 9878e83755 exclude venv from flake8 2026-03-05 19:17:12 -05:00
James Woglom d8b57fe788 remove duplicate pipfile definitions also in setup.cfg, fix actions 2026-03-05 19:13:21 -05:00
James Woglom a1202decbe ignore name never assigned in scope flake8 2025-06-07 22:53:18 -04:00
James Woglom fd96b08aab stop running pipenv check 2025-01-15 19:14:20 -05:00
James Woglom 1d432982ad v2.1.5 with pypi upload fix 2024-10-07 21:59:01 -04:00
James Woglom c2f7070f3b no 3.7 build job 2024-10-02 00:56:38 -04:00
James Woglom 3e50c7018d py3.7 force pyopenssl 2024-10-01 21:02:04 -04:00
James Woglom 32f3639eb0 py3.7 actions 2024-10-01 17:29:49 -04:00
James Woglom 9a7cb1bdfd no anchors 2024-10-01 17:27:01 -04:00
James Woglom ead7ab883b check old python versions 2024-10-01 17:25:26 -04:00
James Woglom ff395ffa3e test on py3.7 2024-10-01 17:17:55 -04:00
James Woglom 29ed755356 3.8+ and add 3.11 2024-09-30 01:13:06 -04:00
James Woglom 822589e4b2 more ignore 2024-09-08 15:11:23 -04:00
James Woglom 90f2406b4f ignore more unrelated pipenv check failures 2024-09-08 15:10:20 -04:00
James Woglom d2190db45d dont fail on codecov error 2024-05-23 02:08:30 -04:00
James Woglom 5c09748fdb add more ignores 2024-05-23 00:48:42 -04:00
James Woglom 73a0e2924d ignore irrelevant pipenv errors 2024-05-23 00:08:16 -04:00
James WoglomandGitHub d902cd7aab Push latest tag 2023-10-18 00:02:32 -04:00
James Woglom 3fe131bcf3 version: bump to 0.9.5 2023-09-30 20:48:39 -04:00
James Woglom fb5f89e051 version: bump to 0.9.4 2023-06-11 00:28:18 -04:00
James Woglom 10fca69038 ignore unrelated pipenv check 2023-01-25 01:17:41 -05:00
James Woglom cffee9cdca fix codecov config 2023-01-16 19:58:44 -05:00
James Woglom 139ccb1878 ignore python3.7 pipenv check warning 2022-12-02 20:48:12 -05:00
James WoglomandGitHub 76fc043a2b Update issue templates 2022-08-24 12:55:32 -04:00
James Woglom 46c4d60525 YAML was a mistake
https://github.com/actions/setup-python/issues/160
2022-07-20 00:07:52 -04:00
James Woglom 31d2185154 drop python 3.6 support. no longer supported by requests 2022-07-20 00:04:14 -04:00
James WoglomandGitHub 0872c756d2 Only run publish-docker on tags 2022-03-17 16:32:45 -04:00
James WoglomandGitHub b08b9b8c76 trigger GitHub Actions on tag push 2022-02-27 00:35:53 -05:00
James WoglomandGitHub 5e56b41b62 Update publish-docker.yml
Add tags
2022-02-22 00:16:27 -05:00
James WoglomandGitHub e8fa6c5a7c Update publish-docker.yml
Add push_to_dockerhub GitHub Action
2022-02-22 00:08:20 -05:00
James Woglom e9f569d2a0 workflows: only publish to pypi on dispatch 2021-10-24 00:41:04 -04:00
James Woglom bcd486561f dockerfile: fix build 2021-10-20 01:01:47 -04:00
James Woglom 82ec1b4c1b pypi: add github action 2021-10-20 00:43:28 -04:00
James WoglomandGitHub 01d9517ff4 Add codecov 2021-04-24 23:24:01 -04:00
James Woglom 7a18a5d4be run CI on develop branch 2021-04-20 00:27:52 -04:00
James Woglom d804510633 .github/workflows: update workflow, add readme badge 2021-03-18 02:17:44 -04:00
James WoglomandGitHub 713d2ee79e Create python-package.yml
Auto-run linter, pytest, and pipenv check
2021-03-18 02:11:54 -04:00
James WoglomandGitHub 6ebb9bb9dd Create publish-docker.yml 2021-03-15 20:50:05 -04:00