chore: adopt remaining local development state

Catch-all for the intermixed residue of the unpushed otko-development
work ported into this tree: combinations/console-dock/quick-guide wiring
across commands, core, services, views and tests; repo-wide ruff-format
normalization; README/CONTRIBUTING updates; and the toolbar default
(both toolbars now open in the top area, quick guide text updated).

Splitting this further would require hunk-level surgery with low
confidence; the preceding commits in this branch isolate the
self-contained features.
This commit is contained in:
smillmorel 2026-09-16 12:03:22 -04:00
commit ba783718d4
152 changed files with 3394 additions and 1651 deletions

View file

@ -1,22 +1,30 @@
"""Shared pytest fixtures.
"""Shared pytest configuration.
`pytest-qt` automatically provides a `qtbot` fixture and a QApplication
instance. We add convenience fixtures here as the suite grows.
The GUI suite is headless by default: unless the caller already chose a
platform, ``QT_QPA_PLATFORM=offscreen`` is set here, before pytest-qt
builds its session ``QApplication``. An explicit caller value is respected.
OpenseesPy is a process-global singleton, so a lazy autouse guard wipes the
domain after every test. The import is inside the teardown so that
``tests/unit`` never imports the solver.
"""
from __future__ import annotations
import os
from collections.abc import Iterator
import pytest
os.environ.setdefault("QT_QPA_PLATFORM", "offscreen")
@pytest.fixture(autouse=True)
def _isolate_opensees() -> None:
"""Reset OpenSees domain between tests if openseespy is importable.
Imported lazily so that pure-core tests don't pull in the C++ runtime.
"""
def _wipe_opensees_domain() -> Iterator[None]:
"""Wipe the OpenseesPy domain after a test if the solver was imported."""
yield
try:
import openseespy.opensees as ops
except ImportError:
from openseespy.opensees import wipe
except Exception: # pragma: no cover - solver not installed / import side effects
return
ops.wipe()
wipe()