feat: add SciLogTable class for building HTML tables with custom colu… - #1042
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The refactor is well-contained, preserves existing behavior via shared helpers, and is backed by thorough unit tests covering correctness and edge cases.
Pull request overview
This PR refactors the SciLog “table” utility into a dedicated SciLogTable builder API, enabling user-friendly creation of custom HTML tables while reusing the same underlying rendering helpers for existing features (e.g., log_positions).
Changes:
- Added
SciLogTableas a reusable builder for HTML-escaped SciLog tables (columns/rows, optional title, cached rendering). - Extended
SciLogMessageServiceObjectwithadd_table()and table materialization on content consumption to support routing/sending paths. - Updated and expanded unit tests to cover HTML escaping, input validation, message ordering, caching behavior, and notification routing.
File summaries
| File | Description |
|---|---|
bec_lib/bec_lib/messaging_services.py |
Introduces SciLogTable, wires it into SciLog message objects via add_table(), and refactors position-table rendering to use the shared builder. |
bec_lib/tests/test_messaging_service.py |
Adds comprehensive tests for custom SciLog tables, escaping/validation, caching behavior, and notification routing. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
wakonig
force-pushed
the
feature/scilog_table
branch
from
September 8, 2026 10:54
46c54b9 to
3b725da
Compare
wakonig
force-pushed
the
feature/scilog_table
branch
from
September 8, 2026 12:03
3b725da to
b2f7483
Compare
wyzula-jan
approved these changes
Sep 8, 2026
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.
Description
Refactoring of the scilog table utility tools to expose a user-friendly wrapper for building custom tables for scilog. The log_positions method now uses the same helper methods underneath.
Definition of Done