Skip to content

Refactor: rename ds component to search - #98

Merged
hzhangxyz merged 1 commit into
mainfrom
refactor-ds-to-search
Mar 11, 2026
Merged

Refactor: rename ds component to search#98
hzhangxyz merged 1 commit into
mainfrom
refactor-ds-to-search

Conversation

@hzhangxyz

Copy link
Copy Markdown
Member

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.

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.
Copilot AI review requested due to automatic review settings March 11, 2026 15:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.py and ddss/search.ts as the renamed Deductive Search component implementation.
  • Updates CLI component wiring/defaults in ddss/main.py and ddss/main.ts from ds to search.
  • 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.

Comment thread ddss/main.ts
Comment on lines 14 to 18
type ComponentMain = (addr: string, sequelize: Sequelize) => Promise<void>;

const componentMap: Record<string, ComponentMain> = {
ds,
search,
egg,

Copilot AI Mar 11, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
@hzhangxyz
hzhangxyz merged commit 5fb7d65 into main Mar 11, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants