Added a string search option for HED (experimental)#1299
Merged
VisLab merged 2 commits intohed-standard:mainfrom Apr 7, 2026
Merged
Added a string search option for HED (experimental)#1299VisLab merged 2 commits intohed-standard:mainfrom
VisLab merged 2 commits intohed-standard:mainfrom
Conversation
|
Claude code review could not run. The request to the Claude API failed (possible causes: billing limit reached, token expired, or service unavailable). Review this PR manually. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces an experimental, schema-optional HED query engine (StringQueryHandler) that can evaluate the existing QueryHandler expression language directly against raw HED strings, plus supporting utilities and documentation.
Changes:
- Added
hed.models.string_searchwithStringQueryHandler, a lightweight string parser (parse_hed_string), and asearch_serieshelper for pandas Series. - Added
hed.models.schema_lookuputilities to precompute/persist a short-tag →tag_termslookup for ancestor search on short-form strings. - Added extensive unit tests and new documentation comparing
basic_search,QueryHandler, andStringQueryHandler, plus API doc wiring and exports.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
hed/models/string_search.py |
Implements lightweight parsing + duck-typed nodes to run QueryHandler expressions on raw strings. |
hed/models/schema_lookup.py |
Generates/saves/loads lookup tables to enable ancestor matching without a live schema object. |
hed/__init__.py |
Exposes the new search/lookup APIs at the package top level. |
tests/models/test_string_search.py |
Adds comprehensive behavioral tests for parsing and query semantics on raw strings. |
tests/models/test_schema_lookup.py |
Adds tests for lookup generation and JSON round-tripping and basic integration with StringQueryHandler. |
docs/search_implementation.md |
Documents tradeoffs and syntax differences across the three search approaches. |
docs/index.rst |
Adds the new documentation page to the docs TOC. |
docs/api/models.rst |
Adds API documentation entries for the new search and lookup utilities. |
|
Claude code review could not run. The request to the Claude API failed (possible causes: billing limit reached, token expired, or service unavailable). Review this PR manually. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.