Refactor: rename ds component to search - #98
Conversation
Rename the ds (Deductive Search) component to search across the entire codebase: - Renamed ddss/ds.py -> ddss/search.py - Renamed ddss/ds.ts -> ddss/search.ts - Renamed tests/test_ds.py -> tests/test_search.py - Renamed tests/test_ds.ts -> tests/test_search.ts - Updated all imports and references in main.py, main.ts - Updated documentation in README.md, docs/en/*.md, docs/zh/*.md - Updated test descriptions and function names The dependency interface remains unchanged; only the component name is changed from ds to search.
There was a problem hiding this comment.
Pull request overview
This PR renames the ds (Deductive Search) component to search across the DDSS codebase, updating the implementation modules, CLI wiring, tests, and documentation to reflect the new component name.
Changes:
- Introduces
ddss/search.pyandddss/search.tsas the renamed Deductive Search component implementation. - Updates CLI component wiring/defaults in
ddss/main.pyandddss/main.tsfromdstosearch. - Renames and updates Python/TypeScript tests and updates English/Chinese documentation to reference
search.
Reviewed changes
Copilot reviewed 9 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
ddss/search.ts |
Adds the TypeScript implementation of the renamed search component. |
ddss/search.py |
Adds the Python implementation of the renamed search component. |
ddss/main.ts |
Switches CLI component mapping/defaults from ds to search. |
ddss/main.py |
Switches CLI component mapping/defaults from ds to search. |
tests/test_search.ts |
Renames and updates TS tests to import/describe search. |
tests/test_search.py |
Renames and updates Python tests to import/describe search. |
README.md |
Updates module and component references from ds to search. |
docs/en/usage.md |
Updates component selection docs to use search instead of ds. |
docs/en/modules.md |
Updates module list to reflect Search instead of DS. |
docs/zh/usage.md |
Updates component selection docs to use search instead of ds. |
docs/zh/modules.md |
Updates module list to reflect Search instead of DS. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| type ComponentMain = (addr: string, sequelize: Sequelize) => Promise<void>; | ||
|
|
||
| const componentMap: Record<string, ComponentMain> = { | ||
| ds, | ||
| search, | ||
| egg, |
There was a problem hiding this comment.
componentMap is typed as (addr: string, sequelize: Sequelize) => Promise<void>, but several component main functions (including the newly mapped search) are declared as main(sequelize: Sequelize). Since run() calls component(addr, sequelize), the first argument passed will be the address string, not a Sequelize instance. Consider standardizing component signatures to (addr, sequelize) (even if addr is unused) or adjusting run()/ComponentMain so the call order matches the actual function signatures.
Rename the ds (Deductive Search) component to search across the entire codebase:
The dependency interface remains unchanged; only the component name is changed from ds to search.