Add year-over-year comparison chart mode #15

Merged
coding-agent-marvin8 merged 0 commits from refs/pull/15/head into main 2026-07-13 03:46:09 +00:00
coding-agent-marvin8 commented 2026-07-13 01:35:06 +00:00 (Migrated from codeberg.org)

Summary

  • Default backfill to ON in the Add Rain modal; document the coverage convention (every calendar day has an explicit record, 0.0 for dry days)
  • Add Comparison chart mode (cycle with m in monthly/yearly groupings): yearly view shows Jan 1 → today YTD bars per year; monthly view shows grouped bars with one cluster per month and one bar per year
  • +/- in comparison mode adjusts the number of prior years shown (capped at available data); scroll, bar-select, and edit are disabled in comparison mode
  • Add get_ytd_by_year() and get_monthly_comparison() DB methods
  • Update docs and Release-Notes for comparison mode

Test plan

  • uv run pytest tests/ -v — 92 tests, all passing
  • Launch TUI, press g to switch to monthly grouping, press m twice to reach Comparison — grouped bars render with legend
  • Switch to yearly grouping, verify Comparison shows one YTD bar per year
  • Press +/- to adjust number of years; verify cap at available data and minimum 1
  • Switch grouping to daily — verify mode resets to Rainfall automatically
  • Add a new record via n with backfill ON by default; verify dry days are filled with 0.0
## Summary - Default backfill to ON in the Add Rain modal; document the coverage convention (every calendar day has an explicit record, 0.0 for dry days) - Add Comparison chart mode (cycle with `m` in monthly/yearly groupings): yearly view shows Jan 1 → today YTD bars per year; monthly view shows grouped bars with one cluster per month and one bar per year - `+`/`-` in comparison mode adjusts the number of prior years shown (capped at available data); scroll, bar-select, and edit are disabled in comparison mode - Add `get_ytd_by_year()` and `get_monthly_comparison()` DB methods - Update docs and Release-Notes for comparison mode ## Test plan - [ ] `uv run pytest tests/ -v` — 92 tests, all passing - [ ] Launch TUI, press `g` to switch to monthly grouping, press `m` twice to reach Comparison — grouped bars render with legend - [ ] Switch to yearly grouping, verify Comparison shows one YTD bar per year - [ ] Press `+`/`-` to adjust number of years; verify cap at available data and minimum 1 - [ ] Switch grouping to daily — verify mode resets to Rainfall automatically - [ ] Add a new record via `n` with backfill ON by default; verify dry days are filled with 0.0
coding-agent-marvin8 commented 2026-07-13 02:12:28 +00:00 (Migrated from codeberg.org)

.pre-commit-config.yaml

The repository URL 'https://github.com/astral-sh/ty-pre-commit' appears suspicious...

🔴 ty is the official Astral type checker. The astral-sh/ty-pre-commit repo follows the same naming convention as astral-sh/ruff-pre-commit and astral-sh/uv-pre-commit. This is the correct hook.

[`.pre-commit-config.yaml`](https://codeberg.org/marvin8/rainlog/pulls/15#issuecomment-19102505) > The repository URL 'https://github.com/astral-sh/ty-pre-commit' appears suspicious... 🔴 `ty` is the official Astral type checker. The `astral-sh/ty-pre-commit` repo follows the same naming convention as `astral-sh/ruff-pre-commit` and `astral-sh/uv-pre-commit`. This is the correct hook.
coding-agent-marvin8 commented 2026-07-13 02:12:37 +00:00 (Migrated from codeberg.org)

.pre-commit-config.yaml

The value 'pylock.toml' is not a recognized format for uv export...

🔴 --format pylock.toml is a valid uv export format (added in uv 0.5+). This is an established project convention; pylock.toml is generated from uv.lock and committed alongside dependency changes.

[`.pre-commit-config.yaml`](https://codeberg.org/marvin8/rainlog/pulls/15#issuecomment-19102694) > The value 'pylock.toml' is not a recognized format for `uv export`... 🔴 `--format pylock.toml` is a valid `uv export` format (added in uv 0.5+). This is an established project convention; `pylock.toml` is generated from `uv.lock` and committed alongside dependency changes.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
marvin8/rainlog!15
No description provided.