Skip to content

feat: add SciLogTable class for building HTML tables with custom colu… - #1042

Merged
wakonig merged 1 commit into
mainfrom
feature/scilog_table
Sep 8, 2026
Merged

wakonig merged 1 commit into
mainfrom
feature/scilog_table

Conversation

@wakonig

@wakonig wakonig commented Sep 8, 2026

Copy link
Copy Markdown
Member

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

@wakonig
wakonig marked this pull request as ready for review September 8, 2026 08:08
Copilot AI lite review requested due to automatic review settings September 8, 2026 08:08
@wakonig wakonig self-assigned this Sep 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 SciLogTable as a reusable builder for HTML-escaped SciLog tables (columns/rows, optional title, cached rendering).
  • Extended SciLogMessageServiceObject with add_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.

@wakonig
wakonig requested a review from a team September 8, 2026 08:13
@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.70130% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
bec_lib/bec_lib/messaging_services.py 98.70% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@wakonig
wakonig force-pushed the feature/scilog_table branch from 46c54b9 to 3b725da Compare September 8, 2026 10:54
@wakonig
wakonig force-pushed the feature/scilog_table branch from 3b725da to b2f7483 Compare September 8, 2026 12:03
@wakonig
wakonig merged commit d3b8aab into main Sep 8, 2026
39 checks passed
@wakonig
wakonig deleted the feature/scilog_table branch September 8, 2026 15:26
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.

3 participants