tliu93
3d3c2bcc57
M1-T03: unify data layer, models, deps and routes onto single app DB
...
Collapse the three data layers into one. app/db.py now exposes a single
Base, a cached engine bound to app_database_url with SQLite WAL enabled, and
get_engine/get_session_local/reset_db_caches/get_db_session. Delete
app/auth_db.py, app/poo_db.py and app/models/base.py. All models (auth,
config, public_ip, location, poo) inherit the one Base and register on a
single metadata. Dependencies converge to a single get_db; all routes use it.
Also update the alembic env.py files (app/location/poo) and tests that
imported the removed modules so the suite stays green, and drop the obsolete
test_legacy_style_location_db test whose flow (app reading a separate location
DB) no longer exists. Location/poo Alembic chains, adopt scripts and adoption
tests remain for M1-T04; config fields remain for M1-T05.
pytest 109 passed; ruff clean (pre-existing only); WAL verified; single
Base.metadata holds all seven tables.
2026-06-12 16:35:07 +02:00
tliu93
bc8dd062d5
M1-T02: add idempotent legacy data migration script
...
scripts/migrate_legacy_data.py copies rows from the legacy locationRecorder.db
/ pooRecorder.db into the unified app DB's location / poo_records tables using
ATTACH + INSERT OR IGNORE (idempotent via PK-conflict skip; explicit columns,
never SELECT *). After copy it reconciles every source row against the target
and raises / exits non-zero on any shortfall. Missing legacy files are a safe
no-op (skipped); --dry-run writes nothing. Not part of the Alembic chain; run
manually once at cut-over. Never deletes or overwrites any file.
Validated end-to-end on copies of the real production DBs: dry-run reported
75103 location + 874 poo rows and wrote nothing; the real run copied all rows
with reconciliation passing; a second run copied 0 (idempotent).
2026-06-12 16:13:55 +02:00
tliu93
427a491380
M1-T01: add app-chain revision creating location + poo_records tables
...
Add alembic_app revision 20260611_06_merge_location_poo_tables that builds
empty location and poo_records tables (REAL float columns, matching the
production schema and the adopt scripts' EXPECTED_*_TABLE_INFO constants).
Update APP_BASELINE_REVISION to the new head. Schema-only; data migration
is handled separately by scripts/migrate_legacy_data.py (M1-T02).
2026-06-12 16:02:46 +02:00
tliu93
b359bbe3bf
docs: add next-phase roadmap, milestone design docs, and CLAUDE.md
...
pytest / test (push) Successful in 54s
- roadmap.md: M1 (DB consolidation) -> M2 (React SPA) -> M3 (token/mobile)
- docs/design/: agent-pipeline design docs with atomic tasks for M1-M3
- CLAUDE.md: workflow, doc map, commit conventions, review-notes briefing flow
- .gitignore: ignore local review-notes/
2026-06-12 15:37:17 +02:00
tliu93
636bb2b80b
Merge pull request 'add get public and storage feature' ( #6 ) from feature/public_ip into main
...
docker-image / build-and-push (push) Successful in 3m59s
pytest / test (push) Successful in 53s
Reviewed-on: #6
2026-04-29 13:16:58 +02:00
tliu93
eda49489e0
update reademe and docs
pytest / test (push) Successful in 56s
pytest / test (pull_request) Successful in 59s
2026-04-29 13:07:59 +02:00
tliu93
779e160b95
add ip change notification and refine sender display
pytest / test (push) Successful in 57s
pytest / test (pull_request) Successful in 54s
2026-04-29 13:03:12 +02:00
tliu93
3ea3498e58
add smtp module and testing
2026-04-29 12:11:10 +02:00
tliu93
5a420bd37b
add get public and storage feature
2026-04-29 11:45:49 +02:00
tliu93
a24e402d47
add grafana provisioning
pytest / test (push) Successful in 46s
2026-04-23 00:12:51 +02:00
tliu93
8565534b73
Merge pull request 'fix ci test' ( #5 ) from feature/add_separate_migration_container into main
...
pytest / test (push) Successful in 45s
docker-image / build-and-push (push) Successful in 3m40s
Reviewed-on: #5
2026-04-22 13:35:40 +02:00
tliu93
4acdd2dc60
fix ci test
pytest / test (push) Successful in 45s
pytest / test (pull_request) Successful in 44s
2026-04-22 13:31:26 +02:00
tliu93
c9af7530e5
Merge pull request 'change adoption to separate step' ( #4 ) from feature/add_separate_migration_container into main
...
pytest / test (push) Failing after 44s
docker-image / build-and-push (push) Successful in 3m40s
Reviewed-on: #4
2026-04-22 13:28:30 +02:00
tliu93
a76d6bfb71
change adoption to separate step
pytest / test (push) Failing after 46s
pytest / test (pull_request) Failing after 45s
2026-04-22 13:28:00 +02:00
tliu93
35aee79d93
Restore legacy poo inbound dispatch
pytest / test (push) Successful in 43s
docker-image / build-and-push (push) Successful in 3m38s
2026-04-20 23:33:57 +02:00
tliu93
b9e7f51d51
Split compose dev build from registry deploy
pytest / test (push) Successful in 44s
2026-04-20 23:16:13 +02:00
tliu93
94747c75dd
Align image publishing with repository path
pytest / test (push) Successful in 43s
docker-image / build-and-push (push) Successful in 3m37s
2026-04-20 23:05:27 +02:00
tliu93
7978a7e1e1
Add release Docker image workflow
pytest / test (push) Successful in 42s
docker-image / build-and-push (push) Successful in 3m42s
2026-04-20 22:18:54 +02:00
tliu93
e9e2034d30
Add Grafana to deployment compose
pytest / test (push) Successful in 40s
2026-04-20 20:50:46 +02:00
tliu93
aae8ca3b87
Merge pull request 'refactoring/new_python' ( #3 ) from refactoring/new_python into main
...
pytest / test (push) Successful in 41s
Reviewed-on: #3
2026-04-20 20:41:01 +02:00
tliu93
1805d5d8ea
Finalize first Python release
pytest / test (push) Successful in 40s
pytest / test (pull_request) Successful in 41s
2026-04-20 20:40:04 +02:00
tliu93
795c84f177
Stabilize auth tests in CI
pytest / test (push) Successful in 43s
2026-04-20 17:43:24 +02:00
tliu93
1ff426d2e9
Add pytest workflow
pytest / test (push) Failing after 2m18s
2026-04-20 17:38:32 +02:00
tliu93
fe0409dafe
Refine runtime config and redirect settings
2026-04-20 17:36:05 +02:00
tliu93
982af62f4f
Migrate TickTick OAuth and action tasks
2026-04-20 17:06:03 +02:00
tliu93
179aae264e
Persist runtime config in app db and seed from env
2026-04-20 15:56:10 +02:00
tliu93
3f7c9e43d9
Switch auth password hashing to Argon2
2026-04-20 15:26:36 +02:00
tliu93
e1aad408ab
Add auth foundation and app DB management
2026-04-20 15:16:47 +02:00
tliu93
044b47c573
Migrate poo recorder and align Alembic naming
2026-04-20 11:48:48 +02:00
tliu93
e334df992f
Add Home Assistant inbound gateway
2026-04-20 10:42:35 +02:00
tliu93
151ad46275
Add Home Assistant outbound adapter
2026-04-20 10:11:02 +02:00
tliu93
eb487ccb46
Track exported OpenAPI schema
2026-04-19 23:25:13 +02:00
tliu93
d0dc8e893a
Tighten location request validation
2026-04-19 23:18:20 +02:00
tliu93
1a2f9c75d9
Harden location db startup validation
2026-04-19 23:02:43 +02:00
tliu93
8aeb0723c1
Add location db adoption runbook
2026-04-19 21:57:31 +02:00
tliu93
32cc6847fd
Migrate location recorder and refine db config
2026-04-19 21:39:23 +02:00
tliu93
31390882ef
Bootstrap Python rewrite skeleton
2026-04-19 20:19:58 +02:00
tliu93
7818a3fb44
Revert coverage
Run short tests / run-tests (push) Failing after 44s
Run nightly tests / nightly-tests (push) Has been cancelled
2025-07-15 22:32:24 +02:00
tliu93
295c8f1589
see svg
Run short tests / run-tests (push) Failing after 1m9s
Run nightly tests / nightly-tests (push) Successful in 1m24s
2025-07-15 17:48:35 +02:00
tliu93
739497a853
try skip ci [skip ci]
2025-07-15 17:47:15 +02:00
tliu93
8da79514b8
Add badge readme
Run short tests / run-tests (push) Successful in 1m5s
Run nightly tests / nightly-tests (push) Successful in 1m23s
2025-07-15 17:44:39 +02:00
tliu93
872c7b356f
Merge pull request 'feature/improve_test_automation' ( #2 ) from feature/improve_test_automation into main
...
Run short tests / run-tests (push) Successful in 1m5s
Run nightly tests / nightly-tests (push) Successful in 1m37s
Reviewed-on: tliu93/home-automation-backend#2
2025-07-15 17:42:21 +02:00
tliu93
6fab12e7bd
upload artifacts v3
Run short tests / run-tests (push) Successful in 1m38s
Run short tests / run-tests (pull_request) Successful in 1m6s
2025-07-15 17:39:36 +02:00
tliu93
cbdc1295f2
Modify coverage upload
Run short tests / run-tests (push) Failing after 1m11s
2025-07-15 17:37:47 +02:00
tliu93
a7ae5d465c
try to upload coverage out
Run short tests / run-tests (push) Failing after 2m18s
2025-07-15 17:33:27 +02:00
tliu93
8df89d3478
schedule looks good now, run at 20 utc, so 21 cest.
Run short tests / run-tests (push) Successful in 1m15s
Run nightly tests / nightly-tests (push) Successful in 1m50s
2025-05-21 14:51:24 +02:00
tliu93
f97841b079
print working see with checkout
Run short tests / run-tests (push) Successful in 1m14s
Run nightly tests / nightly-tests (push) Successful in 1m40s
2025-05-21 14:41:44 +02:00
tliu93
17d2f4d1f5
test cron
Run short tests / run-tests (push) Successful in 1m15s
Run nightly tests / test-cron-job (push) Successful in 30s
2025-05-21 14:38:05 +02:00
tliu93
1aa6c7dac4
test cron at 1430
Run short tests / run-tests (push) Successful in 1m14s
Run nightly tests / run-tests (push) Successful in 1m41s
2025-05-21 14:24:22 +02:00
tliu93
da5bf43197
add push to main
Run short tests / run-tests (push) Successful in 1m14s
Run nightly tests / run-tests (push) Successful in 1m40s
2025-05-21 10:52:29 +02:00
tliu93
0d803f4b23
add nightly cron at 0am
Run short tests / run-tests (push) Successful in 1m38s
2025-05-20 15:22:30 +02:00
tliu93
fc4e0217b2
check if lable works
Run short tests / run-tests (push) Successful in 1m13s
Run nightly tests / run-tests (push) Successful in 1m36s
2025-05-20 15:20:07 +02:00
tliu93
d4db20be16
add nightly test template
Run nightly tests / run-tests (push) Failing after 13s
Run short tests / run-tests (push) Has been cancelled
2025-05-20 15:19:16 +02:00
tliu93
1041016210
Revert "change runner to linux"
...
Run short tests / run-tests (push) Has been cancelled
This reverts commit 99ed529600 .
2025-05-20 15:18:18 +02:00
tliu93
99ed529600
change runner to linux
Run short tests / run-tests (push) Failing after 12s
2025-05-20 15:16:58 +02:00
tliu93
f02bb1e6fb
Merge pull request 'feature/refactoring' ( #1 ) from feature/refactoring into master
...
Run short tests / run-tests (push) Successful in 1m58s
Reviewed-on: https://code.jamesvillage.dev/tliu93/home-automation-backend/pulls/1
2025-05-19 22:28:40 +02:00
tliu93
ccb70e3165
Use struct, idomatic go way to write homeassistant component and make it 100 test covered
Run short tests / run-tests (push) Successful in 1m2s
Run short tests / run-tests (pull_request) Successful in 1m2s
2025-05-19 22:20:05 +02:00
tliu93
0a76c5feca
wip
2025-05-19 20:25:53 +02:00
tliu93
234323c766
Add more tests for ha
Run short tests / run-tests (push) Successful in 1m1s
2024-10-23 13:53:29 +02:00
tliu93
2a1a40f75f
Rename ticktickutil, add interface for di
2024-10-22 16:40:19 +02:00
tliu93
f295779566
Add test structure
2024-10-22 14:09:51 +02:00
tliu93
269cedd70b
rename .github workflow
2024-10-21 11:14:48 +02:00
tliu93
6ded11a22f
Fix action
2024-10-18 17:15:31 +02:00
tliu93
ad6b7cdbc1
Starts adding tests and github workflow
2024-10-18 17:14:10 +02:00
tliu93
7a4b28fe01
Learn action file
2024-10-18 12:12:03 +02:00
tliu93
7d96a3e292
try action on this repo
2024-10-18 12:10:49 +02:00
tliu93
9c414d28ad
Add homeassistant to ticktick
2024-09-19 15:10:33 +02:00
tliu93
271368bf52
Ported to golang, only ticktick remaining
2024-09-18 17:19:31 +02:00
tliu93
d8d6c8bb35
Ported location recorder
2024-09-18 16:41:26 +02:00
tliu93
197b9a3d63
Revise float to str
2024-09-18 10:36:00 +02:00
tliu93
336485a309
Improve bidi sync between notion and db
2024-09-18 10:25:02 +02:00
tliu93
6280711f77
Add db notion bidirectional syncing
2024-09-17 23:22:58 +02:00
tliu93
47b906a477
remove db from source control
2024-09-17 21:21:31 +02:00
tliu93
bcba9f8a11
Poo recorder almost ported to go, needs to have perodically backup
2024-09-17 16:28:12 +02:00
tliu93
c357c533e3
Some working
2024-09-16 16:55:29 +02:00
tliu93
93d3f1113f
Skeleton of helper location recorder
2024-09-14 12:33:09 +02:00
tliu93
322905809c
Tool not using own notion lib anymore
2024-09-10 15:51:18 +02:00
tliu93
ea9c650f82
Start with go version
2024-09-10 10:08:12 +02:00
tliu93
af8b4db718
Update .gitignore
2024-09-09 17:05:20 +02:00
tliu93
1a1e8106ec
Start removing py files in this branch
2024-09-09 13:11:28 +02:00
tliu93
2e9d88c8a8
Add insert locations
2024-08-30 22:52:33 +02:00
tliu93
58b9f42799
Upgrade schema with nullable
2024-08-30 15:06:15 +02:00
tliu93
f1d8f53142
location fully covered
2024-08-29 14:47:18 +02:00
tliu93
b8faf975bf
db version
2024-08-28 22:53:58 +02:00
tliu93
28908255e7
Add tear down
2024-08-27 16:42:08 +02:00
tliu93
6d12f2850d
Update req
2024-08-27 16:35:27 +02:00
tliu93
b21b509c84
Add location recorder
2024-08-27 16:34:04 +02:00
tliu93
5a9b1fed44
rename
2024-08-27 11:01:14 +02:00
tliu93
01749367e8
Move temp data out
2024-08-26 16:49:38 +02:00
tliu93
fd9cf2ca66
Add helper to port notes data, imporve notion
2024-08-26 16:45:36 +02:00
tliu93
9a5fc701bb
Add location in poo record
2024-08-24 22:11:15 +02:00
tliu93
b7aaca1650
Change requests to async
2024-08-21 21:11:29 +02:00
tliu93
b9b8659347
Use webhook to publish automation trigger
2024-08-21 17:05:12 +02:00
tliu93
3eaae13dc3
Some renaming
2024-08-21 16:30:43 +02:00
tliu93
94ba832932
Add action task
2024-08-19 12:05:46 +02:00
tliu93
298faa6523
Update version
2024-08-16 23:30:54 +02:00
tliu93
b8e786cb2f
Add homeassistant
2024-08-16 23:29:59 +02:00
tliu93
1a27fc24cf
Add notion util
2024-08-16 16:57:25 +02:00
tliu93
06f7d50418
Add ticktick auth
2024-08-15 16:50:56 +02:00
tliu93
57c9111e05
Make notion use config get env
2024-08-15 14:51:33 +02:00