Repository navigation
filename2epochid: read the DAQ systems' live epoch tables, as MATLAB does - #350
Merged
Merged
Conversation
…does filename2epochid read daqsystem.epoch_table out of stored daq_system documents. No schema has that field, so it returned nothing for every filename. It now mirrors +ndi/+fun/+epoch/filename2epochid.m: load the session's DAQ systems (daqsystem_load) and match each filename as a substring of every epoch's underlying_epochs['underlying'] in the live epochtable(). Several filenames can name one epoch (NDI-matlab 774a01f71), a single filename string is accepted, and filenames no epoch claims raise a warning, as in MATLAB. The dict-of-lists return shape is kept. Bridge decision_log updated; tests added. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011v7R5uJJtaq8SVB4eEwnBR
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.
Problem
ndi.fun.epoch.filename2epochidreaddaqsystem.epoch_tablefrom storeddaq_systemdocuments. No document schema has that field, and nothing writes one, so the function returned nothing for every filename.epochid2elementhad the same defect and was fixed earlier.Change
This now matches
+ndi/+fun/+epoch/filename2epochid.m:session.daqsystem_load()and asks each DAQ system for its liveepochtable().underlying_epochs['underlying']files (MATLAB'scontains).dict[str, list[str]].Bridge
INTERFACE UPDATE: the
filename2epochidentry insrc/ndi/fun/ndi_matlab_python_bridge.yamlnow has a rewrittendecision_logand acceptslist[str] | str. The siblingepochid2elemententry no longer says this defect is still open.Tests
The fictional-schema test in
tests/test_fun.pyis replaced with tests that use mock DAQ systems. They cover a basic match, a single string with several systems, several filenames naming one epoch, the warning for an unmatched filename, and a session with no DAQ systems.black --check,ruff checkand the fullpytest tests/all pass. The bridge tests also pass when run against a full NDI-matlab checkout.Generated by Claude Code