-
Notifications
You must be signed in to change notification settings - Fork 125
Constraints #1072
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Constraints #1072
Conversation
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughThe changes introduce a case constraints documentation generation system that parses the CaseValidator to extract validation rules, infers execution stages, and generates formatted Markdown documentation. A new Python script analyzes the validator AST, a shell script orchestrates generation, and build system integration ensures the documentation is built and uploaded as an artifact. Changes
Sequence Diagram(s)sequenceDiagram
participant Build as Build System<br/>(CMake)
participant Script as gen_constraints.sh
participant Analyzer as gen_case_constraints_docs.py
participant Validator as case_validator.py
participant Examples as examples/
participant Output as case_constraints.md
Build->>Script: Execute with repo_root
Script->>Analyzer: Run Python script
Analyzer->>Validator: Parse AST to extract<br/>validator methods & rules
Analyzer->>Analyzer: Build call graph<br/>from methods
Analyzer->>Analyzer: Compute stage inference<br/>via DFS from ROOT roots
Analyzer->>Analyzer: Classify rule messages<br/>(requirement/incompatibility/range/other)
Analyzer->>Examples: Validate playbook<br/>example existence
Analyzer->>Examples: Load case parameters<br/>from each example
Analyzer->>Analyzer: Generate playbook cards<br/>with feature summaries
Analyzer->>Analyzer: Render markdown with<br/>compatibility matrix,<br/>rules, playbook
Analyzer->>Output: Write Markdown
Script->>Script: Print success message
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings, 1 inconclusive)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
docs/Doxyfile.in
Outdated
| HTML_EXTRA_STYLESHEET = @DOXYGEN_HTML_EXTRA_STYLESHEET@ \ | ||
| @CMAKE_SOURCE_DIR@/docs/custom-dark-fixes.css |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add missing custom stylesheet for docs build
Doxyfile now tells Doxygen to include docs/custom-dark-fixes.css via HTML_EXTRA_STYLESHEET, but that file does not exist anywhere in the tree (find docs -name custom-dark-fixes.css returns nothing). Doxygen treats missing extra stylesheets as an error, so generating the documentation (e.g., via the updated docs workflow running cmake ... -D MFC_DOCUMENTATION=ON/ninja -C build install) will fail as soon as this tag is processed.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds automated documentation generation for MFC case parameter constraints and a case design playbook with curated examples. The system parses case_validator.py using AST analysis to extract validation rules and generates comprehensive user-friendly documentation in Markdown format.
Key Changes:
- New Python script that performs AST analysis to extract constraint rules from validation code
- Automated generation of case constraints documentation integrated into the CMake build system
- Case design playbook featuring 9 curated working examples from beginner to advanced levels
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
toolchain/mfc/gen_case_constraints_docs.py |
New Python script that analyzes case_validator.py using AST to extract validation rules and generates comprehensive Markdown documentation with compatibility tables and configuration examples |
docs/gen_constraints.sh |
Bash script that invokes the Python documentation generator and outputs to case_constraints.md |
CMakeLists.txt |
Integrates constraints documentation generation into the build system with proper dependencies on case_validator.py and example files |
docs/documentation/case.md |
Adds reference to the new Feature Compatibility Guide at the top of the parameters section |
docs/Doxyfile.in |
Adds custom-dark-fixes.css to HTML_EXTRA_STYLESHEET (file doesn't exist - critical issue) |
.gitignore |
Adds generated case_constraints.md to ignore list as a build artifact |
.github/workflows/docs.yml |
Adds artifact upload step for built documentation to aid debugging and verification |
docs/Doxyfile.in
Outdated
| HTML_EXTRA_STYLESHEET = @DOXYGEN_HTML_EXTRA_STYLESHEET@ \ | ||
| @CMAKE_SOURCE_DIR@/docs/custom-dark-fixes.css |
Copilot
AI
Dec 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file @CMAKE_SOURCE_DIR@/docs/custom-dark-fixes.css is referenced but does not exist in the repository. This will cause the documentation build to fail or produce warnings. Either create this file or remove this line from the HTML_EXTRA_STYLESHEET configuration.
| HTML_EXTRA_STYLESHEET = @DOXYGEN_HTML_EXTRA_STYLESHEET@ \ | |
| @CMAKE_SOURCE_DIR@/docs/custom-dark-fixes.css | |
| HTML_EXTRA_STYLESHEET = @DOXYGEN_HTML_EXTRA_STYLESHEET@ |
|
CodeAnt AI is reviewing your PR. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
Nitpicks 🔍
|
|
CodeAnt AI finished reviewing your PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (3)
docs/Doxyfile.in (1)
1166-1167: Ensuredocs/custom-dark-fixes.cssexists or drop it fromHTML_EXTRA_STYLESHEETDoxygen will error out if any file listed in
HTML_EXTRA_STYLESHEETis missing. I don’t seedocs/custom-dark-fixes.cssadded in this PR, so documentation builds (MFC_DOCUMENTATION=ON) will likely fail until that file is created or this entry is removed.Please confirm that
docs/custom-dark-fixes.cssis present in the repo. If it isn’t, either add the stylesheet (even as a minimal stub) or remove this path. You can verify with:#!/bin/bash # From repo root test -f docs/custom-dark-fixes.css && echo "found" || echo "missing"toolchain/mfc/gen_case_constraints_docs.py (2)
415-432: Log failures when loading example case parameters instead of fully silent fallback
load_case_paramscurrently returns{}on anysubprocess.CalledProcessError/ JSON / timeout error without emitting diagnostics, which can silently drop examples from the playbook and make issues inexamples/*/case.pyharder to detect.Consider logging a warning to
stderrbefore returning{}so broken examples show up during docs generation, e.g.:- except (subprocess.CalledProcessError, json.JSONDecodeError, subprocess.TimeoutExpired): - return {} + except (subprocess.CalledProcessError, json.JSONDecodeError, subprocess.TimeoutExpired) as e: + print(f"WARNING: Failed to load params from {case_path}: {e}", file=sys.stderr) + return {}
592-627: Avoid fully silentexcept Exceptionwhen rendering playbook cardsIn
generate_playbook, the broadexcept Exception: continuewill hide any unexpected failure (e.g. schema changes incase.pyoutputs), again silently removing examples from the output.At minimum, log the error to
stderrso it’s visible in CI logs:- for entry in level_entries: - try: - params = load_case_params(entry.case_dir) - if not params: - continue - summary = summarize_case_params(params) - card = render_playbook_card(entry, summary) - lines.append(card) - except Exception: # pylint: disable=broad-except - continue + for entry in level_entries: + try: + params = load_case_params(entry.case_dir) + if not params: + continue + summary = summarize_case_params(params) + card = render_playbook_card(entry, summary) + lines.append(card) + except Exception as e: # pylint: disable=broad-except + print(f"WARNING: Failed to process playbook entry '{entry.case_dir}': {e}", file=sys.stderr) + continue
🧹 Nitpick comments (4)
docs/documentation/case.md (1)
69-79: Feature Compatibility block wiring looks correctThe new “Feature Compatibility” subsection and link to
case_constraints.mdare consistent with the generated doc path and Doxygen’s Markdown handling; no structural issues from the docs perspective.If you want a stricter hierarchy, consider making “Feature Compatibility” a subheading (e.g.
###) under “Parameters” instead of a sibling.docs/gen_constraints.sh (1)
1-15: Shell wrapper is correct; optionally harden error handlingThe script correctly validates
REPO_ROOT, quotes paths, and wires the Python generator to the expected output location.For slightly stronger safety in CI, consider:
-#!/bin/bash -# Generate case constraints documentation from case_validator.py - -set -e +#!/bin/bash +# Generate case constraints documentation from case_validator.py + +set -euo pipefailso unset variables and pipeline failures are caught early.
CMakeLists.txt (1)
655-665: Adddocs/gen_constraints.shas an explicit dependencyThe custom command for
case_constraints.mdis wired correctly togen_case_constraints_docs.py,case_validator.py, and the examples, and integrates cleanly with the documentation Doxygen rule viaopt_constraints_dependency.To ensure changes to the wrapper script also trigger regeneration, add it to
DEPENDS:add_custom_command( OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/docs/documentation/case_constraints.md" - DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/toolchain/mfc/gen_case_constraints_docs.py" - "${CMAKE_CURRENT_SOURCE_DIR}/toolchain/mfc/case_validator.py" - "${examples_DOCs}" + DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/docs/gen_constraints.sh" + "${CMAKE_CURRENT_SOURCE_DIR}/toolchain/mfc/gen_case_constraints_docs.py" + "${CMAKE_CURRENT_SOURCE_DIR}/toolchain/mfc/case_validator.py" + "${examples_DOCs}"toolchain/mfc/gen_case_constraints_docs.py (1)
45-189: AST-based rule extraction is well-structured; consider small robustness tweaksThe
CaseValidatorAnalyzerand_extract_paramslogic to discoverself.prohibit(...)calls and map them back to case parameters (self.get('param', ...)and local aliases) is clear and nicely localized; the call-graph tracking for later stage attribution is also sound.If you later need to cover more complex patterns, you could:
- Walk the full function body in
_build_local_param_map(not just top-levelAssignnodes) to catch assignments nested insideif/loops.- Narrow the analysis to
CaseValidatorby checkingself.in_case_validatorinvisit_Call, to avoid ever picking up unrelatedself.prohibitcalls in other classes.
These aren’t required for correctness with the current validator style, but would make the extractor more future-proof.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
.github/workflows/docs.yml(1 hunks).gitignore(1 hunks)CMakeLists.txt(3 hunks)docs/Doxyfile.in(1 hunks)docs/documentation/case.md(1 hunks)docs/gen_constraints.sh(1 hunks)toolchain/mfc/gen_case_constraints_docs.py(1 hunks)
🧰 Additional context used
🪛 Ruff (0.14.6)
toolchain/mfc/gen_case_constraints_docs.py
1-1: Shebang is present but file is not executable
(EXE001)
284-284: String contains ambiguous – (EN DASH). Did you mean - (HYPHEN-MINUS)?
(RUF001)
285-285: String contains ambiguous – (EN DASH). Did you mean - (HYPHEN-MINUS)?
(RUF001)
422-422: subprocess call: check for execution of untrusted input
(S603)
423-423: Starting a process with a partial executable path
(S607)
430-430: Consider moving this statement to an else block
(TRY300)
467-467: String contains ambiguous γ (GREEK SMALL LETTER GAMMA). Did you mean y (LATIN SMALL LETTER Y)?
(RUF001)
623-624: try-except-continue detected, consider logging the exception
(S112)
623-623: Do not catch blind exception: Exception
(BLE001)
784-784: String contains ambiguous γ (GREEK SMALL LETTER GAMMA). Did you mean y (LATIN SMALL LETTER Y)?
(RUF001)
893-893: f-string without any placeholders
Remove extraneous f prefix
(F541)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: cubic · AI code reviewer
- GitHub Check: Github (macos, mpi, debug, false)
- GitHub Check: Github (macos, mpi, no-debug, false)
- GitHub Check: Github (ubuntu, mpi, debug, false)
- GitHub Check: Github (ubuntu, mpi, no-debug, false)
- GitHub Check: Github (ubuntu, mpi, no-debug, true)
- GitHub Check: Github (ubuntu, mpi, debug, true)
- GitHub Check: Coverage Test on CodeCov
🔇 Additional comments (4)
.gitignore (1)
35-40: Ignore generated case constraints docAdding
docs/documentation/case_constraints.mdto.gitignoreis appropriate since it is now a generated artifact, keeping the tree clean..github/workflows/docs.yml (1)
37-43: Uploading built docs artifact is well-integratedThe new
Upload Built Documentation Artifactstep correctly targetsbuild/install/docs/mfc, aligns with subsequent sitemap/linkcheck steps, and will fail fast if docs aren’t generated.CMakeLists.txt (1)
699-704: Doxygen dependency on generated constraints doc is correctly modeledThe
opt_constraints_dependencymechanism inGEN_DOCSensures that thedocumentationtarget’s Doxygen run waits for bothexamples.mdandcase_constraints.mdto be generated, without impacting other doc targets.Also applies to: 713-714
toolchain/mfc/gen_case_constraints_docs.py (1)
19-19: Python 3.10+ type-hint syntax may break docs generation on older PythonsThe use of PEP 604 unions (e.g.
model_eqns: int | None) requires Python ≥ 3.10 at parse time, even withfrom __future__ import annotations. If someone runsMFC_DOCUMENTATION=ONwith an older system Python (3.8/3.9 is still common on clusters), this script will fail to start.If you need compatibility with <3.10, prefer
Optional[int]:-from typing import Dict, List, Set, Iterable, Any +from typing import Dict, List, Set, Iterable, Any, Optional @@ -def get_model_name(model_eqns: int | None) -> str: +def get_model_name(model_eqns: Optional[int]) -> str: @@ -def get_riemann_solver_name(solver: int | None) -> str: +def get_riemann_solver_name(solver: Optional[int]) -> str: @@ -def get_time_stepper_name(stepper: int | None) -> str: +def get_time_stepper_name(stepper: Optional[int]) -> str:Please confirm what minimum Python version you intend to support for docs builds and adjust accordingly.
Also applies to: 464-495
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 issues found across 7 files
Prompt for AI agents (all 3 issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="CMakeLists.txt">
<violation number="1" location="CMakeLists.txt:658">
P2: Add docs/gen_constraints.sh to the DEPENDS list so edits to the generator script retrigger case_constraints.md generation and keep the documentation up to date.</violation>
</file>
<file name="docs/gen_constraints.sh">
<violation number="1" location="docs/gen_constraints.sh:14">
P2: Redirecting the generator output directly risks truncating docs/documentation/case_constraints.md if the Python script fails after the shell creates the file; stage the output in a temporary file and move it only after the generator succeeds to avoid corrupting the docs.</violation>
</file>
<file name="docs/documentation/case.md">
<violation number="1" location="docs/documentation/case.md:73">
P2: `Feature Compatibility Guide` link points to `case_constraints.md`, which is missing from the repo, resulting in a broken documentation link.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 issues found across 6 files
Prompt for AI agents (all 2 issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="docs/gen_constraints.sh">
<violation number="1" location="docs/gen_constraints.sh:14">
P2: Avoid truncating `case_constraints.md` before successful doc generation; write to a temporary file and only replace the target after the generator succeeds.</violation>
</file>
<file name="CMakeLists.txt">
<violation number="1" location="CMakeLists.txt:658">
P2: Include `docs/gen_constraints.sh` in the custom command dependencies so edits to the generator script retrigger `case_constraints.md`.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
| fi | ||
|
|
||
| echo "Generating case constraints documentation..." | ||
| python3 "$REPO_ROOT/toolchain/mfc/gen_case_constraints_docs.py" > "$REPO_ROOT/docs/documentation/case_constraints.md" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: Avoid truncating case_constraints.md before successful doc generation; write to a temporary file and only replace the target after the generator succeeds.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/gen_constraints.sh, line 14:
<comment>Avoid truncating `case_constraints.md` before successful doc generation; write to a temporary file and only replace the target after the generator succeeds.</comment>
<file context>
@@ -0,0 +1,17 @@
+fi
+
+echo "Generating case constraints documentation..."
+python3 "$REPO_ROOT/toolchain/mfc/gen_case_constraints_docs.py" > "$REPO_ROOT/docs/documentation/case_constraints.md"
+echo "✓ Generated docs/documentation/case_constraints.md"
+
</file context>
| # Generate case_constraints.md from case_validator.py and examples/ | ||
| add_custom_command( | ||
| OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/docs/documentation/case_constraints.md" | ||
| DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/toolchain/mfc/gen_case_constraints_docs.py" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: Include docs/gen_constraints.sh in the custom command dependencies so edits to the generator script retrigger case_constraints.md.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At CMakeLists.txt, line 658:
<comment>Include `docs/gen_constraints.sh` in the custom command dependencies so edits to the generator script retrigger `case_constraints.md`.</comment>
<file context>
@@ -652,6 +652,18 @@ if (MFC_DOCUMENTATION)
+ # Generate case_constraints.md from case_validator.py and examples/
+ add_custom_command(
+ OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/docs/documentation/case_constraints.md"
+ DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/toolchain/mfc/gen_case_constraints_docs.py"
+ "${CMAKE_CURRENT_SOURCE_DIR}/toolchain/mfc/case_validator.py"
+ "${examples_DOCs}"
</file context>
| DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/toolchain/mfc/gen_case_constraints_docs.py" | |
| DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/docs/gen_constraints.sh" "${CMAKE_CURRENT_SOURCE_DIR}/toolchain/mfc/gen_case_constraints_docs.py" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (5)
toolchain/mfc/gen_case_constraints_docs.py (5)
1-1: Shebang vs execution modeThe file has a
#!/usr/bin/env python3shebang but is likely invoked viapython/CMake rather than as an executable; either make the script executable in git or drop the shebang to avoid EXE001 noise.
32-39: Stage tracking logic is currently unused
Rule.stages,STAGE_ROOTS, andcompute_method_stages()are computed but never read inrender_markdownor elsewhere, adding complexity without effect. Consider either surfacing stage information in the docs (e.g., grouping constraints by stage) or removing this machinery to keep the generator simpler and easier to maintain.Also applies to: 192-229, 940-942
93-124: AST param extraction is intentionally heuristic; verify coverage of validator patterns
_build_local_param_maponly inspects top-levelast.Assignnodes and a singleself.get(...)pattern (optionally under a top-level comparison), and_extract_paramsrelies on that mapping plus directself.getcalls. Any assignments nested inif/loops or more complex expressions will be missed, and correspondingself.prohibitconditions will yield rules with incompleteparams, so those constraints simply won’t appear in the docs. If the currentcase_validator.pyuses more varied patterns, consider expanding these visitors (or documenting the expected patterns) so new validation code doesn’t silently drop constraints from the generated guide.Also applies to: 162-189
415-433: Tighten subprocess usage and interpreter selection for example cases
load_case_paramsshells out with["python3", case_path]and trusts its stdout as JSON. Sincecase_pathis derived from the repo structure, this is acceptable as an internal docs tool, but you can make it safer and more portable by:
- Using
sys.executableinstead of bare"python3"to ensure the same interpreter and avoid PATH issues (addresses S607).- Making it explicit in comments that this script is intended to run only against trusted repository examples, not arbitrary user-provided directories (mitigates S603 concerns).
For example:
-import subprocess +import subprocess +import sys @@ - result = subprocess.run( - ["python3", str(case_path)], + result = subprocess.run( + [sys.executable, str(case_path)], capture_output=True, text=True, timeout=10, check=True ) - params = json.loads(result.stdout) - return params + return json.loads(result.stdout)(The surrounding
exceptalready logs and falls back cleanly.)
895-897: Remove unnecessary f-string prefix
lines.append(f"\n<details>")is an f-string without interpolation, which Ruff flags (F541) and doesn’t add value. You can simplify:- lines.append(f"\n<details>") + lines.append("\n<details>")
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
toolchain/mfc/gen_case_constraints_docs.py(1 hunks)
🧰 Additional context used
🪛 Ruff (0.14.6)
toolchain/mfc/gen_case_constraints_docs.py
1-1: Shebang is present but file is not executable
(EXE001)
284-284: String contains ambiguous – (EN DASH). Did you mean - (HYPHEN-MINUS)?
(RUF001)
285-285: String contains ambiguous – (EN DASH). Did you mean - (HYPHEN-MINUS)?
(RUF001)
422-422: subprocess call: check for execution of untrusted input
(S603)
423-423: Starting a process with a partial executable path
(S607)
430-430: Consider moving this statement to an else block
(TRY300)
468-468: String contains ambiguous γ (GREEK SMALL LETTER GAMMA). Did you mean y (LATIN SMALL LETTER Y)?
(RUF001)
624-624: Do not catch blind exception: Exception
(BLE001)
786-786: String contains ambiguous γ (GREEK SMALL LETTER GAMMA). Did you mean y (LATIN SMALL LETTER Y)?
(RUF001)
895-895: f-string without any placeholders
Remove extraneous f prefix
(F541)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
- GitHub Check: cubic · AI code reviewer
- GitHub Check: Coverage Test on CodeCov
- GitHub Check: Github (macos, mpi, no-debug, false)
- GitHub Check: Github (ubuntu, no-mpi, single, no-debug, false)
- GitHub Check: Github (ubuntu, mpi, debug, false)
- GitHub Check: Github (macos, mpi, debug, false)
- GitHub Check: Github (ubuntu, mpi, no-debug, false)
- GitHub Check: Github (ubuntu, mpi, no-debug, true)
- GitHub Check: Github (ubuntu, mpi, debug, true)
- GitHub Check: Code Cleanliness Check
- GitHub Check: Build & Publish
🔇 Additional comments (2)
toolchain/mfc/gen_case_constraints_docs.py (2)
571-588: Verify that manual fragment links match rendered heading IDsSeveral links use hard‑coded fragments like
#-model-equations,#️-riemann-solvers,#-bubble-models, and#magnetohydrodynamics-mhd-mhdwhile the corresponding headings include emoji and/or parentheses. Different Markdown engines (GitHub vs Doxygen) derive IDs differently in these cases, so these anchors may not actually resolve. Please build the docs and confirm the links work; if not, consider simplifying headings (no emoji) or adjusting fragments to match the generator’s ID scheme.Also applies to: 780-807, 815-824
498-590: BroadExceptioncatch in playbook generation looks acceptableCatching
Exceptioningenerate_playbookis reasonable here since a broken example should not break the entire docs build, and you already log a warning tostderrbefore continuing. No change is strictly needed; just be aware that truly unexpected errors (e.g., environment issues) will also be swallowed.Also applies to: 593-628
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1072 +/- ##
=======================================
Coverage 44.16% 44.16%
=======================================
Files 71 71
Lines 20197 20197
Branches 1970 1970
=======================================
Hits 8921 8921
Misses 10148 10148
Partials 1128 1128 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Looks cool. Generated page name typo below. |
|
good find, thanks @Malmahrouqi3 |
User description
User description
Put constraints in the docs
PR Type
Enhancement, Documentation
Description
Generate comprehensive case constraints documentation from validator rules
case_validator.pyAST to extract allprohibit()constraintsCreate curated case design playbook with working examples
examples/directoryIntegrate constraints doc into build pipeline
case_constraints.mdEnhance case documentation with compatibility guide link
case.mdpointing to constraints guideDiagram Walkthrough
File Walkthrough
gen_case_constraints_docs.py
Constraint documentation generator with playbooktoolchain/mfc/gen_case_constraints_docs.py
case_validator.pyusing ASTanalysis
self.prohibit()constraint rules and maps them toparameters/stages
tables
with metadata
metadata, and Markdown rendering
gen_constraints.sh
Build script for constraint documentationdocs/gen_constraints.sh
docs/documentation/case_constraints.mddocs.yml
Upload documentation artifacts in CI.github/workflows/docs.yml
mfc-docsartifact with 7-day retentionCMakeLists.txt
Integrate constraint doc generation into buildCMakeLists.txt
case_constraints.mdfrom validator andexamples
gen_case_constraints_docs.py,case_validator.py, andexample files
Doxyfile.in
Add custom CSS stylesheet referencedocs/Doxyfile.in
custom-dark-fixes.cssinHTML_EXTRA_STYLESHEETcase.md
Link to feature compatibility guidedocs/documentation/case.md
case_constraints.mdguide for feature compatibilityinformation
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.
CodeAnt-AI Description
Add an auto-generated feature compatibility guide and example-based case playbook
What Changed
case_constraints.mdImpact
✅ Clearer feature compatibility guidance for case setup✅ Quicker resolution of case validation and configuration errors✅ Easier reuse of proven example configurations from the docs💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.