-
Notifications
You must be signed in to change notification settings - Fork 18
Closed
Description
The BokehSnapshotExtension.py file in pyopenms_viz/testing/ is responsible for handling Bokeh snapshot comparisons by extracting and validating JSON data from generated HTML files. However, there are some areas that could be improved to enhance accuracy, maintainability, and debugging:
Reasons for Improvement:
1️⃣ Inefficient JSON Comparison:
- The current method (
compare_json) relies on direct key-value checks but does not effectively handle unordered lists. - This can lead to false mismatches in cases where the structure is the same, but element order differs.
2️⃣ Uncontrolled Debugging Output:
- The function currently uses
printstatements for debugging. - Switching to Python’s
loggingmodule would allow better control over verbosity levels.
3️⃣ Lack of Unit Tests:
- There are no dedicated tests to verify Bokeh snapshot extraction and comparison.
- Adding tests using
pytestandsyrupywill improve reliability and prevent regressions.
4️⃣ Potential for Enhanced Serialization:
- Right now, only HTML is stored, but supporting raw Bokeh JSON snapshots could improve performance and debugging.
These improvements will make Bokeh snapshot testing more accurate, maintainable, and easier to debug. I would like to work on these changes to enhance the robustness of snapshot testing in the project.
Metadata
Metadata
Assignees
Labels
No labels