Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ jobs:
cmake -S . -B build -G Ninja --install-prefix=$(pwd)/build/install -D MFC_DOCUMENTATION=ON
ninja -C build install

- name: Upload Built Documentation Artifact
uses: actions/upload-artifact@v4
with:
name: mfc-docs
path: build/install/docs/mfc
if-no-files-found: error
retention-days: 7

# From here https://github.com/cicirello/generate-sitemap
- name: Generate the sitemap
id: sitemap
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ docs/*/initial*
docs/*/result*
docs/documentation/*-example.png
docs/documentation/examples.md
docs/documentation/case_constraints.md

examples/*batch/*/
examples/**/D/*
Expand Down
15 changes: 15 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,18 @@ if (MFC_DOCUMENTATION)
VERBATIM
)

# 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"
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 1, 2025

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  &quot;${CMAKE_CURRENT_SOURCE_DIR}/docs/documentation/case_constraints.md&quot;
+        DEPENDS &quot;${CMAKE_CURRENT_SOURCE_DIR}/toolchain/mfc/gen_case_constraints_docs.py&quot;
+                &quot;${CMAKE_CURRENT_SOURCE_DIR}/toolchain/mfc/case_validator.py&quot;
+                &quot;${examples_DOCs}&quot;
</file context>
Suggested change
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"
Fix with Cubic

"${CMAKE_CURRENT_SOURCE_DIR}/toolchain/mfc/case_validator.py"
"${examples_DOCs}"
COMMAND "bash" "${CMAKE_CURRENT_SOURCE_DIR}/docs/gen_constraints.sh"
"${CMAKE_CURRENT_SOURCE_DIR}"
COMMENT "Generating case_constraints.md"
VERBATIM
)

file(GLOB common_DOCs CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/docs/*")

# GEN_DOCS: Given a target name (herein <target>), this macro sets up a
Expand Down Expand Up @@ -685,8 +697,10 @@ if (MFC_DOCUMENTATION)
"${CMAKE_CURRENT_BINARY_DIR}/${target}-Doxyfile" @ONLY)

set(opt_example_dependency "")
set(opt_constraints_dependency "")
if (${target} STREQUAL documentation)
set(opt_example_dependency "${CMAKE_CURRENT_SOURCE_DIR}/docs/documentation/examples.md")
set(opt_constraints_dependency "${CMAKE_CURRENT_SOURCE_DIR}/docs/documentation/case_constraints.md")
endif()

file(GLOB_RECURSE ${target}_DOCs CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/docs/${target}/*")
Expand All @@ -696,6 +710,7 @@ if (MFC_DOCUMENTATION)
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${target}/html/index.html"
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${target}-Doxyfile"
"${opt_example_dependency}"
"${opt_constraints_dependency}"
"${${target}_SRCs}" "${${target}_DOCs}"
COMMAND "${DOXYGEN_EXECUTABLE}" "${target}-Doxyfile"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
Expand Down
3 changes: 2 additions & 1 deletion docs/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,8 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_EXTRA_STYLESHEET = @DOXYGEN_HTML_EXTRA_STYLESHEET@
HTML_EXTRA_STYLESHEET = @DOXYGEN_HTML_EXTRA_STYLESHEET@ \
@CMAKE_SOURCE_DIR@/docs/custom-dark-fixes.css

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Copy link

Copilot AI Dec 1, 2025

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.

Suggested change
HTML_EXTRA_STYLESHEET = @DOXYGEN_HTML_EXTRA_STYLESHEET@ \
@CMAKE_SOURCE_DIR@/docs/custom-dark-fixes.css
HTML_EXTRA_STYLESHEET = @DOXYGEN_HTML_EXTRA_STYLESHEET@

Copilot uses AI. Check for mistakes.

# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the HTML output directory. Note
Expand Down
9 changes: 9 additions & 0 deletions docs/documentation/case.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@ For example, to run the `scaling` case in "weak-scaling" mode:

## Parameters

## Feature Compatibility

Before diving into parameter details, check the **[Feature Compatibility Guide](case_constraints.md)** to understand:
- Which features work together (MHD, bubbles, phase change, etc.)
- Common configuration patterns with copy-paste examples
- Requirements for each model equation and Riemann solver

💡 **Tip:** If you get a validation error, the compatibility guide explains what each parameter requires.

There are multiple sets of parameters that must be specified in the python input file:
1. [Runtime Parameters](#1-runtime)
2. [Computational Domain Parameters](#2-computational-domain)
Expand Down
17 changes: 17 additions & 0 deletions docs/gen_constraints.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
# Generate case constraints documentation from case_validator.py

set -e

REPO_ROOT="$1"

if [ -z "$REPO_ROOT" ]; then
echo "Usage: $0 <repo_root>"
exit 1
fi

echo "Generating case constraints documentation..."
python3 "$REPO_ROOT/toolchain/mfc/gen_case_constraints_docs.py" > "$REPO_ROOT/docs/documentation/case_constraints.md"
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 1, 2025

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 &quot;Generating case constraints documentation...&quot;
+python3 &quot;$REPO_ROOT/toolchain/mfc/gen_case_constraints_docs.py&quot; &gt; &quot;$REPO_ROOT/docs/documentation/case_constraints.md&quot;
+echo &quot;✓ Generated docs/documentation/case_constraints.md&quot;
+
</file context>
Fix with Cubic

echo "✓ Generated docs/documentation/case_constraints.md"


Loading
Loading