Merged
Conversation
Contributor
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.
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 | |||
There was a problem hiding this comment.
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.
Comment on lines
+9
to
+27
| 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 |
There was a problem hiding this comment.
[nitpick] The pass statement is redundant when the class already has a docstring. Consider removing it to keep the code clean.
Suggested change
| 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.""" |
jacobhm98
reviewed
Jun 8, 2025
jacobhm98
reviewed
Jun 8, 2025
Co-authored-by: Jacob Hedén Malm <45039842+jacobhm98@users.noreply.github.com>
Contributor
|
Looks good, I agree with mr. claude! |
jacobhm98
reviewed
Jun 8, 2025
jacobhm98
approved these changes
Jun 8, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.