Skip to content

Commit 29d7ec1

Browse files
committed
chore: update dependencies and enhance configuration options
- Upgraded pre-commit hooks and dependencies for improved code quality and consistency - Added support for Memcached and enhanced monitoring capabilities with Prometheus and StatsD - Introduced vector similarity search features and improved CLI functionality with CSV export options - Updated documentation to reflect new features, installation instructions, and configuration details - Released version 0.2.0 with significant enhancements and optimizations
1 parent e3b00d6 commit 29d7ec1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+10564
-415
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# Pull Request
2+
3+
## Description
4+
5+
Provide a clear and concise description of the changes introduced by this pull request. Include the problem addressed, the solution implemented, and any relevant context or background information.
6+
7+
## Type of Change
8+
9+
Please select the type of change that applies to this pull request:
10+
11+
- [ ] Bug fix (non-breaking change that resolves an issue)
12+
- [ ] New feature (non-breaking change that adds functionality)
13+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
14+
- [ ] Documentation update (improvements or additions to documentation)
15+
- [ ] Performance improvement
16+
- [ ] Code refactoring (no functional changes)
17+
- [ ] Build/CI changes
18+
- [ ] Other (please specify):
19+
20+
## Related Issues
21+
22+
List any related issues or tickets that are addressed by this pull request:
23+
24+
- Closes #
25+
- Fixes #
26+
- Related to #
27+
28+
## Changes Made
29+
30+
Provide a detailed list of the changes made:
31+
32+
-
33+
-
34+
-
35+
36+
## Testing
37+
38+
Describe the tests that have been performed to verify the changes. Include instructions for reproducing the issue and testing the fix or feature:
39+
40+
### Test Environment
41+
42+
- OS:
43+
- Python version:
44+
- Redis version:
45+
46+
### Test Cases
47+
- [ ] Unit tests pass
48+
- [ ] Integration tests pass
49+
- [ ] Manual testing performed
50+
- [ ] Performance testing (if applicable)
51+
52+
### Test Instructions
53+
54+
1.
55+
2.
56+
3.
57+
58+
## Documentation
59+
60+
- [ ] Code is properly documented with docstrings
61+
- [ ] README.md updated (if applicable)
62+
- [ ] API documentation updated (if applicable)
63+
- [ ] Examples updated (if applicable)
64+
- [ ] CHANGELOG.md updated
65+
66+
## Code Quality Checklist
67+
68+
- [ ] Code follows project coding standards
69+
- [ ] Self-review of code completed
70+
- [ ] Code is properly commented, particularly in complex areas
71+
- [ ] No new linting warnings introduced
72+
- [ ] Type hints added where appropriate
73+
- [ ] Error handling implemented appropriately
74+
75+
## Breaking Changes
76+
77+
If this PR introduces breaking changes, please describe:
78+
79+
1. What functionality is affected
80+
2. How users should migrate their code
81+
3. Any deprecation notices required
82+
83+
## Performance Impact
84+
85+
- [ ] No performance impact expected
86+
- [ ] Performance improvement expected
87+
- [ ] Performance regression possible (please explain)
88+
89+
## Security Considerations
90+
91+
- [ ] No security implications
92+
- [ ] Security review required
93+
- [ ] Introduces new dependencies (list them)
94+
95+
## Screenshots/Visual Changes
96+
97+
If applicable, add screenshots or describe visual changes:
98+
99+
## Additional Information
100+
101+
Provide any additional information that may be relevant to this pull request, such as:
102+
- Dependencies added or removed
103+
- Configuration changes required
104+
- Migration steps needed
105+
- Known limitations or issues
106+
107+
## Reviewer Notes
108+
109+
Any specific areas you'd like reviewers to focus on:
110+
111+
-
112+
-
113+
-

.pre-commit-config.yaml

Lines changed: 34 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,50 @@
11
repos:
2-
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.4.0
4-
hooks:
5-
- id: trailing-whitespace
6-
- id: end-of-file-fixer
7-
- id: check-yaml
8-
- id: check-added-large-files
9-
- id: check-merge-conflict
10-
- id: debug-statements
11-
122
- repo: https://github.com/psf/black
13-
rev: 23.7.0
3+
rev: 24.3.0
144
hooks:
155
- id: black
16-
language_version: python3.8
6+
args: [--line-length=88]
7+
language_version: python3
178

189
- repo: https://github.com/pycqa/isort
19-
rev: 5.12.0
10+
rev: 5.13.2
2011
hooks:
2112
- id: isort
22-
args: ["--profile", "black", "--check-only", "--diff"]
13+
args: [--profile=black, --line-length=88]
2314

2415
- repo: https://github.com/pycqa/flake8
25-
rev: 6.0.0
16+
rev: 7.0.0
2617
hooks:
2718
- id: flake8
28-
additional_dependencies: [flake8-docstrings]
19+
args: [--max-line-length=88, --extend-ignore=E203,E501,W503]
2920

