-
Notifications
You must be signed in to change notification settings - Fork 0
Implement cache-aside client #1
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
louiscb
commented
Jun 8, 2025
- Add the python sdk with compatibility towards the semcache server for cache-aside mode
- readme, comments and tests
- GitHub action for test
- MIT license
- Ready to publish on PyPI with settings in the pyproject.toml
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
Adds a new Python SDK for Semcache in cache-aside mode, including client implementation, docs, tests, CI actions, and packaging setup.
- Introduces
Semcacheclient withput/getmethods and custom exceptions. - Provides README documentation, MIT license, and development workflows.
- Adds development dependencies, Makefile tasks, and a GitHub Actions workflow for testing and linting.
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/semcache/exceptions.py | Defines a hierarchy of custom exceptions. |
| src/semcache/client.py | Implements Semcache client with put/get API. |
| src/semcache/init.py | Exposes client, exceptions, and version. |
| requirements-dev.txt | Lists development and runtime dependencies. |
| README.md | Adds installation, usage examples, and API docs. |
| Makefile | Adds commands for env setup, testing, and release. |
| MANIFEST.in | Includes license, README, and typing marker. |
| LICENSE | Adds MIT license with placeholder author. |
| .github/workflow/tests.yml | Adds CI workflow (incorrect directory). |
Comments suppressed due to low confidence (1)
LICENSE:3
- [nitpick] Replace the placeholder
[Your Name]with the actual author or organization name to ensure the license is correctly attributed.
Copyright (c) 2024 [Your Name]
| @@ -0,0 +1,39 @@ | |||
| name: Tests | |||
Copilot
AI
Jun 8, 2025
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.
GitHub workflows must live under .github/workflows/ (with an ‘s’). Please move this file into .github/workflows/tests.yml so the CI jobs run as intended.
| pass | ||
|
|
||
|
|
||
| class SemcacheConnectionError(SemcacheError): | ||
| """Raised when unable to connect to the Semcache server.""" | ||
|
|
||
| pass | ||
|
|
||
|
|
||
| class SemcacheTimeoutError(SemcacheError): | ||
| """Raised when a request to the Semcache server times out.""" | ||
|
|
||
| pass | ||
|
|
||
|
|
||
| class SemcacheAPIError(SemcacheError): | ||
| """Raised when the Semcache API returns an error response.""" | ||
|
|
||
| pass |
Copilot
AI
Jun 8, 2025
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.
[nitpick] The pass statement is redundant when the class already has a docstring. Consider removing it to keep the code clean.
| pass | |
| class SemcacheConnectionError(SemcacheError): | |
| """Raised when unable to connect to the Semcache server.""" | |
| pass | |
| class SemcacheTimeoutError(SemcacheError): | |
| """Raised when a request to the Semcache server times out.""" | |
| pass | |
| class SemcacheAPIError(SemcacheError): | |
| """Raised when the Semcache API returns an error response.""" | |
| pass | |
| class SemcacheConnectionError(SemcacheError): | |
| """Raised when unable to connect to the Semcache server.""" | |
| class SemcacheTimeoutError(SemcacheError): | |
| """Raised when a request to the Semcache server times out.""" | |
| class SemcacheAPIError(SemcacheError): | |
| """Raised when the Semcache API returns an error response.""" |
Co-authored-by: Jacob Hedén Malm <45039842+jacobhm98@users.noreply.github.com>
|
Looks good, I agree with mr. claude! |