-
Notifications
You must be signed in to change notification settings - Fork 2
Switch adapters to using the protocol instead of stores #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors adapters to use the KVStoreProtocol interface instead of concrete store implementations, improving architectural consistency and flexibility. The changes also remove some methods from adapters that are not part of the core protocol.
- Switch adapter constructors to accept KVStoreProtocol instead of BaseKVStore
- Remove non-protocol methods (keys, ttl, clear_collection, list_collections, cull) from adapters
- Update documentation and version to reflect the protocol-focused approach
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/kv_store_adapter/adapters/pydantic.py | Updated to use KVStoreProtocol, renamed store parameter, removed non-protocol methods |
| src/kv_store_adapter/adapters/single_collection.py | Updated to use KVStoreProtocol, removed keys and ttl methods |
| tests/adapters/test_pydantic.py | Updated test fixtures to use new store_protocol parameter name |
| tests/adapters/test_single_collection.py | Removed tests for keys method that no longer exists |
| src/kv_store_adapter/stores/disk/store.py | Enhanced to accept Path objects in addition to strings |
| README.md | Updated documentation to reflect protocol-focused adapter design |
| pyproject.toml | Version bump to 0.1.1 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
No description provided.