Commit abc30a4
committed
Add client-side database sync infrastructure (#418)
Add openlifu.cloud module for bidirectional sync between local OpenLIFU
databases and the cloud API (api.openwater.health). Introduces a REST
API client layer with typed DTOs for all entity types (subjects,
sessions, protocols, systems, transducers, volumes, runs, solutions,
users, photoscans). Sync engine uses a component tree
(AbstractComponent) with per-entity-type subclasses, a debounced worker
thread (SyncThread), filesystem watching via watchdog, and
WebSocket-based push notifications for real-time cloud-to-local
updates. Volumes and photoscans are download-only (pulled from cloud
then deleted server-side); all other entities sync bidirectionally.
Adds watchdog and python-socketio[client] dependencies.
Squashed commit of the following:
commit c11402d
Author: Pavel Osnova <pvosnova@gmail.com>
Date: Mon Feb 23 10:43:55 2026 +0200
fix: endless sync loop
commit 3894d67
Author: dev-et <dev-et>
Date: Fri Feb 20 18:15:26 2026 -0800
Set daemon to false
commit 565ef1c
Author: Pavel Osnova <pvosnova@gmail.com>
Date: Fri Feb 20 18:12:35 2026 +0200
fix: don't delete photoscans on cloud
commit 871188e
Author: Pavel Osnova <pvosnova@gmail.com>
Date: Fri Feb 20 13:10:32 2026 +0200
fix: download only finished photoscans
commit 7f490c2
Author: Pavel Osnova <pvosnova@gmail.com>
Date: Fri Feb 20 12:51:23 2026 +0200
fix: don't sync photocollections and don't upload volumes to cloud
commit 54cb278
Author: dev-et <dev-et>
Date: Thu Feb 19 21:59:55 2026 -0800
Disable daemon for sync thread
commit 6e91aa4
Author: Pavel Osnova <pvosnova@gmail.com>
Date: Thu Feb 19 15:36:55 2026 +0200
fix: getting MAC address on Windows
commit f3c104e
Author: Pavel Osnova <pvosnova@gmail.com>
Date: Thu Feb 19 10:27:20 2026 +0200
fix: disable photocollections sync
commit 63c2900
Author: dev-et <dev-et>
Date: Wed Feb 18 10:08:06 2026 -0800
Add temporary hardcoded mac address
commit 2b07ec9
Author: Pavel Osnova <pvosnova@gmail.com>
Date: Wed Feb 18 13:57:25 2026 +0200
fix: resolve lint errors
commit 9d41092
Author: Pavel Osnova <pvosnova@gmail.com>
Date: Wed Feb 18 13:17:29 2026 +0200
fix: resolve lint errors
commit 1edb8a5
Author: dev-et <dev-et>
Date: Mon Feb 16 21:03:25 2026 -0800
Add exception handling for errorous files
commit 7d4e84b
Author: dev-et <dev-et>
Date: Mon Feb 16 01:37:06 2026 -0800
Bug fixes, add additional logging, fix deadlock in sync_thread
commit d8f2894
Author: Pavel Osnova <pvosnova@gmail.com>
Date: Fri Feb 13 15:19:33 2026 +0200
One way sync for volumes, photocollections and photoscans and delete them on cloud after sync.
commit 174ba08
Author: Pavel Osnova <pvosnova@gmail.com>
Date: Fri Feb 13 12:07:48 2026 +0200
Fixes photocollection sync when photo added locally
commit 366ef47
Author: Pavel Osnova <pvosnova@gmail.com>
Date: Fri Feb 13 11:50:10 2026 +0200
Don't block the main thread when stopping the cloud
commit a28c622
Author: Pavel Osnova <pvosnova@gmail.com>
Date: Thu Feb 12 13:34:54 2026 +0200
Fixes sync error
commit 20da259
Author: dev-et <dev-et>
Date: Mon Feb 9 13:09:39 2026 -0800
Fix NameError: name 'AbstractComponent' is not defined exception
commit 08731b8
Author: Pavel Osnova <pvosnova@gmail.com>
Date: Fri Feb 6 16:51:15 2026 +0200
Don't delete database owner automatically when sync library stops
commit 20d7a48
Author: Pavel Osnova <pvosnova@gmail.com>
Date: Fri Feb 6 15:10:06 2026 +0200
Photoscans sync
commit 253dc32
Author: Pavel Osnova <pvosnova@gmail.com>
Date: Fri Feb 6 12:47:46 2026 +0200
Synchronization fixes
commit d84c2d0
Author: Pavel Osnova <pvosnova@gmail.com>
Date: Thu Feb 5 18:25:17 2026 +0200
Synchronization of sessions, volumes, photocollections, runs and solutions
commit 75103b3
Author: Pavel Osnova <pvosnova@gmail.com>
Date: Mon Feb 2 11:17:32 2026 +0200
update API URL
commit 8c01179
Author: Pavel Osnova <pvosnova@gmail.com>
Date: Fri Jan 30 12:21:45 2026 +0200
initial cloud library1 parent 4ff3be8 commit abc30a4
36 files changed
Lines changed: 2457 additions & 0 deletions
File tree
- src/openlifu/cloud
- api
- components
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
| |||
Whitespace-only changes.
Whitespace-only changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
0 commit comments