feat(adapter): implement JSON file storage adapter for issue #9 #24

Closed
shoko wants to merge 0 commits from feat/issue-6-storage-ports into main
Owner

Summary

Implement JSON file storage adapter that implements RoomStorage and TrackingStorage ports.

Changes

  • Add adapters/__init__.py and adapters/storage/__init__.py
  • Add adapters/storage/json_file.py with:
    • JsonFileRoomStorage - stores room data at ~/.jigaido/data/<room_id>.json
    • JsonFileTrackingStorage - stores tracking data at ~/.jigaido/tracking/<room_id>_<user_id>.json
  • Add comprehensive tests in tests/test_json_file_adapter.py

Testing

All 18 tests pass:

  • Protocol implementation verification
  • CRUD operations for rooms and bounties
  • CRUD operations for tracking
  • Persistence across storage instances

Fixes #9

## Summary Implement JSON file storage adapter that implements RoomStorage and TrackingStorage ports. ## Changes - Add `adapters/__init__.py` and `adapters/storage/__init__.py` - Add `adapters/storage/json_file.py` with: - `JsonFileRoomStorage` - stores room data at `~/.jigaido/data/<room_id>.json` - `JsonFileTrackingStorage` - stores tracking data at `~/.jigaido/tracking/<room_id>_<user_id>.json` - Add comprehensive tests in `tests/test_json_file_adapter.py` ## Testing All 18 tests pass: - Protocol implementation verification - CRUD operations for rooms and bounties - CRUD operations for tracking - Persistence across storage instances Fixes #9
shoko closed this pull request 2026-04-03 10:26:54 +02:00

Pull request closed

Sign in to join this conversation.