feat: Add model cards documentation infrastructure#1210
Draft
feat: Add model cards documentation infrastructure#1210
Conversation
- Add Pydantic-based YAML schema for physics scheme model cards - Create RST generator with sphinx-design directives (tabs, cards, badges) - Generate 3 pilot model cards: narp (radiation), ohm (storage heat), stebbs (experimental storage heat) - Integrate bibliography citations using :cite: role - Add interactive scheme comparison widget with category filtering - Update meson.build to include model_cards package - Update Claude rules for conventions This is the foundational work for comprehensive scheme documentation in SUEWS. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
CI Build PlanChanged FilesBuild system (1 file)
Documentation (32 files)
Build Configuration
Rationale
Updated by CI on each push. See path-filters.yml for category definitions. |
Preview Deployed
Note This preview is ephemeral. It will be lost when:
To restore, push any commit to this PR. |
Avoids ambiguity with monetary cost. Updates schema field, YAML cards, badge labels, and comparison widget. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Single 'demand' badge was ambiguous. Now two independent fields: - computational_demand: runtime cost per timestep - data_preparation_demand: effort to gather input parameters Values for pilot cards: - narp: compute low, data prep low - ohm: compute low, data prep medium (needs calibrated coefficients) - stebbs: compute medium, data prep high (needs building thermal properties) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Column headers in the comparison widget now link to the individual model card pages for easy navigation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Complete the model cards documentation with YAML cards and generated RST pages for all scheme tiers: - Tier 1 (13 cards): narp, spartacus, beers, ohm, ehc, dyohm, stebbs, qf, biogen_co2, rsl, roughness, stability, lumps - Tier 2 (7 cards): snow, smd, water_use, gs_model, fai, ohm_inc_qf, same_albedo - Tier 3 (2 deprecated): anohm, estm Each card documents identity, scientific basis, evaluation evidence, technical characteristics, operational status, user guidance, and governance. RST generator produces per-card pages, category indices, and an interactive comparison widget. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace flat bullet-list index with sphinx-design tab-set grouped by enum_class. Each tab shows a card grid with badges and descriptions. Multi-value YAML cards are expanded into per-option cards using enum docstrings (e.g. StabilityMethod shows 3 separate cards), while toggle enums (On/Off) remain as single cards. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
|
Dependency note: The model cards index currently organises schemes by Once #972 introduces sub-options for model physics options, we can restructure the index to reflect the sub-category hierarchy rather than the current flat enum-class grouping. Blocked by: #972 |
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
Introduces a comprehensive model cards system for all 22 SUEWS physics schemes, with a tabbed index page organised by enum class and an interactive comparison widget.
Key Changes
src/supy/model_cards/_schema.py— Pydantic-based YAML schema covering identity, scientific basis, evaluation, technical characteristics, operational status, and user guidancedocs/generate_model_cards_rst.py— produces sphinx-design cards, tabs, badges, and embedded HTML/JS comparison widgetenum_classin a tab-set layout; multi-value cards expanded into per-option cards using enum docstrings (e.g. StabilityMethod shows 3 separate cards for each formulation); toggle enums (On/Off) kept as single cardsDependencies
This PR provides a working prototype of the model cards UI. The current organisation (flat enum-class grouping) is a temporary structure — the proper hierarchical sub-category grouping depends on #972, which introduces sub-options for model physics options.
Test Plan
make test-smokepasses (13 passed, 2 skipped)🤖 Generated with Claude Code