Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
3ac2709
Add CoolingWidget tests, fix test_video_refresh teardown crash
thusser Nov 16, 2026
c4efe2e
chore(deps-dev): bump ruff from 0.17.4 to 0.17.5
dependabot[bot] Nov 17, 2026
b6f20a9
chore(deps-dev): bump pyrefly from 1.4.0 to 1.4.1
dependabot[bot] Nov 17, 2026
b23665f
chore(deps-dev): bump pytest-asyncio from 1.4.1.post1 to 1.5.0
dependabot[bot] Nov 17, 2026
c6acdee
Merge pull request #265 from pyobs/dependabot/uv/develop/pyrefly-1.4.1
github-actions[bot] Nov 17, 2026
691e74b
Merge pull request #266 from pyobs/dependabot/uv/develop/pytest-async…
github-actions[bot] Nov 17, 2026
6a7481b
Merge pull request #264 from pyobs/dependabot/uv/develop/ruff-0.17.5
github-actions[bot] Nov 17, 2026
25ee7b8
chore(deps): bump pyobs-core from 2.24.0 to 2.28.3
dependabot[bot] Nov 24, 2026
554a0b6
chore(deps-dev): bump types-python-dateutil
dependabot[bot] Nov 24, 2026
0c21dd8
chore(deps): bump pyyaml from 6.0.3 to 6.0.4
dependabot[bot] Nov 24, 2026
24d684a
Merge pull request #268 from pyobs/dependabot/uv/develop/types-python…
github-actions[bot] Nov 24, 2026
a975de5
chore(deps-dev): bump pyrefly from 1.4.1 to 1.5.0
dependabot[bot] Nov 24, 2026
60842b7
Merge pull request #267 from pyobs/dependabot/uv/develop/pyobs-core-2…
github-actions[bot] Nov 24, 2026
cf1e9e9
Merge pull request #269 from pyobs/dependabot/uv/develop/pyyaml-6.0.4
github-actions[bot] Nov 24, 2026
776316b
chore(deps-dev): bump ruff from 0.17.5 to 0.17.6
dependabot[bot] Nov 24, 2026
6f0ca2d
Merge pull request #270 from pyobs/dependabot/uv/develop/pyrefly-1.5.0
github-actions[bot] Nov 24, 2026
e326125
chore(deps): bump pydantic from 2.14.3 to 2.14.4
dependabot[bot] Nov 24, 2026
7261a13
Merge pull request #272 from pyobs/dependabot/uv/develop/pydantic-2.14.4
github-actions[bot] Nov 24, 2026
ba6bbcc
Merge pull request #271 from pyobs/dependabot/uv/develop/ruff-0.17.6
github-actions[bot] Nov 24, 2026
75530b6
fix: limit height of weather warning label to 32px
thusser Nov 25, 2026
33af71c
v2.9.1
thusser Nov 25, 2026
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
6 changes: 6 additions & 0 deletions pyobs_gui/qt/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,12 @@
<property name="lineWidth">
<number>2</number>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>32</height>
</size>
</property>
<property name="text">
<string>!!! WARNING: weather module disabled !!!</string>
</property>
Expand Down
3 changes: 2 additions & 1 deletion pyobs_gui/qt/mainwindow_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
################################################################################
## Form generated from reading UI file 'mainwindow.ui'
##
## Created by: Qt User Interface Compiler version 6.11.2
## Created by: Qt User Interface Compiler version 6.12.0
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
Expand Down Expand Up @@ -85,6 +85,7 @@ def setupUi(self, MainWindow):
self.labelWeatherWarning.setFrameShape(QFrame.Shape.Box)
self.labelWeatherWarning.setFrameShadow(QFrame.Shadow.Plain)
self.labelWeatherWarning.setLineWidth(2)
self.labelWeatherWarning.setMaximumSize(QSize(16777215, 32))
self.labelWeatherWarning.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.labelWeatherWarning.setMargin(0)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "pyobs-gui"
version = "2.9.0"
version = "2.9.1"
description = "A remote GUI for pyobs"
authors = [{ name = "Tim-Oliver Husser", email = "thusser@uni-goettingen.de" }]
requires-python = ">=3.11"
Expand Down
50 changes: 50 additions & 0 deletions tests/test_coolingwidget.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
from types import SimpleNamespace
from unittest.mock import MagicMock

from pyobs.interfaces import CoolingState
from pyobs_gui.coolingwidget import CoolingWidget


def render(state: CoolingState) -> SimpleNamespace:
"""Run CoolingWidget.update_gui() against a stub, so that no Qt widget has to be created."""
stub = SimpleNamespace(
state=state,
labelStatus=MagicMock(),
labelPower=MagicMock(),
setEnabled=MagicMock(),
_status_text=CoolingWidget._status_text,
)
CoolingWidget.update_gui(stub) # type: ignore[arg-type]
return stub


def status(stub: SimpleNamespace) -> str:
return stub.labelStatus.setText.call_args.args[0] # type: ignore[no-any-return]


def test_idle() -> None:
stub = render(CoolingState(enabled=True, setpoint=-10.0, power=40))
assert status(stub) == "-10.0°C"
stub.labelPower.setText.assert_called_once_with("40%")


def test_ramping_down() -> None:
stub = render(CoolingState(enabled=True, setpoint=12.0, power=80, target=-10.0, ramping=True))
assert status(stub) == "12.0°C → -10.0°C"


def test_warming_while_off() -> None:
stub = render(CoolingState(enabled=False, setpoint=8.0, power=None, target=20.0, ramping=True))
assert status(stub) == "warming 8.0°C → 20.0°C"
stub.labelPower.clear.assert_called_once()


def test_off() -> None:
stub = render(CoolingState(enabled=False, setpoint=None, power=None))
assert status(stub) == "OFF"


def test_old_module_without_new_fields() -> None:
# a module on older pyobs-core sends no target/ramping, which deserialize to their defaults
stub = render(CoolingState(enabled=True, setpoint=-5.0, power=10))
assert status(stub) == "-5.0°C"
2 changes: 2 additions & 0 deletions tests/test_video_refresh.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import pytest
import pytest_asyncio
from PySide6 import QtWidgets
from pyobs.vfs import VirtualFileSystem

from pyobs_gui.guisignals import gui_signals
Expand Down Expand Up @@ -45,6 +46,7 @@ async def setup() -> AsyncIterator[tuple[VideoWidget, VirtualFileSystem, MagicMo
):
yield widget, widget.vfs, comm, warning # type: ignore[misc]
await widget.discard()
QtWidgets.QApplication.processEvents() # fire pending item-view timers while the widget is alive; Qt crashes on one that outlives it
widget.close()


Expand Down
Loading
Loading