-
Notifications
You must be signed in to change notification settings - Fork 72
Add an SQL core #267
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
Add an SQL core #267
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
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 introduces a SQL-based caching core for Cachier, enabling use of SQLAlchemy backends alongside existing pickle, memory, and MongoDB options. Key changes include
- Implementation of a new
_SQLCoreclass insrc/cachier/cores/sql.py, with full CRUD and concurrency handling - Comprehensive test suite in
tests/test_sql_core.pyplus CI and requirements updates to run SQL-backed tests - Updates to
cachierdecorator, documentation inREADME.rst, and CI configurations to integrate the SQL backend
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_sql_core.py | Add end-to-end and edge-case tests for SQL core |
| src/cachier/cores/sql.py | Implement the _SQLCore class using SQLAlchemy |
| src/cachier/core.py | Wire in backend="sql" and sql_engine parameter |
| tests/sql_requirements.txt | Add SQLAlchemy and psycopg2 dependencies |
| README.rst | Document SQL core usage, schema, and limitations |
| .github/workflows/ci-test.yml | Extend CI matrix to run sql-marked tests |
| pyproject.toml | Register sql pytest marker and lint exceptions |
Comments suppressed due to low confidence (1)
tests/test_sql_core.py:64
- Consider adding a test for the
next_time=Truecase to verify that stale entries are returned immediately when thenext_timeflag is enabled.
next_time=False,
|
Ok, this is ready for a review. |
for more information, see https://pre-commit.ci
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.