Repository navigation
Add processing.Comparator with Comparitor alias - #813
Conversation
tompollard
left a comment
There was a problem hiding this comment.
Thanks. Comparator and Comparitor are the same class, compare_annotations returns Comparator, objects built through the old name pass isinstance for both, subclasses of the old name still work, and old pickles referencing wfdb.processing.evaluate.Comparitor load (good to have that tested). The offline suite, Ruff and the strict docs build pass locally.
Optional: the old spelling is still used as a local variable name in demo.ipynb (comparitor = processing.compare_annotations(...), then .print_summary() and .plot()), which users see, and in the existing comparison tests in tests/test_processing.py. Renaming those to comparator would finish the job, but it doesn't affect behaviour.
Ready to merge once CI is green.
|
Thanks, I updated the comparison test variables and the notebook example to use |
Summary
Add
processing.Comparatoras the correctly spelled class name from #672. Keepprocessing.Comparitoras an alias to the same class, so existing imports and old pickle references still resolve.compare_annotationsnow returns the class under its new canonical name. Update the processing docs and examples.Refresh
demo.ipynbas a 17-cell offline walkthrough using the current reading and writing APIs. It covers headers, selected signals, annotations, expanded and multi-segment data, QRS comparison withComparator, and safe writes in a temporary directory. Optional PhysioNet access is shown separately. Remove the old saved outputs, repeated imports, and examples that wrote into the checkout. Update the README link and comparison test variable names.Verification
offline notebook code cell executed successfully.