Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
# Changelog

## 0.6.0

The Qt-free tier moved to [formbridge](https://github.com/OpenHCSDev/formbridge),
which pyqt-reactive now depends on (`formbridge>=0.1,<0.2`). Import each moved
module from `formbridge` with the same path; nothing is re-exported here.

Removed (now in formbridge): `forms.parameter_form_service`,
`forms.parameter_info_types`, `forms.parameter_type_utils` and the other
Qt-free form modules; `services.help_document`, `services.parameter_help_service`,
`services.function_pattern_code_document`, `services.window_code_document`,
`services.scope_token_service`, `services.pattern_data_manager`,
`services.async_operation_executor` and the other Qt-free services;
`protocols.form_config`, `codegen_provider`, `component_selection`,
`log_providers`, `preview_formatter`; `strategies`; `utils.preview_formatters`
and the log utilities; `core.path_cache`, `core.log_utils`,
`core.performance_monitor`, `core.sort_utils`; `flash_trace`,
`pattern_metadata`, `weak_events`; the Qt-free manager hooks in
`widgets.shared` (now `formbridge.managers`) and the scope colour strategy
(now `formbridge.theming`). The unused `animation.flash_trace` shim is deleted.

Changed:

- `UiThreadDispatcher` is the Qt delivery of formbridge's `MainThreadDispatcher`;
its errors are formbridge's `MainThreadDispatch*` errors.
- `services.window_snapshot` keeps the Qt capture service. The request,
frame condition and receipt types are formbridge's; each capture scope and
frame-observation kind has a registered Qt implementation
(`QtCaptureScope`, `QtFrameObservation`) instead of a callable stored in an
enum member.

Added:

- `bridge.windows`, `bridge.object_state_documents` and `bridge.host`: the Qt
window, widget-tree and snapshot projections and the ObjectState code-document
providers of formbridge's running-UI bridge. An application's main window
mixes in `UiBridgeHostWindow`.

## 0.5.0

Generic Qt machinery moved here from OpenHCS, with the application's choices
Expand Down
2 changes: 1 addition & 1 deletion docs/api/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Forms
``pyqt_reactive.forms.widget_strategies``
Nominal widget creation strategies.

``pyqt_reactive.forms.parameter_value_contracts``
``formbridge.forms.parameter_value_contracts``
Typed form contexts, parameter mappings, and widget values.

Services and protocols
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/list_item_preview_system.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ ordinary segments supplied by the owning manager or formatting service.
Preview policy and row controls
-------------------------------

``FormattingConfig`` in ``pyqt_reactive.strategies.preview_formatting`` owns
``FormattingConfig`` in ``formbridge.strategies.preview_formatting`` owns
shared display preferences, including detail visibility, collection formatting
and the default wrapping policy. Pass that declaration to the manager's
``set_preview_config()`` method to update formatting and layout together.
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/log_viewer_system.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ available.

.. code-block:: python

from pyqt_reactive.protocols.log_providers import (
from formbridge.protocols.log_providers import (
LogDiscoveryProviderABC,
ServerScanProviderABC,
register_log_discovery_provider,
Expand Down
6 changes: 3 additions & 3 deletions docs/architecture/server_scanning_and_polling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Server Scanning and Polling
Modules
-------

- ``pyqt_reactive.services.zmq_server_scan_service``
- ``pyqt_reactive.services.interval_snapshot_poller``
- ``pyqt_reactive.services.zmq_server_info``
- ``formbridge.services.zmq_server_scan_service``
- ``formbridge.services.interval_snapshot_poller``
- ``formbridge.services.zmq_server_info``

ZMQServerScanService
--------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/service-layer-architecture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ plugin families, or domain behavior.
Declaration-to-help projection
------------------------------

``pyqt_reactive.services.parameter_help_service`` is a Qt-free projection
``formbridge.services.parameter_help_service`` is a Qt-free projection
boundary shared by forms, help windows, and agent-facing consumers. It accepts a
callable, authored dataclass, or registered ObjectState lazy dataclass and
returns typed records such as ``DocstringInfo`` and ``ParameterHelpContent``.
Expand Down
4 changes: 2 additions & 2 deletions docs/architecture/service_registry.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Service registry
================

``pyqt_reactive.services.service_registry.ServiceRegistry`` is a type-keyed
``formbridge.services.service_registry.ServiceRegistry`` is a type-keyed
application assembly tool. Register an instance with ``register(type,
instance)`` and resolve that exact type with ``get(type)``. ``get`` returns
``None`` when a type is absent; callers that require a service should validate
that result at their boundary.

.. code-block:: python

from pyqt_reactive.services.service_registry import ServiceRegistry
from formbridge.services.service_registry import ServiceRegistry

ServiceRegistry.register(SearchProvider, search_provider)
provider = ServiceRegistry.get(SearchProvider)
Expand Down
4 changes: 2 additions & 2 deletions docs/architecture/system_monitor_core.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ System Monitor Core

**Framework-agnostic system monitoring core for CPU, RAM, GPU, and VRAM metrics.**

**Module**: ``pyqt_reactive.services.system_monitor_core``
**Module**: ``formbridge.services.system_monitor_core``

Overview
--------
Expand Down Expand Up @@ -52,7 +52,7 @@ Basic Usage

.. code-block:: python

from pyqt_reactive.services.system_monitor_core import SystemMonitorCore
from formbridge.services.system_monitor_core import SystemMonitorCore

# Create monitor with history length
monitor = SystemMonitorCore(history_length=300)
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/tree_aggregation_strategy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tree Aggregation Strategy
Module
------

``pyqt_reactive.strategies.tree_aggregation``
``formbridge.strategies.tree_aggregation``

Purpose
-------
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/zmq_server_browser_widget.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Related Infrastructure
for standard manager header/layout assembly
- ``pyqt_reactive.widgets.shared.tree_rebuild_coordinator``
for state-preserving rebuilds
- ``pyqt_reactive.services.zmq_server_scan_service``
- ``formbridge.services.zmq_server_scan_service``
for typed parallel ping scans

Design Outcome
Expand Down
2 changes: 1 addition & 1 deletion docs/archive/IMPLEMENTATION_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ if groupbox and hasattr(groupbox, 'title_layout'):
break

# Update reset button styling for ALL reset buttons
from pyqt_reactive.utils.styling_utils import update_reset_button_styling
from formbridge.utils.styling_utils import update_reset_button_styling
for field_name, reset_button in source.reset_buttons.items():
update_reset_button_styling(reset_button, source.state, source.field_id, field_name)
```
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/ui.rst
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ The generic service registry is keyed by a service type:

from abc import ABC, abstractmethod

from pyqt_reactive.services.service_registry import ServiceRegistry
from formbridge.services.service_registry import ServiceRegistry

class StatusSink(ABC):
@abstractmethod
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@ keywords = ["pyqt6", "forms", "reactive", "gui", "widgets", "dataclass"]

dependencies = [
"annotated-types>=0.7.0",
"docutils>=0.20",
"formbridge>=0.1,<0.2",
"magicgui>=0.7.0",
"metaclass-registry>=0.1.5",
"PyQt6>=6.4.0",
"objectstate>=2.0,<3",
"psutil>=5.9",
"Pygments>=2.15",
"pyzmq>=22.0",
"python-introspect>=0.2.6,<0.3",
"zmqruntime>=0.6,<0.7",
]
Expand Down
2 changes: 1 addition & 1 deletion requirements-ci.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Source candidates needed to validate this checkout before coordinated publication.
# Empty: every first-party dependency is released (objectstate 2.0.0, python-introspect 0.2.6).
# Empty: every first-party dependency is released (formbridge 0.1.0, objectstate 2.1.1, python-introspect 0.2.8).
2 changes: 1 addition & 1 deletion src/pyqt_reactive/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
- Cross-window reactive updates
"""

__version__ = "0.5.0"
__version__ = "0.6.0"

# Public API will be populated as modules are added
__all__ = [
Expand Down
6 changes: 3 additions & 3 deletions src/pyqt_reactive/animation/flash_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@

from objectstate.time_travel_profile import TimeTravelProfiler
from pyqt_reactive.animation.flash_config import FlashConfig, FlashPlayback, FlashPhase, get_flash_config
from pyqt_reactive.forms.layout_constants import default_container_corner_radius_px
from pyqt_reactive.services.window_snapshot import FlashPaintElement, FlashPaintFrame
from formbridge.forms.layout_constants import default_container_corner_radius_px
from formbridge.services.window_snapshot import FlashPaintElement, FlashPaintFrame

from ..flash_trace import flash_trace
from formbridge.flash_trace import flash_trace
from objectstate import ScopeKey


Expand Down
11 changes: 0 additions & 11 deletions src/pyqt_reactive/animation/flash_trace.py

This file was deleted.

Empty file.
30 changes: 30 additions & 0 deletions src/pyqt_reactive/bridge/host.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
"""The main window whose windows, panes and widgets a running-UI bridge introspects."""

from __future__ import annotations

from collections.abc import Mapping
from typing import TYPE_CHECKING, ClassVar

from formbridge.bridge.identities import UiStableWidgetIdentityDeclaration

if TYPE_CHECKING:
from PyQt6.QtWidgets import QWidget

from pyqt_reactive.widgets.shared.dock_layout import DockPanes


class UiBridgeHostWindow:
"""Mixin for an application's main window served by the UI bridge.

``window_specs`` maps each managed window id to a spec with ``window_id``
and ``title``; ``embedded_widgets`` holds the docked panes.
"""

UI_BRIDGE_WIDGET_IDENTITY: ClassVar[type[UiStableWidgetIdentityDeclaration]]
embedded_widgets: DockPanes
window_specs: Mapping[str, object]

def show_window(self, window_id: str, hide_if_startup: bool = True) -> QWidget:
"""Open or raise one managed window."""

raise NotImplementedError(f"{type(self).__name__} does not open managed windows.")
Loading
Loading