Skip to content

Commit 755c450

Browse files
committed
merge from upstream master
2 parents 75396b4 + 4c52155 commit 755c450

174 files changed

Lines changed: 6596 additions & 3386 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Build Doxygen
2222
run: |
2323
sudo apt update -y
24-
sudo apt install -y cmake ninja-build graphviz graphviz
24+
sudo apt install -y cmake ninja-build graphviz texlive-binaries
2525
git clone https://github.com/doxygen/doxygen.git ../doxygen
2626
cd ../doxygen
2727
git checkout Release_1_16_1

.github/workflows/lint-toolchain.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,21 @@ jobs:
4242

4343
- name: Validate example cases
4444
run: |
45-
./mfc.sh validate examples/1D_sodshocktube/case.py
46-
./mfc.sh validate examples/2D_shockbubble/case.py
45+
failed=0
46+
passed=0
47+
for case in examples/*/case.py; do
48+
[ -f "$case" ] || continue
49+
output=$(./mfc.sh validate "$case" 2>&1)
50+
if [ $? -eq 0 ]; then
51+
passed=$((passed + 1))
52+
else
53+
echo "FAIL: $case"
54+
echo "$output"
55+
failed=$((failed + 1))
56+
fi
57+
done
58+
echo ""
59+
echo "Results: $passed passed, $failed failed"
60+
if [ "$failed" -ne 0 ]; then
61+
exit 1
62+
fi

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ jobs:
4949
run: |
5050
! grep -iR -e '\.\.\.' -e '\-\-\-' -e '===' ./src/*
5151
52+
- name: Lint Docs
53+
run: python3 toolchain/mfc/lint_docs.py
54+
5255
file-changes:
5356
name: Detect File Changes
5457
runs-on: 'ubuntu-latest'

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ docs/*/result*
4444
docs/documentation/*-example.png
4545
docs/documentation/examples.md
4646
docs/documentation/case_constraints.md
47+
docs/documentation/physics_constraints.md
4748

4849
examples/*batch/*/
4950
examples/**/D/*

.pr_agent.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
# .pr_agent.toml
22
[github_app]
3-
# Run these tools automatically on every new PR:
4-
pr_commands = ["/describe", "/review", "/improve"]
3+
pr_commands = [
4+
"/review",
5+
"/improve",
6+
]
7+
8+
handle_push_trigger = true
9+
push_commands = ["/improve"]
510

611
[pr_reviewer] # (all fields optional)
712
num_max_findings = 10 # how many items to surface

.typos.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ unknwn = "unknwn" # typo for "unknown" - tests unknown param detection
3030
tru = "tru" # typo for "true" in "when_tru" - tests dependency keys
3131

3232
[files]
33-
extend-exclude = ["docs/documentation/references*", "tests/", "toolchain/cce_simulation_workgroup_256.sh", "build-docs/"]
33+
extend-exclude = ["docs/documentation/references*", "docs/references.bib", "tests/", "toolchain/cce_simulation_workgroup_256.sh", "build-docs/"]

CMakeLists.txt

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -660,16 +660,19 @@ if (MFC_DOCUMENTATION)
660660
VERBATIM
661661
)
662662

663-
# Generate case_constraints.md from case_validator.py and examples/
663+
# Generate case_constraints.md and physics_constraints.md together.
664+
# Both are produced by gen_constraints.sh, so a single command avoids races.
664665
add_custom_command(
665666
OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/docs/documentation/case_constraints.md"
667+
"${CMAKE_CURRENT_SOURCE_DIR}/docs/documentation/physics_constraints.md"
666668
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/toolchain/mfc/gen_case_constraints_docs.py"
669+
"${CMAKE_CURRENT_SOURCE_DIR}/toolchain/mfc/gen_physics_docs.py"
667670
"${CMAKE_CURRENT_SOURCE_DIR}/toolchain/mfc/case_validator.py"
668671
"${CMAKE_CURRENT_SOURCE_DIR}/toolchain/mfc/params/definitions.py"
669672
"${examples_DOCs}"
670673
COMMAND "bash" "${CMAKE_CURRENT_SOURCE_DIR}/docs/gen_constraints.sh"
671674
"${CMAKE_CURRENT_SOURCE_DIR}"
672-
COMMENT "Generating case_constraints.md"
675+
COMMENT "Generating case_constraints.md and physics_constraints.md"
673676
VERBATIM
674677
)
675678

@@ -720,6 +723,7 @@ if (MFC_DOCUMENTATION)
720723
set(DOXYGEN_HTML_OUTPUT "\"${CMAKE_CURRENT_BINARY_DIR}/${target}\"")
721724
set(DOXYGEN_MATHJAX_CODEFILE "\"${CMAKE_CURRENT_SOURCE_DIR}/docs/config.js\"")
722725
set(DOXYGEN_PROJECT_LOGO "\"${CMAKE_CURRENT_SOURCE_DIR}/docs/res/icon.ico\"")
726+
set(DOXYGEN_CITE_BIB_FILES "\"${CMAKE_CURRENT_SOURCE_DIR}/docs/references.bib\"")
723727
set(DOXYGEN_IMAGE_PATH "\"${CMAKE_CURRENT_SOURCE_DIR}/docs/res\"\
724728
\"${CMAKE_CURRENT_SOURCE_DIR}/docs/${target}\"")
725729

@@ -731,11 +735,13 @@ if (MFC_DOCUMENTATION)
731735

732736
set(opt_example_dependency "")
733737
set(opt_constraints_dependency "")
738+
set(opt_physics_dependency "")
734739
set(opt_cli_reference_dependency "")
735740
set(opt_parameters_dependency "")
736741
if (${target} STREQUAL documentation)
737742
set(opt_example_dependency "${CMAKE_CURRENT_SOURCE_DIR}/docs/documentation/examples.md")
738743
set(opt_constraints_dependency "${CMAKE_CURRENT_SOURCE_DIR}/docs/documentation/case_constraints.md")
744+
set(opt_physics_dependency "${CMAKE_CURRENT_SOURCE_DIR}/docs/documentation/physics_constraints.md")
739745
set(opt_cli_reference_dependency "${CMAKE_CURRENT_SOURCE_DIR}/docs/documentation/cli-reference.md")
740746
set(opt_parameters_dependency "${CMAKE_CURRENT_SOURCE_DIR}/docs/documentation/parameters.md")
741747
endif()
@@ -748,10 +754,13 @@ if (MFC_DOCUMENTATION)
748754
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${target}-Doxyfile"
749755
"${opt_example_dependency}"
750756
"${opt_constraints_dependency}"
757+
"${opt_physics_dependency}"
751758
"${opt_cli_reference_dependency}"
752759
"${opt_parameters_dependency}"
753760
"${${target}_SRCs}" "${${target}_DOCs}"
754761
COMMAND "${DOXYGEN_EXECUTABLE}" "${target}-Doxyfile"
762+
COMMAND "${Python3_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/docs/postprocess_citations.py"
763+
"${CMAKE_CURRENT_BINARY_DIR}/${target}"
755764
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
756765
COMMENT "${target}: Generating documentation"
757766
)
@@ -771,6 +780,7 @@ if (MFC_DOCUMENTATION)
771780
add_custom_target(documentation)
772781

773782
find_package(Doxygen REQUIRED dot REQUIRED)
783+
find_package(Python3 REQUIRED COMPONENTS Interpreter)
774784

775785
# > Fetch CSS Theme
776786
ExternalProject_Add(doxygen-awesome-css

docs/Doxyfile.in

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ DOXYFILE_ENCODING = UTF-8
3535
# title of most generated pages and in a few other places.
3636
# The default value is: My Project.
3737

38-
PROJECT_NAME = "@DOXYGEN_PROJECT_NAME@"
38+
PROJECT_NAME = @DOXYGEN_PROJECT_NAME@
3939

4040
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
4141
# could be handy for archiving the generated documentation or if some version
@@ -740,7 +740,7 @@ LAYOUT_FILE =
740740
# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
741741
# search path. See also \cite for info how to create references.
742742

743-
CITE_BIB_FILES =
743+
CITE_BIB_FILES = @DOXYGEN_CITE_BIB_FILES@
744744

745745
#---------------------------------------------------------------------------
746746
# Configuration options related to warning and progress messages
@@ -970,7 +970,7 @@ FILTER_SOURCE_PATTERNS =
970970
# (index.html). This can be useful if you have a project on for instance GitHub
971971
# and want to reuse the introduction page also for the doxygen output.
972972

973-
USE_MDFILE_AS_MAINPAGE = readme.md
973+
USE_MDFILE_AS_MAINPAGE =
974974

975975
#---------------------------------------------------------------------------
976976
# Configuration options related to source browsing
@@ -1205,14 +1205,6 @@ HTML_COLORSTYLE_SAT = 255
12051205

12061206
HTML_COLORSTYLE_GAMMA = 113
12071207

1208-
# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
1209-
# page will contain the date and time when the page was generated. Setting this
1210-
# to YES can help to show when doxygen was last run and thus if the
1211-
# documentation is up to date.
1212-
# The default value is: NO.
1213-
# This tag requires that the tag GENERATE_HTML is set to YES.
1214-
1215-
HTML_TIMESTAMP = NO
12161208

12171209
# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
12181210
# documentation will contain a main index with vertical navigation menus that
@@ -1801,13 +1793,6 @@ LATEX_HIDE_INDICES = NO
18011793

18021794
LATEX_BIB_STYLE = plain
18031795

1804-
# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated
1805-
# page will contain the date and time when the page was generated. Setting this
1806-
# to NO can help when comparing the output of multiple runs.
1807-
# The default value is: NO.
1808-
# This tag requires that the tag GENERATE_LATEX is set to YES.
1809-
1810-
LATEX_TIMESTAMP = NO
18111796

18121797
# The LATEX_EMOJI_DIRECTORY tag is used to specify the (relative or absolute)
18131798
# path from which the emoji images will be read. If a relative path is entered,

docs/custom.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@
33
* Overrides for doxygen-awesome theme
44
*/
55

6+
/* Seamless split <code> tags for Fortran % struct accessors.
7+
* Doxygen consumes %<word> even inside code spans, so we split around %
8+
* into adjacent <code> elements and remove internal borders/padding. */
9+
code.f90l {
10+
border-right: 0;
11+
border-top-right-radius: 0;
12+
border-bottom-right-radius: 0;
13+
padding-right: 0;
14+
}
15+
code.f90r {
16+
border-left: 0;
17+
border-top-left-radius: 0;
18+
border-bottom-left-radius: 0;
19+
padding-left: 0;
20+
}
21+
622
/* Fix inline code visibility in colored admonition blocks (warning, attention, important, note, etc.) */
723

824
/* Warning/Attention/Important blocks (red/pink background) */

0 commit comments

Comments
 (0)