feat: named case-result load combinations with full GUI support
Snapshots the current development tree, headlined by proper load combinations (user request): a reusable LoadCombination entity of weighted completed static-case results (e.g. 1.2xDead + 1.6xLive). - core: LoadCombination/LoadCombinationItem entities, Project integration (lookup, unique ids, reference validation) - services: combinations.py (linear superposition + envelope), exported via services __init__ - commands: undoable Add/Delete/Update for combinations - GUI: Load Combinations manager dialog, Run-dialog evaluation, envelope display in Results panel, Combinations tab in Table dock - tests: unit coverage (validation, math, error paths) + integration superposition check vs a single factored run
This commit is contained in:
commit
f361fee969
560 changed files with 178701 additions and 0 deletions
51
tests/unit/test_docs.py
Normal file
51
tests/unit/test_docs.py
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
"""Documentation gates — assert the user-facing docs keep their key content.
|
||||
|
||||
Pure pathlib; no Qt or solver imports so this stays part of the fast unit
|
||||
suite.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
REPO_ROOT = Path(__file__).resolve().parents[2]
|
||||
DOCS_DIR = REPO_ROOT / "docs"
|
||||
|
||||
|
||||
def _text(path: Path) -> str:
|
||||
"""Return a file's UTF-8 text with normalized line endings."""
|
||||
return path.read_text(encoding="utf-8").replace("\r\n", "\n")
|
||||
|
||||
|
||||
def test_quick_guide_exists_and_covers_core_topics() -> None:
|
||||
quick_guide = DOCS_DIR / "QUICK_GUIDE.md"
|
||||
assert quick_guide.is_file(), "docs/QUICK_GUIDE.md is missing"
|
||||
|
||||
lowered = _text(quick_guide).lower()
|
||||
for topic in ("cantilever", "report", "modal", "units", "undo"):
|
||||
assert topic in lowered, f"QUICK_GUIDE.md is missing {topic!r}"
|
||||
|
||||
|
||||
def test_contributing_describes_this_repo() -> None:
|
||||
text = _text(REPO_ROOT / "CONTRIBUTING.md")
|
||||
|
||||
for required in (
|
||||
"views",
|
||||
"viewmodels",
|
||||
"services",
|
||||
"core",
|
||||
"commands",
|
||||
"Conventional Commits",
|
||||
"feat:",
|
||||
"main",
|
||||
"pre-commit install",
|
||||
'pip install -e ".[gui,dev]"',
|
||||
"python -m otko",
|
||||
'pytest -m "not slow"',
|
||||
):
|
||||
assert required in text, f"CONTRIBUTING.md is missing {required!r}"
|
||||
|
||||
|
||||
def test_readme_links_quick_guide() -> None:
|
||||
readme = _text(REPO_ROOT / "README.md")
|
||||
assert "docs/QUICK_GUIDE.md" in readme
|
||||
Loading…
Reference in a new issue