Rename to rainlog, use XDG default DB location, add migrate command #8

Merged
coding-agent-marvin8 merged 0 commits from refs/pull/8/head into main 2026-07-01 06:20:52 +00:00
coding-agent-marvin8 commented 2026-07-01 05:13:32 +00:00 (Migrated from codeberg.org)

Closes #7

Summary

  • Renames package weather-toolsrainlog, Python package weather_toolsrainlog, CLI command rainrainlog
  • Changes default DB location to ~/.local/share/rainlog/rainlog.sqlite (XDG user data dir via platformdirs)
  • Renames DB file from MyWeather.sqlite to rainlog.sqlite; Database.__init__ auto-creates the directory on first use
  • Adds rainlog migrate [--db-dir PATH] to copy an existing MyWeather.sqlite to the new default location atomically

Test plan

  • Existing 56 tests pass after rename (Task 1)
  • 5 new tests in tests/test_defaults.py cover constants and directory auto-creation (Task 2)
  • 7 new tests in tests/test_migrate.py cover migrate happy path, source-missing error, destination-exists error, and legacy-filename check (Task 3)
  • nox -s complexipy passes (no functions exceed complexity threshold)
  • nox -s ruff passes
  • nox -s ty passes
Closes #7 ## Summary - Renames package `weather-tools` → `rainlog`, Python package `weather_tools` → `rainlog`, CLI command `rain` → `rainlog` - Changes default DB location to `~/.local/share/rainlog/rainlog.sqlite` (XDG user data dir via `platformdirs`) - Renames DB file from `MyWeather.sqlite` to `rainlog.sqlite`; `Database.__init__` auto-creates the directory on first use - Adds `rainlog migrate [--db-dir PATH]` to copy an existing `MyWeather.sqlite` to the new default location atomically ## Test plan - [ ] Existing 56 tests pass after rename (Task 1) - [ ] 5 new tests in `tests/test_defaults.py` cover constants and directory auto-creation (Task 2) - [ ] 7 new tests in `tests/test_migrate.py` cover migrate happy path, source-missing error, destination-exists error, and legacy-filename check (Task 3) - [ ] `nox -s complexipy` passes (no functions exceed complexity threshold) - [ ] `nox -s ruff` passes - [ ] `nox -s ty` passes
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!8
No description provided.