1
0
Fork
You've already forked rainlog
0

Add soil moisture index view to TUI #10

Manually merged
marvin8 merged 5 commits from feat/soil-moisture-tui into main 2026年07月01日 23:31:25 +02:00

Adds a soil moisture index view to the TUI, toggled with m. Uses an exponential-decay leaky-bucket model (decay=0.85, ≈4–5 day half-life) applied to daily rainfall totals to approximate soil moisture level for farm management decisions.

Changes

  • Database.get_moisture_index() — new DB method computing the leaky-bucket moisture time series, with the same grouping and pagination contract as get_rain
  • ChartMode enum and m key binding — toggles the bar chart and stats panel between rainfall and moisture views
  • Stats panel header — always shows current mode (Rain/Moisture) and grouping (Daily/Weekly/Monthly/Yearly)
  • Tentative moisture entries — _compute_tentative_moisture_entries generates decaying synthetic bars for days since the last DB record, showing soil drying in real time

Closes #9

Adds a soil moisture index view to the TUI, toggled with `m`. Uses an exponential-decay leaky-bucket model (decay=0.85, ≈4–5 day half-life) applied to daily rainfall totals to approximate soil moisture level for farm management decisions. ## Changes - `Database.get_moisture_index()` — new DB method computing the leaky-bucket moisture time series, with the same grouping and pagination contract as `get_rain` - `ChartMode` enum and `m` key binding — toggles the bar chart and stats panel between rainfall and moisture views - Stats panel header — always shows current mode (Rain/Moisture) and grouping (Daily/Weekly/Monthly/Yearly) - Tentative moisture entries — `_compute_tentative_moisture_entries` generates decaying synthetic bars for days since the last DB record, showing soil drying in real time Closes #9
marvin8 manually merged commit ab2423e8b0 into main 2026年07月01日 23:31:25 +02:00
marvin8 deleted branch feat/soil-moisture-tui 2026年07月01日 23:42:18 +02:00
Sign in to join this conversation.
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
marvin8/rainlog!10
Reference in a new issue
marvin8/rainlog
No description provided.
Delete branch "feat/soil-moisture-tui"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?