Skip to content

Normalize syncrule class names to Python style in from_document#40

Merged
stevevanhooser merged 1 commit into
mainfrom
claude/fix-ndi-time-syncrule-4znSb
Mar 17, 2026
Merged

Normalize syncrule class names to Python style in from_document#40
stevevanhooser merged 1 commit into
mainfrom
claude/fix-ndi-time-syncrule-4znSb

Conversation

@stevevanhooser

Copy link
Copy Markdown
Contributor

Summary

Updated the from_document method in ndi_time_syncrule to normalize syncrule class names to Python-style naming conventions before instantiation.

Key Changes

  • Added import of ndi_python_classname utility function from util.classname
  • Separated raw class name retrieval from normalization for clarity
  • Applied ndi_python_classname() to normalize the class name before use, ensuring consistent Python naming conventions (e.g., converting from other naming styles to snake_case or PascalCase as appropriate)

Implementation Details

The change ensures that syncrule class names stored in documents are properly normalized to Python naming conventions before being used for class instantiation, improving compatibility and consistency across different document sources.

https://claude.ai/code/session_01Aq4Kts1jXTv4curJgKjdRF

The ndi_syncrule_class field in documents uses MATLAB dot notation
(e.g. 'ndi.time.syncrule.filematch') but the class_map lookup used
Python underscore names. Normalize via ndi_python_classname before
lookup so documents from NDI-matlab resolve to the correct subclass.

https://claude.ai/code/session_01Aq4Kts1jXTv4curJgKjdRF
@stevevanhooser stevevanhooser merged commit 7137c33 into main Mar 17, 2026
5 checks passed
@stevevanhooser stevevanhooser deleted the claude/fix-ndi-time-syncrule-4znSb branch March 17, 2026 21:22
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