1
0
Fork
You've already forked rainlog
0

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

Manually merged
marvin8 merged 6 commits from feat/issue-7-rainlog-rename-xdg-migrate into main 2026年07月01日 08:20:52 +02:00

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
marvin8 approved these changes 2026年07月01日 07:54:07 +02:00
Dismissed
marvin8 dismissed marvin8's review 2026年07月01日 08:00:51 +02:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

🐛 defer initial data load and resize refresh until after Textual layout
All checks were successful
ci/woodpecker/pr/checks Pipeline was successful
cf4f9e4744
marvin8 manually merged commit 3efe408ed3 into main 2026年07月01日 08:20:52 +02:00
marvin8 deleted branch feat/issue-7-rainlog-rename-xdg-migrate 2026年07月01日 08:22:33 +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!8
Reference in a new issue
marvin8/rainlog
No description provided.
Delete branch "feat/issue-7-rainlog-rename-xdg-migrate"

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?