Skip to content
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

CSC Review Fixes - expose delete functions, rename attribute names, add AbstractCache class #3110

Merged
merged 3 commits into from
Jan 15, 2024

Conversation

dvora-h
Copy link
Collaborator

@dvora-h dvora-h commented Jan 14, 2024

Pull Request check-list

Please make sure to review and check all of these items:

  • Do tests and lints pass with this change?
  • Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Is there an example added to the examples folder (if applicable)?
  • Was the change added to CHANGES file?

NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.

Description of change

Please provide a description of the change here.

@dvora-h dvora-h requested a review from chayim January 14, 2024 12:29
@codecov-commenter
Copy link

codecov-commenter commented Jan 14, 2024

Codecov Report

Attention: 88 lines in your changes are missing coverage. Please review.

Comparison is base (254c8c0) 92.06% compared to head (04229ac) 91.74%.

Files Patch % Lines
redis/connection.py 16.66% 25 Missing ⚠️
redis/asyncio/connection.py 16.66% 20 Missing ⚠️
redis/asyncio/client.py 14.28% 18 Missing ⚠️
redis/client.py 14.28% 18 Missing ⚠️
redis/_cache.py 73.07% 7 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3110      +/-   ##
==========================================
- Coverage   92.06%   91.74%   -0.33%     
==========================================
  Files         128      128              
  Lines       33220    33320     +100     
==========================================
- Hits        30583    30568      -15     
- Misses       2637     2752     +115     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

redis/_cache.py Outdated
@@ -160,7 +160,27 @@ class EvictionPolicy(Enum):
RANDOM = "random"


class _LocalCache:
class AbstractCache:
Copy link
Contributor

@chayim chayim Jan 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's docstring to help our users understand why and how to use it. Acorss functions

redis/_cache.py Outdated
@@ -160,7 +160,27 @@ class EvictionPolicy(Enum):
RANDOM = "random"


class _LocalCache:
class AbstractCache:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WDYT: Have a look at Abstract base classes, and maybe inherit from ABC?

Copy link
Contributor

@chayim chayim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This matches we we discussed with @vladvildanov and looks reasonable! Please consider making the cache truly abstract.

redis/_cache.py Outdated Show resolved Hide resolved
@dvora-h dvora-h merged commit 562152b into redis:master Jan 15, 2024
46 checks passed
vladvildanov pushed a commit that referenced this pull request Sep 27, 2024
…dd AbstractCache class (#3110)

* CSC review fixes

* cahnge cache_max_size default value

* use ABC and add docstring
vladvildanov pushed a commit that referenced this pull request Sep 27, 2024
…dd AbstractCache class (#3110)

* CSC review fixes

* cahnge cache_max_size default value

* use ABC and add docstring
vladvildanov pushed a commit that referenced this pull request Sep 27, 2024
…dd AbstractCache class (#3110)

* CSC review fixes

* cahnge cache_max_size default value

* use ABC and add docstring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants