Skip to content

Add string sample logs - #116

Open
alexhroom wants to merge 2 commits into
mainfrom
70-string-sample-logs
Open

alexhroom wants to merge 2 commits into
mainfrom
70-string-sample-logs

Conversation

@alexhroom

@alexhroom alexhroom commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

This PR adds the ability to filter sample logs which are strings. Fixes #70.

Also fixes a bug where sample log filters are filtered wrong in output files as apply_filters ignores whether the time filters are include or exclude, and adds some validation for sample logs when the filter is created rather than when it is calculated.

also now sorts sample log times. fixes #100

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Missing-value filters can return all data, and transition timestamps are incorrectly included.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds string sample-log filtering, validation, and corrected filter handling in histogram/output generation.

Changes:

  • Supports case-insensitive string predicates and HDF5 string logs.
  • Sorts and applies include/exclude ranges correctly.
  • Adds tests, plotting support, and documentation.
File summaries
File Description
src/test_utils.rs Adds mock sample-log creation.
src/stats.rs Propagates log-filter errors.
src/interface.rs Exposes string filtering.
src/filters/mod.rs Exports predicates.
src/filters/api.rs Adds string predicates and errors.
src/data/save/sample_logs.rs Saves and filters string logs.
src/data/sample_logs.rs Loads, filters, and sorts log ranges.
src/data/nexus_data.rs Returns string logs to Python.
src/batch_interface.rs Validates and applies string filters.
MNeuEventLib/plotting.py Plots categorical logs.
docs/source/how-to/filtering.ipynb Documents text filtering.
Review details
  • Files reviewed: 11/11 changed files
  • Comments generated: 2
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/batch_interface.rs
Comment thread src/data/sample_logs.rs
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.

SampleLog::apply_filters() assumes time filters are in chronological order, which they aren't String sample logs

2 participants