Compare commits

...

6 Commits

Author SHA1 Message Date
David Perl 93e0f94e62 fix: migrate _convert_endpointinfo to public method 2026-06-19 17:03:45 +02:00
semantic-release 6dd3519dd5 3.17.2
Automatically generated by python-semantic-release
2026-06-19 10:49:18 +00:00
perl_d c9b6f5eced chore: rename buffered to managed 2026-06-19 12:48:24 +02:00
perl_d 4b7fd2aa42 chore: move benchmark to end of workflow 2026-06-19 12:48:24 +02:00
perl_d 65d743ab5e fix: qt redis connector for separated connector 2026-06-19 12:48:24 +02:00
wakonig_k 046e283dcf ci: do not close stale issues 2026-06-18 16:58:26 +02:00
6 changed files with 48 additions and 32 deletions
+9 -9
View File
@@ -34,15 +34,6 @@ jobs:
if: needs.check_pr_status.outputs.branch-pr == ''
uses: ./.github/workflows/formatter.yml
benchmark:
needs: [check_pr_status]
if: needs.check_pr_status.outputs.branch-pr == ''
permissions:
contents: write
issues: write
pull-requests: write
uses: ./.github/workflows/benchmark.yml
unit-test:
needs: [check_pr_status, formatter]
if: needs.check_pr_status.outputs.branch-pr == ''
@@ -92,3 +83,12 @@ jobs:
secrets:
GH_READ_TOKEN: ${{ secrets.GH_READ_TOKEN }}
benchmark:
needs: [check_pr_status, unit-test, unit-test-matrix]
if: needs.check_pr_status.outputs.branch-pr == ''
permissions:
contents: write
issues: write
pull-requests: write
uses: ./.github/workflows/benchmark.yml
+5 -5
View File
@@ -1,7 +1,7 @@
name: 'Close stale issues and PRs'
name: "Close stale issues and PRs"
on:
schedule:
- cron: '00 10 * * *'
- cron: "00 10 * * *"
workflow_dispatch:
jobs:
@@ -13,7 +13,7 @@ jobs:
steps:
- uses: actions/stale@v9
with:
stale-issue-message: 'This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 14 days.'
stale-pr-message: 'This PR is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 14 days.'
stale-issue-message: "This issue is stale because it has been open 120 days with no activity."
stale-pr-message: "This PR is stale because it has been open 120 days with no activity."
days-before-stale: 120
days-before-close: 14
days-before-close: -1
+21
View File
@@ -1,6 +1,27 @@
# CHANGELOG
## v3.17.2 (2026-06-19)
### Bug Fixes
- Qt redis connector for separated connector
([`65d743a`](https://github.com/bec-project/bec_widgets/commit/65d743ab5ec6b5d2842eeeefc021a1ab34e4b930))
### Chores
- Move benchmark to end of workflow
([`4b7fd2a`](https://github.com/bec-project/bec_widgets/commit/4b7fd2aa4254f7e80a493e1aa71b81f8ea48c3a3))
- Rename buffered to managed
([`c9b6f5e`](https://github.com/bec-project/bec_widgets/commit/c9b6f5ecedb89ba219a124e674a6cb9cf9ff6e35))
### Continuous Integration
- Do not close stale issues
([`046e283`](https://github.com/bec-project/bec_widgets/commit/046e283dcfd11c436c18ebd4f9fdb2147b64efd1))
## v3.17.1 (2026-06-18)
### Bug Fixes
+10 -16
View File
@@ -12,6 +12,7 @@ import redis
from bec_lib.client import BECClient
from bec_lib.logger import bec_logger
from bec_lib.redis_connector import MessageObject, RedisConnector
from bec_lib.redis_connector.managed_redis_connection import ManagedRedisConnection
from bec_lib.service_config import ServiceConfig
from qtpy.QtCore import QObject
from qtpy.QtCore import Signal as pyqtSignal
@@ -99,22 +100,11 @@ class QtThreadSafeCallback(QObject):
self.cb_signal.emit(msg_content, metadata)
class QtRedisConnector(RedisConnector):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
class QtManagedRedisConnection(ManagedRedisConnection):
def _execute_callback(self, cb, msg, kwargs):
if not isinstance(cb, QtThreadSafeCallback):
return super()._execute_callback(cb, msg, kwargs)
# if msg.msg_type == "bundle_message":
# # big warning: how to handle bundle messages?
# # message with messages inside ; which slot to call?
# # bundle_msg = msg
# # for msg in bundle_msg:
# # ...
# # for now, only consider the 1st message
# msg = msg[0]
# raise RuntimeError(f"
if isinstance(msg, MessageObject):
if isinstance(msg.value, list):
msg = msg.value[0]
@@ -132,6 +122,10 @@ class QtRedisConnector(RedisConnector):
cb(msg.content, msg.metadata)
class QtRedisConnector(RedisConnector):
connector_cls = QtManagedRedisConnection
class BECDispatcher:
"""Utility class to keep track of slots connected to a particular redis connector"""
@@ -217,7 +211,7 @@ class BECDispatcher:
self._registered_slots[qt_slot] = qt_slot
qt_slot = self._registered_slots[qt_slot]
self.client.connector.register(topics, cb=qt_slot, **kwargs)
topics_str, _ = self.client.connector._convert_endpointinfo(topics)
topics_str, _ = self.client.connector.extract_raw_endpoints_from_info(topics)
qt_slot.topics.update(set(topics_str))
else:
logger.warning(f"Attempted to create duplicate stream subscription for {topics=}")
@@ -246,7 +240,7 @@ class BECDispatcher:
if not self._registered_slots[connected_slot].topics:
del self._registered_slots[connected_slot]
def disconnect_topics(self, topics: Union[str, list]):
def disconnect_topics(self, topics: str | list):
"""
Disconnect all slots from a topic.
@@ -254,7 +248,7 @@ class BECDispatcher:
topics(Union[str, list]): The topic(s) to disconnect from
"""
self.client.connector.unregister(topics)
topics_str, _ = self.client.connector._convert_endpointinfo(topics)
topics_str, _ = self.client.connector.extract_raw_endpoints_from_info(topics)
remove_slots = []
for connected_slot in self._registered_slots.values():
+2 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "bec_widgets"
version = "3.17.1"
version = "3.17.2"
description = "BEC Widgets"
requires-python = ">=3.11"
classifiers = [
@@ -79,6 +79,7 @@ qtermwidget = ["pyside6_qtermwidget"]
[build-system]
+1 -1
View File
@@ -240,7 +240,7 @@ def test_qt_redis_connector_logs_rpc_before_qt_callback(monkeypatch):
)
try:
connector._execute_callback(cb, {"data": rpc_msg}, {})
connector._managed_connection._execute_callback(cb, {"data": rpc_msg}, {})
info_mock.assert_called_once()
info_message = info_mock.call_args.args[0]