Increase test coverage to 100%
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Python
- Stars
- 1.3k
- Forks
- 128
- PR merge metrics
- No merged PRs in 30d
Description
Summary
Increase test coverage from 54% to 100% across all modules.
Current Coverage (as of 1.0)
| Module | Current | Target |
|---|---|---|
model/model.py |
77% | 100% |
migrations/schema/legacy_migrator.py |
81% | 100% |
migrations/schema/migrator.py |
47% | 100% |
model/cli/migrate.py |
53% | 100% |
model/cli/index.py |
17% | 100% |
model/cli/migrate_data.py |
24% | 100% |
migrations/data/migrator.py |
11% | 100% |
migrations/data/builtin/datetime_migration.py |
14% | 100% |
migrations/data/base.py |
38% | 100% |
model/query_resolver.py |
0% | 100% |
model/render_tree.py |
9% | 100% |
checks.py |
40% | 100% |
Overall: 54% → 100%
Priority Areas
High Priority (core functionality)
-
model/model.py- Core ORM logic -
migrations/schema/migrator.py- File-based migrations -
migrations/schema/legacy_migrator.py- Schema detection
Medium Priority (CLI)
-
model/cli/index.py- Index management CLI -
model/cli/migrate.py- Migration CLI -
model/cli/migrate_data.py- Data migration CLI
Lower Priority (utilities)
-
migrations/data/*- Data migration internals -
model/query_resolver.py- Query resolution -
model/render_tree.py- Tree rendering -
checks.py- Feature detection
Testing Approach
- Unit tests for pure functions and classes
- Integration tests with Redis (using testcontainers)
- CLI tests using Click's test runner
- Mock tests for error paths and edge cases
Notes
- All tests must use testcontainers, never localhost:6379
- Follow existing test patterns in
tests/ - Run
make syncafter adding tests to generate sync versions
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 by reviewing the existing patterns in tests/ and the listed modules, prioritizing model/model.py and migrations/schema/migrator.py. Add unit, Redis testcontainer integration, CLI, and error-path tests as appropriate; done means the listed modules reach 100% coverage, no tests use localhost:6379, and make sync generates synchronized tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, redis
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100