Add __repr__ methods to core RedisVL classes
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Python
- Stars
- 427
- Forks
- 101
- Avg merge
- 6d 3h
- Merged PRs (30d)
- 20
Description
Summary
Add useful __repr__ implementations for core RedisVL classes to improve debugging and developer ergonomics.
Level: Beginner
Current State
- Core objects currently use default object repr output (
<Class object at 0x...>). - This makes notebook debugging, test output, and agent-generated diagnostics hard to read.
Proposed Change
- Add concise, deterministic
__repr__methods to:SearchIndex/AsyncSearchIndexinredisvl/index/index.pySemanticCacheinredisvl/extensions/cache/llm/semantic.pySemanticRouterinredisvl/extensions/router/semantic.pyMessageHistory/SemanticMessageHistoryinredisvl/extensions/message_history/
- Include only non-sensitive fields (name, prefix, storage type, counts).
Definition of Done
- Repr output is human-readable and stable.
- New unit tests verify expected repr strings.
make format,make check-types, and tests pass.
Out of Scope
- Changing runtime behavior or API signatures.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with redisvl/index/index.py, redisvl/extensions/cache/llm/semantic.py, redisvl/extensions/router/semantic.py, and the files under redisvl/extensions/message_history/. Add stable, human-readable repr coverage for the named classes using only non-sensitive fields, then add unit tests for the expected strings. Run make format, make check-types, and the test suite to confirm the definition of done.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, redis
- Domain
- backend, developer-experience
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100