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

@ -77,17 +77,27 @@ def test_add_nodes_duplicate_id_raises(qtbot) -> None: # type: ignore[no-untype
@pytest.mark.gui
def test_delete_node_cascades_to_elements(qtbot) -> None: # type: ignore[no-untyped-def]
vm = _vm()
vm.apply_command(AddNodesCommand(vm, [
Node(id=1, coords=(0, 0, 0)),
Node(id=2, coords=(1, 0, 0)),
Node(id=3, coords=(2, 0, 0)),
]))
vm.apply_command(
AddNodesCommand(
vm,
[
Node(id=1, coords=(0, 0, 0)),
Node(id=2, coords=(1, 0, 0)),
Node(id=3, coords=(2, 0, 0)),
],
)
)
# Add a material so the element is valid.
vm.project.materials.append(Steel01(id=1, Fy=420e6, E0=200e9, b=0.01))
vm.apply_command(AddElementsCommand(vm, [
TrussElement(id=1, nodes=(1, 2), area=1e-3, material_id=1),
TrussElement(id=2, nodes=(2, 3), area=1e-3, material_id=1),
]))
vm.apply_command(
AddElementsCommand(
vm,
[
TrussElement(id=1, nodes=(1, 2), area=1e-3, material_id=1),
TrussElement(id=2, nodes=(2, 3), area=1e-3, material_id=1),
],
)
)
# Delete node 2 → both elements should disappear.
vm.apply_command(DeleteNodesCommand(vm, {2}))
assert {n.id for n in vm.project.nodes} == {1, 3}
@ -102,10 +112,15 @@ def test_delete_node_cascades_to_elements(qtbot) -> None: # type: ignore[no-unt
@pytest.mark.gui
def test_set_restraint_round_trip(qtbot) -> None: # type: ignore[no-untyped-def]
vm = _vm()
vm.apply_command(AddNodesCommand(vm, [
Node(id=1, coords=(0, 0, 0)),
Node(id=2, coords=(1, 0, 0)),
]))
vm.apply_command(
AddNodesCommand(
vm,
[
Node(id=1, coords=(0, 0, 0)),
Node(id=2, coords=(1, 0, 0)),
],
)
)
fix = (True, True, True, True, True, True)
vm.apply_command(SetRestraintCommand(vm, {1, 2}, fix))
assert vm.project.node(1).restraint == fix