3021
- repo: https://github.com/pre-commit/mirrors-mypy
31-
rev: v1.5.1
22+
rev: v1.10.0
3223
hooks:
3324
- id: mypy
34-
additional_dependencies: [types-PyYAML, types-redis]
35-
files: ^src/
25+
args: [--ignore-missing-imports, --no-strict-optional]
26+
additional_dependencies:
27+
- types-PyYAML
28+
- types-redis
29+
- types-click
30+
31+
- repo: local
32+
hooks:
33+
- id: pytest
34+
name: Run tests with pytest
35+
entry: pytest
36+
language: system
37+
pass_filenames: false
38+
args: [--tb=short, -v]
39+
40+
- repo: https://github.com/pre-commit/pre-commit-hooks
41+
rev: v4.5.0
42+
hooks:
43+
- id: trailing-whitespace
44+
- id: end-of-file-fixer
45+
- id: check-yaml
46+
- id: check-toml
47+
- id: check-merge-conflict
48+
- id: check-case-conflict
49+
- id: check-docstring-first
50+
- id: debug-statements

CHANGELOG.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,40 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Added
1111

12-
- Performance improvements and optimization features
12+
- Placeholder for future features
13+
14+
## [0.2.0] - 2024-01-15
15+
16+
### Added
17+
18+
- **Multi-Backend Architecture**: Support for Redis, Memcached, and in-memory backends with abstract interface
19+
- **Vector-Based Similarity Search**: Advanced semantic search using TF-IDF and cosine/euclidean/manhattan similarity
20+
- **Production Monitoring**: Prometheus and StatsD metrics integration for real-time monitoring and alerting
21+
- **CSV Export**: CLI support for exporting cache statistics to CSV format for analysis and reporting
22+
- **Enhanced CLI**: Improved command-line interface with file output, format options, and advanced search
23+
- **Professional Templates**: Pull request template and code of conduct for better project governance
24+
- **Memory Backend**: In-memory caching with LRU eviction, TTL support, and thread-safe operations
25+
- **Testing Infrastructure**: Comprehensive test suite with 200+ tests covering all features and edge cases
26+
- **Testing Guide**: Complete documentation for testing methodology and best practices
1327

1428
### Changed
1529

16-
- Enhanced error handling and logging capabilities
30+
- **Modular Backend System**: Refactored cache implementation to support pluggable backends with consistent API
31+
- **Enhanced Configuration**: Extended configuration options for multi-backend setup and monitoring integration
32+
- **Improved Documentation**: Updated README with comprehensive examples, feature descriptions, and testing info
33+
- **Development Workflow**: Added pre-commit hooks with black, isort, mypy, and pytest for code quality
34+
- **Professional Standards**: Removed emojis from documentation for enterprise-ready appearance
1735

1836
### Fixed
1937

20-
- Minor bug fixes and stability improvements
38+
- **DateTime Warnings**: Replaced deprecated `datetime.utcnow()` with timezone-aware alternatives
39+
- **Import Handling**: Improved graceful degradation when optional dependencies are not available
40+
- **Vector Search**: Corrected Manhattan distance calculation using proper sklearn functions
41+
- **Test Reliability**: Enhanced async test mocking and fixture management for consistent results
42+
43+
### Security
44+
45+
- **Dependency Management**: Updated and categorized optional dependencies for better security and maintenance
2146

2247
## [0.1.3] - 2025-08-22
2348

CODE_OF_CONDUCT.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Contributor Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
6+
7+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8+
9+
## Our Standards
10+
11+
Examples of behavior that contributes to a positive environment for our community include:
12+
13+
- Demonstrating empathy and kindness toward other people
14+
- Being respectful of differing opinions, viewpoints, and experiences
15+
- Giving and gracefully accepting constructive feedback
16+
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17+
- Focusing on what is best not just for us as individuals, but for the overall community
18+
19+
Examples of unacceptable behavior include:
20+
21+
- The use of sexualized language or imagery, and sexual attention or advances of any kind
22+
- Trolling, insulting or derogatory comments, and personal or political attacks
23+
- Public or private harassment
24+
- Publishing others' private information, such as a physical or email address, without their explicit permission
25+
- Other conduct which could reasonably be considered inappropriate in a professional setting
26+
27+
## Enforcement Responsibilities
28+
29+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
32+
33+
## Scope
34+
35+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
36+
37+
## Enforcement
38+
39+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT EMAIL]. All complaints will be reviewed and investigated promptly and fairly.
40+
41+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
42+
43+
## Enforcement Guidelines
44+
45+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
46+
47+
### 1. Correction
48+
49+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
50+
51+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
52+
53+
### 2. Warning
54+
55+
**Community Impact**: A violation through a single incident or series of actions.
56+
57+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
58+
59+
### 3. Temporary Ban
60+
61+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
62+
63+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
64+
65+
### 4. Permanent Ban
66+
67+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
68+
69+
**Consequence**: A permanent ban from any sort of public interaction within the community.
70+
71+
## Attribution
72+
73+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html).
74+
75+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
76+
77+
For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are available at [https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations).

0 commit comments

Comments
 (0)