Skip to content

Conversation

@louiscb
Copy link
Contributor

@louiscb 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

@louiscb louiscb requested review from Copilot and jacobhm98 June 8, 2025 20:14
Copy link

Copilot AI left a 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 Semcache client with put/get methods 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
Copy link

Copilot AI Jun 8, 2025

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.

Copilot uses AI. Check for mistakes.
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
Copy link

Copilot AI Jun 8, 2025

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.

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."""

Copilot uses AI. Check for mistakes.
@louiscb louiscb changed the title Add support for cache-aside client Implement for cache-aside client Jun 8, 2025
@louiscb louiscb changed the title Implement for cache-aside client Implement cache-aside client Jun 8, 2025
Co-authored-by: Jacob Hedén Malm <45039842+jacobhm98@users.noreply.github.com>
@jacobhm98
Copy link
Contributor

Looks good, I agree with mr. claude!

@louiscb louiscb merged commit e999263 into main Jun 9, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants