feat: add clickable BigLadder doc links to Inspector and SimSettings headers#876
Open
Ski90Moo wants to merge 1 commit into
Open
feat: add clickable BigLadder doc links to Inspector and SimSettings headers#876Ski90Moo wants to merge 1 commit into
Ski90Moo wants to merge 1 commit into
Conversation
…headers Add IddObjectDocUrl.hpp mapping 300+ OS IDD type names to EnergyPlus 25.1 Input/Output Reference URLs. InspectorGadget::layoutText() now renders IDD type headers as clickable hyperlinks in the right-sidebar inspector. Extend CollapsibleInspector to accept an optional URL parameter, and wire 15 section headers in SimSettingsView (plus the Run Period, Sizing Parameters, and Timestep H1 labels) to their respective BigLadder doc anchors. Closes openstudiocoalition#160 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the enhancement requested in #160 — adds clickable hyperlinks from IDD type headers and Simulation Settings section headers to the relevant EnergyPlus 25.1 Input/Output Reference pages on BigLadder Software.
src/model_editor/IddObjectDocUrl.hpp(new): header-only hash map (QHash<QString, QString>) mapping 300+OS:*IDD type names to their BigLadder EnergyPlus 25.1 I/O Reference URLssrc/model_editor/InspectorGadget.cpp: renders the locked IDD type header in the right-sidebar inspector as aQt::RichTexthyperlink when a URL mapping existssrc/openstudio_lib/CollapsibleInspector.hpp/.cpp: extendsCollapsibleInspector/CollapsibleInspectorHeaderwith an optional URL parameter; when set, the section title renders as a clickable linksrc/openstudio_lib/SimSettingsView.cpp: wires 15CollapsibleInspectorsection headers and the 3 top-level H1 labels (Run Period, Sizing Parameters, Timestep) to their BigLadder doc anchorsCoverage
Inspector gadget links cover most major OS object categories: zones, HVAC, coils, heat pumps, plant equipment, airflow, schedules, constructions/materials, controls, and more. Remaining categories (AirflowNetwork, Generators, EMS, etc.) are tracked for follow-up.
Test plan
scripts/check_doc_urls.py(to be added) to verify no stale anchor IDs — see notes belowNotes on stale-link checking
Two options were considered for a future automated check:
Option A (recommended): Python script —
scripts/check_doc_urls.pyparsesIddObjectDocUrl.hppandSimSettingsView.cppwith regex to extract every URL, fetches each BigLadder page once (deduplicating by page), parses the HTML to check that the anchor ID actually exists, and reports broken mappings with source location. No build step, runs standalone, can be a CI check or pre-commit hook.Option B: GTest — A
DocUrl_GTest.cppusingQNetworkAccessManagerthat iterates the hash map and checks each URL. Fits the existing test infrastructure but network tests are slow and flaky in CI, and GTest does not provide a natural way to fetch-and-parse HTML for anchor verification.Option A is preferred because the BigLadder server returns HTTP 200 for any anchor on an existing page — a plain HTTP HEAD check will silently miss renamed anchors. Verifying anchor IDs requires fetching the page HTML and scanning for
id="..."attributes. Python'srequests+html.parserhandles that cleanly in ~80 lines.Closes #160
🤖 Generated with Claude Code