Skip to content

Add top-level descriptions response field#20

Merged
shuchenliu merged 1 commit into
mainfrom
top-level-descriptions
May 28, 2026
Merged

Add top-level descriptions response field#20
shuchenliu merged 1 commit into
mainfrom
top-level-descriptions

Conversation

@shuchenliu
Copy link
Copy Markdown
Member

solve #12

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a top-level descriptions field to normalized node responses (when description=true) that aggregates all non-empty descriptions across equivalent identifiers, matching NodeNorm Redis behavior (issue #12).

Changes:

  • Replace the single-description extraction in create_normalized_node with a flattened, deduplicated list of all non-empty descriptions and expose it as descriptions while keeping the first one as id.description.
  • Change the default of include_descriptions from True to False in create_normalized_node (the only caller passes it explicitly).
  • Add pytest cases covering both the descriptions-enabled aggregation and the default-off behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/nodenorm/handlers/normalized_nodes.py Aggregates and deduplicates descriptions, adds top-level descriptions key, flips default of include_descriptions to False.
tests/test_normalized_nodes_lookup.py Adds tests verifying description aggregation and default suppression.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@shuchenliu shuchenliu merged commit 3291315 into main May 28, 2026
1 check passed
@shuchenliu shuchenliu deleted the top-level-descriptions branch May 28, 2026 23:42
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