From aba4650356b5beea75adf6a0c8a91459d167085d Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 15:10:40 -0800 Subject: [PATCH 01/33] wip: emit location --- scripts/validateXMLFiles.bash | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/validateXMLFiles.bash b/scripts/validateXMLFiles.bash index 1df8e5b22bd..ae8383e3489 100755 --- a/scripts/validateXMLFiles.bash +++ b/scripts/validateXMLFiles.bash @@ -65,6 +65,10 @@ list_xml_files_git () git --git-dir=$git_root/.git ls-files $prefix | grep -e .*[.]xml$ | sed "s|^|$git_root/|g" } +# emit location +ls -l +pwd + # create/nullify the log file echo -n > $LOGFILE From db098ba04ecfbe19fcf2ff6db9402a76ff147cbb Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 16:29:03 -0800 Subject: [PATCH 02/33] wip: adding extra command --- scripts/validateXMLFiles.bash | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/validateXMLFiles.bash b/scripts/validateXMLFiles.bash index ae8383e3489..ac3a9683234 100755 --- a/scripts/validateXMLFiles.bash +++ b/scripts/validateXMLFiles.bash @@ -68,6 +68,7 @@ list_xml_files_git () # emit location ls -l pwd +echo $path # create/nullify the log file echo -n > $LOGFILE From 98b3a3c2f6d5e136494c799f513d624ac56af29e Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 17:06:08 -0800 Subject: [PATCH 03/33] wip: shift input path --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 595f1cadf18..4853eef94b8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -179,7 +179,7 @@ if( ENABLE_XML_UPDATES AND ENABLE_MPI AND UNIX AND NOT ENABLE_CUDA AND NOT ENABL add_custom_target( geosx_validate_all_xml_files ALL - COMMAND bash ${SCRIPT_DIR}/validateXMLFiles.bash -g ${SCHEMA_DIR}/schema.xsd ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/../examples ${CMAKE_SOURCE_DIR}/../inputFiles + COMMAND bash ${SCRIPT_DIR}/validateXMLFiles.bash -g ${SCHEMA_DIR}/schema.xsd ${CMAKE_SOURCE_DIR}/.. ${CMAKE_SOURCE_DIR}/../examples ${CMAKE_SOURCE_DIR}/../inputFiles WORKING_DIRECTORY ${CMAKE_BINARY_DIR} DEPENDS geosx_generate_schema COMMENT "Validating all XML files in the repository against the schema" From 3bd316c3e3543978b5243694161bf50d5c89da16 Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 17:19:30 -0800 Subject: [PATCH 04/33] wip: level up --- scripts/validateXMLFiles.bash | 4 ++++ src/CMakeLists.txt | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/validateXMLFiles.bash b/scripts/validateXMLFiles.bash index ac3a9683234..a0be48fd650 100755 --- a/scripts/validateXMLFiles.bash +++ b/scripts/validateXMLFiles.bash @@ -70,6 +70,10 @@ ls -l pwd echo $path +cd .. +ls -l +pwd + # create/nullify the log file echo -n > $LOGFILE diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4853eef94b8..595f1cadf18 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -179,7 +179,7 @@ if( ENABLE_XML_UPDATES AND ENABLE_MPI AND UNIX AND NOT ENABLE_CUDA AND NOT ENABL add_custom_target( geosx_validate_all_xml_files ALL - COMMAND bash ${SCRIPT_DIR}/validateXMLFiles.bash -g ${SCHEMA_DIR}/schema.xsd ${CMAKE_SOURCE_DIR}/.. ${CMAKE_SOURCE_DIR}/../examples ${CMAKE_SOURCE_DIR}/../inputFiles + COMMAND bash ${SCRIPT_DIR}/validateXMLFiles.bash -g ${SCHEMA_DIR}/schema.xsd ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/../examples ${CMAKE_SOURCE_DIR}/../inputFiles WORKING_DIRECTORY ${CMAKE_BINARY_DIR} DEPENDS geosx_generate_schema COMMENT "Validating all XML files in the repository against the schema" From cfa86db35c8075c7bf2deaf6fda5d7db94f86bc6 Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 17:29:32 -0800 Subject: [PATCH 05/33] wip: passing only ${CMAKE_SOURCE_DIR} --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 595f1cadf18..d852b261461 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -179,7 +179,7 @@ if( ENABLE_XML_UPDATES AND ENABLE_MPI AND UNIX AND NOT ENABLE_CUDA AND NOT ENABL add_custom_target( geosx_validate_all_xml_files ALL - COMMAND bash ${SCRIPT_DIR}/validateXMLFiles.bash -g ${SCHEMA_DIR}/schema.xsd ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/../examples ${CMAKE_SOURCE_DIR}/../inputFiles + COMMAND bash ${SCRIPT_DIR}/validateXMLFiles.bash -g ${SCHEMA_DIR}/schema.xsd ${CMAKE_SOURCE_DIR} WORKING_DIRECTORY ${CMAKE_BINARY_DIR} DEPENDS geosx_generate_schema COMMENT "Validating all XML files in the repository against the schema" From f5cb1aea014cd1991965810145c58ac52e7719db Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 18:06:17 -0800 Subject: [PATCH 06/33] wip: test --- scripts/validateXMLFiles.bash | 9 +++------ src/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/scripts/validateXMLFiles.bash b/scripts/validateXMLFiles.bash index a0be48fd650..a1f94010bb7 100755 --- a/scripts/validateXMLFiles.bash +++ b/scripts/validateXMLFiles.bash @@ -62,23 +62,20 @@ list_xml_files_git () exit 1 fi local prefix=$(cd $path; git rev-parse --show-prefix 2>/dev/null) - git --git-dir=$git_root/.git ls-files $prefix | grep -e .*[.]xml$ | sed "s|^|$git_root/|g" + git --git-dir=$git_root/.git ls-files $prefix | grep -e ".*[.]xml$" | sed "s|^|$git_root/|g" } # emit location ls -l pwd -echo $path - -cd .. -ls -l -pwd # create/nullify the log file echo -n > $LOGFILE # validate each path separately and write results in the log for path in "$@"; do + # emit location + echo $path list_xml_files_$METHOD $path | $XARGS xmllint --schema $SCHEMA --noout >> $LOGFILE 2>&1 done diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d852b261461..595f1cadf18 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -179,7 +179,7 @@ if( ENABLE_XML_UPDATES AND ENABLE_MPI AND UNIX AND NOT ENABLE_CUDA AND NOT ENABL add_custom_target( geosx_validate_all_xml_files ALL - COMMAND bash ${SCRIPT_DIR}/validateXMLFiles.bash -g ${SCHEMA_DIR}/schema.xsd ${CMAKE_SOURCE_DIR} + COMMAND bash ${SCRIPT_DIR}/validateXMLFiles.bash -g ${SCHEMA_DIR}/schema.xsd ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/../examples ${CMAKE_SOURCE_DIR}/../inputFiles WORKING_DIRECTORY ${CMAKE_BINARY_DIR} DEPENDS geosx_generate_schema COMMENT "Validating all XML files in the repository against the schema" From 3c97607d154676b5c6bc65fb18d0e423729e07be Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 18:37:07 -0800 Subject: [PATCH 07/33] wip: fix --- scripts/validateXMLFiles.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/validateXMLFiles.bash b/scripts/validateXMLFiles.bash index a1f94010bb7..a5b527ccfe6 100755 --- a/scripts/validateXMLFiles.bash +++ b/scripts/validateXMLFiles.bash @@ -62,7 +62,7 @@ list_xml_files_git () exit 1 fi local prefix=$(cd $path; git rev-parse --show-prefix 2>/dev/null) - git --git-dir=$git_root/.git ls-files $prefix | grep -e ".*[.]xml$" | sed "s|^|$git_root/|g" + cd $path; git --git-dir=$git_root/.git ls-files $prefix | grep -e ".*[.]xml$" | sed "s|^|$git_root/|g" } # emit location From d265c8bb1623a0437d71a5e3b1d2830c88c402d2 Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 18:49:42 -0800 Subject: [PATCH 08/33] wip: test --- scripts/validateXMLFiles.bash | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/validateXMLFiles.bash b/scripts/validateXMLFiles.bash index a5b527ccfe6..6f7dc738e1c 100755 --- a/scripts/validateXMLFiles.bash +++ b/scripts/validateXMLFiles.bash @@ -62,6 +62,8 @@ list_xml_files_git () exit 1 fi local prefix=$(cd $path; git rev-parse --show-prefix 2>/dev/null) + echo $git_root + echo $git_root/.git cd $path; git --git-dir=$git_root/.git ls-files $prefix | grep -e ".*[.]xml$" | sed "s|^|$git_root/|g" } From 8196a864ac7eed769e726d7007ec07b511317cdd Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 19:00:06 -0800 Subject: [PATCH 09/33] wip: test --- scripts/validateXMLFiles.bash | 3 +- src/coreComponents/schema/schema.xsd | 113 +++++++++++++-- src/coreComponents/schema/schema.xsd.other | 157 +++++++++++---------- 3 files changed, 186 insertions(+), 87 deletions(-) diff --git a/scripts/validateXMLFiles.bash b/scripts/validateXMLFiles.bash index 6f7dc738e1c..5d6ab7eb1ed 100755 --- a/scripts/validateXMLFiles.bash +++ b/scripts/validateXMLFiles.bash @@ -63,8 +63,7 @@ list_xml_files_git () fi local prefix=$(cd $path; git rev-parse --show-prefix 2>/dev/null) echo $git_root - echo $git_root/.git - cd $path; git --git-dir=$git_root/.git ls-files $prefix | grep -e ".*[.]xml$" | sed "s|^|$git_root/|g" + cd $path; git --git-dir=$git_root"/.git" ls-files $prefix | grep -e ".*[.]xml$" | sed "s|^|$git_root/|g" } # emit location diff --git a/src/coreComponents/schema/schema.xsd b/src/coreComponents/schema/schema.xsd index 87f70867a1e..3e7e4904aa5 100644 --- a/src/coreComponents/schema/schema.xsd +++ b/src/coreComponents/schema/schema.xsd @@ -395,6 +395,10 @@ + + + + @@ -521,6 +525,10 @@ + + + + @@ -1849,6 +1857,8 @@ stress - traction is applied to the faces as specified by the inner product of i + + @@ -2302,6 +2312,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m + @@ -2625,6 +2636,8 @@ Level 0 outputs no specific information for this solver. Higher levels require m + + @@ -2671,7 +2684,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - + @@ -2692,8 +2705,6 @@ Level 0 outputs no specific information for this solver. Higher levels require m - - @@ -2708,7 +2719,12 @@ Level 0 outputs no specific information for this solver. Higher levels require m - + + + + + + @@ -2765,8 +2781,6 @@ Level 0 outputs no specific information for this solver. Higher levels require m - - @@ -2781,8 +2795,6 @@ Level 0 outputs no specific information for this solver. Higher levels require m - - @@ -3328,7 +3340,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m - + @@ -3351,7 +3363,7 @@ Local- Add jump stabilization on interior of macro elements--> - + @@ -3506,6 +3518,51 @@ Level 0 outputs no specific information for this solver. Higher levels require m + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4343,6 +4400,10 @@ Level 0 outputs no specific information for this solver. Higher levels require m + + + + + + + + + + + + + + + + @@ -4797,6 +4870,7 @@ Level 0 outputs no specific information for this solver. Higher levels require m + @@ -4860,6 +4934,19 @@ Level 0 outputs no specific information for this solver. Higher levels require m + + + + + + + + + + @@ -5071,11 +5158,11 @@ Level 0 outputs no specific information for this solver. Higher levels require m + - Print statistics for each source flux in each regions--> diff --git a/src/coreComponents/schema/schema.xsd.other b/src/coreComponents/schema/schema.xsd.other index bdfbfbec836..b455f6228c6 100644 --- a/src/coreComponents/schema/schema.xsd.other +++ b/src/coreComponents/schema/schema.xsd.other @@ -486,7 +486,7 @@ - + @@ -537,6 +537,7 @@ + @@ -575,7 +576,7 @@ - + @@ -612,7 +613,7 @@ - + @@ -663,7 +664,7 @@ - + @@ -704,7 +705,7 @@ - + @@ -737,7 +738,7 @@ - + @@ -748,7 +749,7 @@ - + @@ -761,7 +762,7 @@ - + @@ -774,7 +775,7 @@ - + @@ -790,7 +791,7 @@ - + @@ -824,7 +825,7 @@ - + @@ -887,7 +888,7 @@ - + @@ -918,7 +919,7 @@ - + @@ -953,7 +954,7 @@ - + @@ -966,7 +967,7 @@ - + @@ -979,7 +980,7 @@ - + @@ -991,10 +992,6 @@ - - - - @@ -1021,7 +1018,21 @@ - + + + + + + + + + + + + + + + @@ -1034,7 +1045,7 @@ - + @@ -1047,7 +1058,7 @@ - + @@ -1058,7 +1069,7 @@ - + @@ -1071,7 +1082,7 @@ - + @@ -1082,7 +1093,7 @@ - + @@ -1093,7 +1104,7 @@ - + @@ -1106,7 +1117,7 @@ - + @@ -1117,7 +1128,7 @@ - + @@ -1128,7 +1139,7 @@ - + @@ -1141,7 +1152,7 @@ - + @@ -1156,7 +1167,7 @@ - + @@ -1171,7 +1182,7 @@ - + @@ -1184,7 +1195,7 @@ - + @@ -1199,7 +1210,7 @@ - + @@ -1210,7 +1221,7 @@ - + @@ -1223,7 +1234,7 @@ - + @@ -1236,7 +1247,7 @@ - + @@ -1251,7 +1262,7 @@ - + @@ -1267,7 +1278,7 @@ - + @@ -1282,7 +1293,7 @@ - + @@ -1299,7 +1310,7 @@ - + @@ -1316,7 +1327,7 @@ - + @@ -1333,7 +1344,7 @@ - + @@ -1348,7 +1359,7 @@ - + @@ -1361,7 +1372,7 @@ - + @@ -1400,7 +1411,7 @@ - + @@ -1429,7 +1440,7 @@ - + @@ -1445,6 +1456,7 @@ + @@ -1475,6 +1487,7 @@ + @@ -1522,7 +1535,7 @@ - + @@ -3146,7 +3159,7 @@ - + @@ -3174,7 +3187,7 @@ - + @@ -3193,11 +3206,11 @@ - + - + @@ -3207,7 +3220,7 @@ - + @@ -3217,11 +3230,11 @@ - + - + @@ -3231,7 +3244,7 @@ - + @@ -3241,7 +3254,7 @@ - + @@ -3251,7 +3264,7 @@ - + @@ -3275,7 +3288,7 @@ - + @@ -3293,7 +3306,7 @@ - + @@ -3305,7 +3318,7 @@ - + @@ -3317,7 +3330,7 @@ - + @@ -3325,11 +3338,11 @@ - + - + @@ -3352,7 +3365,7 @@ - + @@ -3378,7 +3391,7 @@ - + @@ -3399,7 +3412,7 @@ - + @@ -3429,7 +3442,7 @@ - + @@ -3443,7 +3456,7 @@ - + @@ -3470,7 +3483,7 @@ - + @@ -3509,7 +3522,7 @@ - + From 6f2801f04aa21f834d3e425d75baadec45553881 Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 19:09:05 -0800 Subject: [PATCH 10/33] wip: test --- scripts/validateXMLFiles.bash | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/validateXMLFiles.bash b/scripts/validateXMLFiles.bash index 5d6ab7eb1ed..d710909d38b 100755 --- a/scripts/validateXMLFiles.bash +++ b/scripts/validateXMLFiles.bash @@ -62,8 +62,7 @@ list_xml_files_git () exit 1 fi local prefix=$(cd $path; git rev-parse --show-prefix 2>/dev/null) - echo $git_root - cd $path; git --git-dir=$git_root"/.git" ls-files $prefix | grep -e ".*[.]xml$" | sed "s|^|$git_root/|g" + git --git-dir=$git_root"/.git" ls-files $prefix | grep -e ".*[.]xml$" | sed "s|^|$git_root/|g" } # emit location @@ -77,6 +76,11 @@ echo -n > $LOGFILE for path in "$@"; do # emit location echo $path + local git_root_c=$(cd $path; git rev-parse --show-toplevel 2>/dev/null) + local prefix_c=$(cd $path; git rev-parse --show-prefix 2>/dev/null) + echo $git_root_c + echo $prefix_c + echo $git_root"/.git" list_xml_files_$METHOD $path | $XARGS xmllint --schema $SCHEMA --noout >> $LOGFILE 2>&1 done From 6f55e3704d382ecdb9339b707709cca0ef9ab107 Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 19:16:40 -0800 Subject: [PATCH 11/33] wip: test --- scripts/validateXMLFiles.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/validateXMLFiles.bash b/scripts/validateXMLFiles.bash index d710909d38b..886c2f84224 100755 --- a/scripts/validateXMLFiles.bash +++ b/scripts/validateXMLFiles.bash @@ -76,8 +76,8 @@ echo -n > $LOGFILE for path in "$@"; do # emit location echo $path - local git_root_c=$(cd $path; git rev-parse --show-toplevel 2>/dev/null) - local prefix_c=$(cd $path; git rev-parse --show-prefix 2>/dev/null) + git_root_c=$(cd $path; git rev-parse --show-toplevel 2>/dev/null) + prefix_c=$(cd $path; git rev-parse --show-prefix 2>/dev/null) echo $git_root_c echo $prefix_c echo $git_root"/.git" From 200cb3d8e394cc8fb0b560b72de5bb0ad12addf0 Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 19:28:44 -0800 Subject: [PATCH 12/33] wip: test --- scripts/validateXMLFiles.bash | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/validateXMLFiles.bash b/scripts/validateXMLFiles.bash index 886c2f84224..6fd7a0e893e 100755 --- a/scripts/validateXMLFiles.bash +++ b/scripts/validateXMLFiles.bash @@ -76,6 +76,7 @@ echo -n > $LOGFILE for path in "$@"; do # emit location echo $path + cd "$path" || { echo "Directory not found: $path"; exit 1; } git_root_c=$(cd $path; git rev-parse --show-toplevel 2>/dev/null) prefix_c=$(cd $path; git rev-parse --show-prefix 2>/dev/null) echo $git_root_c From cfddba17e06f5fcc1a2668a4e498743e97b24267 Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 19:37:34 -0800 Subject: [PATCH 13/33] wip: test --- scripts/validateXMLFiles.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/validateXMLFiles.bash b/scripts/validateXMLFiles.bash index 6fd7a0e893e..5aa06569f8a 100755 --- a/scripts/validateXMLFiles.bash +++ b/scripts/validateXMLFiles.bash @@ -77,8 +77,8 @@ for path in "$@"; do # emit location echo $path cd "$path" || { echo "Directory not found: $path"; exit 1; } - git_root_c=$(cd $path; git rev-parse --show-toplevel 2>/dev/null) - prefix_c=$(cd $path; git rev-parse --show-prefix 2>/dev/null) + git_root_c=$(git rev-parse --show-toplevel 2>/dev/null) + prefix_c=$(git rev-parse --show-prefix 2>/dev/null) echo $git_root_c echo $prefix_c echo $git_root"/.git" From 6953d77f7fe020ab74b875a94e6f5d7f17acd25f Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 19:46:32 -0800 Subject: [PATCH 14/33] wip: test --- scripts/validateXMLFiles.bash | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/validateXMLFiles.bash b/scripts/validateXMLFiles.bash index 5aa06569f8a..b1eb9b586e4 100755 --- a/scripts/validateXMLFiles.bash +++ b/scripts/validateXMLFiles.bash @@ -77,6 +77,7 @@ for path in "$@"; do # emit location echo $path cd "$path" || { echo "Directory not found: $path"; exit 1; } + pwd git_root_c=$(git rev-parse --show-toplevel 2>/dev/null) prefix_c=$(git rev-parse --show-prefix 2>/dev/null) echo $git_root_c From 544b910bcf035f193316f8cdf1a7b08f24de73e3 Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 20:02:41 -0800 Subject: [PATCH 15/33] wip: test --- scripts/validateXMLFiles.bash | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/validateXMLFiles.bash b/scripts/validateXMLFiles.bash index b1eb9b586e4..b8f2bc9f341 100755 --- a/scripts/validateXMLFiles.bash +++ b/scripts/validateXMLFiles.bash @@ -78,6 +78,7 @@ for path in "$@"; do echo $path cd "$path" || { echo "Directory not found: $path"; exit 1; } pwd + ls -la git_root_c=$(git rev-parse --show-toplevel 2>/dev/null) prefix_c=$(git rev-parse --show-prefix 2>/dev/null) echo $git_root_c From df5a357d1998f0b01bf2f4c1df030dfa429e6155 Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 20:08:27 -0800 Subject: [PATCH 16/33] wip: test --- src/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 595f1cadf18..ae096dd13ad 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -160,6 +160,7 @@ if( ENABLE_XML_UPDATES AND ENABLE_MPI AND UNIX AND NOT ENABLE_CUDA AND NOT ENABL set(SCHEMA_DIR ${CMAKE_SOURCE_DIR}/coreComponents/schema) set(SCRIPT_DIR ${CMAKE_SOURCE_DIR}/../scripts) + set(SOURCE_DIR ${CMAKE_SOURCE_DIR}/..) add_custom_target( geosx_generate_schema ALL @@ -179,7 +180,7 @@ if( ENABLE_XML_UPDATES AND ENABLE_MPI AND UNIX AND NOT ENABLE_CUDA AND NOT ENABL add_custom_target( geosx_validate_all_xml_files ALL - COMMAND bash ${SCRIPT_DIR}/validateXMLFiles.bash -g ${SCHEMA_DIR}/schema.xsd ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/../examples ${CMAKE_SOURCE_DIR}/../inputFiles + COMMAND bash ${SCRIPT_DIR}/validateXMLFiles.bash -g ${SCHEMA_DIR}/schema.xsd ${SOURCE_DIR} ${SOURCE_DIR}/examples ${CMAKE_SOURCE_DIR}/inputFiles WORKING_DIRECTORY ${CMAKE_BINARY_DIR} DEPENDS geosx_generate_schema COMMENT "Validating all XML files in the repository against the schema" From fd7dd0196f37098f9ad05ddf1d25707c23655106 Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 20:14:32 -0800 Subject: [PATCH 17/33] wip:test --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ae096dd13ad..24ea9f42401 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -160,7 +160,7 @@ if( ENABLE_XML_UPDATES AND ENABLE_MPI AND UNIX AND NOT ENABLE_CUDA AND NOT ENABL set(SCHEMA_DIR ${CMAKE_SOURCE_DIR}/coreComponents/schema) set(SCRIPT_DIR ${CMAKE_SOURCE_DIR}/../scripts) - set(SOURCE_DIR ${CMAKE_SOURCE_DIR}/..) + set(SOURCE_DIR ../${CMAKE_SOURCE_DIR}) add_custom_target( geosx_generate_schema ALL From e0a57b6431025508da8abdf7445a5f185f3bafd0 Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 20:22:42 -0800 Subject: [PATCH 18/33] wip: test --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 24ea9f42401..516483f16df 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -160,7 +160,7 @@ if( ENABLE_XML_UPDATES AND ENABLE_MPI AND UNIX AND NOT ENABLE_CUDA AND NOT ENABL set(SCHEMA_DIR ${CMAKE_SOURCE_DIR}/coreComponents/schema) set(SCRIPT_DIR ${CMAKE_SOURCE_DIR}/../scripts) - set(SOURCE_DIR ../${CMAKE_SOURCE_DIR}) + set(SOURCE_DIR "${CMAKE_SOURCE_DIR}/..") add_custom_target( geosx_generate_schema ALL From 8007671083813c772db8b00125774617cc0412e3 Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 20:34:37 -0800 Subject: [PATCH 19/33] wip: fix --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 516483f16df..b11eb341b3a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -180,7 +180,7 @@ if( ENABLE_XML_UPDATES AND ENABLE_MPI AND UNIX AND NOT ENABLE_CUDA AND NOT ENABL add_custom_target( geosx_validate_all_xml_files ALL - COMMAND bash ${SCRIPT_DIR}/validateXMLFiles.bash -g ${SCHEMA_DIR}/schema.xsd ${SOURCE_DIR} ${SOURCE_DIR}/examples ${CMAKE_SOURCE_DIR}/inputFiles + COMMAND bash ${SCRIPT_DIR}/validateXMLFiles.bash -g ${SCHEMA_DIR}/schema.xsd ${SOURCE_DIR} ${SOURCE_DIR}/examples ${SOURCE_DIR}/inputFiles WORKING_DIRECTORY ${CMAKE_BINARY_DIR} DEPENDS geosx_generate_schema COMMENT "Validating all XML files in the repository against the schema" From a6f47264b3a8a3c65fe37b9ef4d4745e4341f5d2 Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 20:48:46 -0800 Subject: [PATCH 20/33] wip: test --- scripts/validateXMLFiles.bash | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/validateXMLFiles.bash b/scripts/validateXMLFiles.bash index b8f2bc9f341..87dbfe9e917 100755 --- a/scripts/validateXMLFiles.bash +++ b/scripts/validateXMLFiles.bash @@ -79,6 +79,8 @@ for path in "$@"; do cd "$path" || { echo "Directory not found: $path"; exit 1; } pwd ls -la + git status + sudo git status git_root_c=$(git rev-parse --show-toplevel 2>/dev/null) prefix_c=$(git rev-parse --show-prefix 2>/dev/null) echo $git_root_c From 260036aabe040f7f6398386dd7d02b6bb6074b38 Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 21:00:16 -0800 Subject: [PATCH 21/33] wip:test --- scripts/validateXMLFiles.bash | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/validateXMLFiles.bash b/scripts/validateXMLFiles.bash index 87dbfe9e917..a6ce9ed1b3b 100755 --- a/scripts/validateXMLFiles.bash +++ b/scripts/validateXMLFiles.bash @@ -17,6 +17,7 @@ if [ -z "$1" ]; then fi SCHEMA=$1; shift +SOURCE_DIR=$2; shift LOGFILE=xml_validation_results.log # "-r" in GNU xargs omits the call if input is empty @@ -65,6 +66,9 @@ list_xml_files_git () git --git-dir=$git_root"/.git" ls-files $prefix | grep -e ".*[.]xml$" | sed "s|^|$git_root/|g" } +echo $SOURCE_DIR +git config --global --add safe.directory $SOURCE_DIR + # emit location ls -l pwd From cca84a36a0888b3b512bde0b26bedf35827749e1 Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 21:12:10 -0800 Subject: [PATCH 22/33] wip: improving logic --- scripts/validateXMLFiles.bash | 19 +++++++++++++++---- src/CMakeLists.txt | 4 ++-- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/scripts/validateXMLFiles.bash b/scripts/validateXMLFiles.bash index a6ce9ed1b3b..bf5d12627ee 100755 --- a/scripts/validateXMLFiles.bash +++ b/scripts/validateXMLFiles.bash @@ -17,7 +17,7 @@ if [ -z "$1" ]; then fi SCHEMA=$1; shift -SOURCE_DIR=$2; shift +GIT_REPO_DIR=$2; shift LOGFILE=xml_validation_results.log # "-r" in GNU xargs omits the call if input is empty @@ -66,8 +66,17 @@ list_xml_files_git () git --git-dir=$git_root"/.git" ls-files $prefix | grep -e ".*[.]xml$" | sed "s|^|$git_root/|g" } -echo $SOURCE_DIR -git config --global --add safe.directory $SOURCE_DIR +# Check GIT_REPO_DIR and its existence. Then add it to Git safe directories +if [ -z "$GIT_REPO_DIR" ]; then + echo "Error: GIT_REPO_DIR is not set." && exit 1 +elif [ ! -d "$GIT_REPO_DIR" ]; then + echo "Error: The specified GIT_REPO_DIR '$GIT_REPO_DIR' does not exist." && exit 1 +else + echo "Adding '$GIT_REPO_DIR' to Git safe directories..." + git config --global --add safe.directory "$GIT_REPO_DIR" && \ + echo "'$GIT_REPO_DIR' has been successfully added." || \ + echo "Error: Failed to add '$GIT_REPO_DIR'." +fi # emit location ls -l @@ -90,7 +99,9 @@ for path in "$@"; do echo $git_root_c echo $prefix_c echo $git_root"/.git" - list_xml_files_$METHOD $path | $XARGS xmllint --schema $SCHEMA --noout >> $LOGFILE 2>&1 + collected_xml_files=$(list_xml_files_$METHOD $path) + echo $collected_xml_files + $collected_xml_files | $XARGS xmllint --schema $SCHEMA --noout >> $LOGFILE 2>&1 done # print any failed validations on the stderr diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b11eb341b3a..cb78f3ba0f4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -160,7 +160,7 @@ if( ENABLE_XML_UPDATES AND ENABLE_MPI AND UNIX AND NOT ENABLE_CUDA AND NOT ENABL set(SCHEMA_DIR ${CMAKE_SOURCE_DIR}/coreComponents/schema) set(SCRIPT_DIR ${CMAKE_SOURCE_DIR}/../scripts) - set(SOURCE_DIR "${CMAKE_SOURCE_DIR}/..") + set(GIT_SOURCE_DIR "${CMAKE_SOURCE_DIR}/..") add_custom_target( geosx_generate_schema ALL @@ -180,7 +180,7 @@ if( ENABLE_XML_UPDATES AND ENABLE_MPI AND UNIX AND NOT ENABLE_CUDA AND NOT ENABL add_custom_target( geosx_validate_all_xml_files ALL - COMMAND bash ${SCRIPT_DIR}/validateXMLFiles.bash -g ${SCHEMA_DIR}/schema.xsd ${SOURCE_DIR} ${SOURCE_DIR}/examples ${SOURCE_DIR}/inputFiles + COMMAND bash ${SCRIPT_DIR}/validateXMLFiles.bash -g ${SCHEMA_DIR}/schema.xsd ${GIT_SOURCE_DIR} ${GIT_SOURCE_DIR}/examples ${GIT_SOURCE_DIR}/inputFiles WORKING_DIRECTORY ${CMAKE_BINARY_DIR} DEPENDS geosx_generate_schema COMMENT "Validating all XML files in the repository against the schema" From 42b11cb90e6d2b3d9a379539b0cf16c849c40391 Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 21:21:07 -0800 Subject: [PATCH 23/33] wip:test --- scripts/validateXMLFiles.bash | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/validateXMLFiles.bash b/scripts/validateXMLFiles.bash index bf5d12627ee..987a6666653 100755 --- a/scripts/validateXMLFiles.bash +++ b/scripts/validateXMLFiles.bash @@ -93,7 +93,6 @@ for path in "$@"; do pwd ls -la git status - sudo git status git_root_c=$(git rev-parse --show-toplevel 2>/dev/null) prefix_c=$(git rev-parse --show-prefix 2>/dev/null) echo $git_root_c From 7906fa451b7913ab893388d2e5991913ba589db5 Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 21:29:44 -0800 Subject: [PATCH 24/33] wip:test --- scripts/validateXMLFiles.bash | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/scripts/validateXMLFiles.bash b/scripts/validateXMLFiles.bash index 987a6666653..201f03fe5b6 100755 --- a/scripts/validateXMLFiles.bash +++ b/scripts/validateXMLFiles.bash @@ -17,7 +17,6 @@ if [ -z "$1" ]; then fi SCHEMA=$1; shift -GIT_REPO_DIR=$2; shift LOGFILE=xml_validation_results.log # "-r" in GNU xargs omits the call if input is empty @@ -38,6 +37,19 @@ fi if [ "$METHOD" = "git" ] && ! (hash git &> /dev/null); then >&2 echo "Error: git is required when -g or --git is specified" exit +else + GIT_REPO_DIR=$2; shift + # Check GIT_REPO_DIR and its existence. Then add it to Git safe directories + if [ -z "$GIT_REPO_DIR" ]; then + echo "Error: GIT_REPO_DIR is not set." && exit 1 + elif [ ! -d "$GIT_REPO_DIR" ]; then + echo "Error: The specified GIT_REPO_DIR '$GIT_REPO_DIR' does not exist." && exit 1 + else + echo "Adding '$GIT_REPO_DIR' to Git safe directories..." + git config --global --add safe.directory "$GIT_REPO_DIR" && \ + echo "'$GIT_REPO_DIR' has been successfully added." || \ + echo "Error: Failed to add '$GIT_REPO_DIR'." + fi fi abs_path () @@ -66,17 +78,7 @@ list_xml_files_git () git --git-dir=$git_root"/.git" ls-files $prefix | grep -e ".*[.]xml$" | sed "s|^|$git_root/|g" } -# Check GIT_REPO_DIR and its existence. Then add it to Git safe directories -if [ -z "$GIT_REPO_DIR" ]; then - echo "Error: GIT_REPO_DIR is not set." && exit 1 -elif [ ! -d "$GIT_REPO_DIR" ]; then - echo "Error: The specified GIT_REPO_DIR '$GIT_REPO_DIR' does not exist." && exit 1 -else - echo "Adding '$GIT_REPO_DIR' to Git safe directories..." - git config --global --add safe.directory "$GIT_REPO_DIR" && \ - echo "'$GIT_REPO_DIR' has been successfully added." || \ - echo "Error: Failed to add '$GIT_REPO_DIR'." -fi + # emit location ls -l From f39a6db1edfb9b1d26b702a7f8b4abfdf55c45a6 Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 21:38:02 -0800 Subject: [PATCH 25/33] wip:test --- scripts/validateXMLFiles.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/validateXMLFiles.bash b/scripts/validateXMLFiles.bash index 201f03fe5b6..fc0e1a53780 100755 --- a/scripts/validateXMLFiles.bash +++ b/scripts/validateXMLFiles.bash @@ -38,7 +38,7 @@ if [ "$METHOD" = "git" ] && ! (hash git &> /dev/null); then >&2 echo "Error: git is required when -g or --git is specified" exit else - GIT_REPO_DIR=$2; shift + GIT_REPO_DIR=$2; # Check GIT_REPO_DIR and its existence. Then add it to Git safe directories if [ -z "$GIT_REPO_DIR" ]; then echo "Error: GIT_REPO_DIR is not set." && exit 1 From 41c61f181b36684de671947c25b5c1d16e5ed919 Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 22:16:56 -0800 Subject: [PATCH 26/33] wip:test --- scripts/validateXMLFiles.bash | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/validateXMLFiles.bash b/scripts/validateXMLFiles.bash index fc0e1a53780..780b3863db4 100755 --- a/scripts/validateXMLFiles.bash +++ b/scripts/validateXMLFiles.bash @@ -39,6 +39,8 @@ if [ "$METHOD" = "git" ] && ! (hash git &> /dev/null); then exit else GIT_REPO_DIR=$2; + echo "INFO: The specified GIT_REPO_DIR" + echo $GIT_REPO_DIR # Check GIT_REPO_DIR and its existence. Then add it to Git safe directories if [ -z "$GIT_REPO_DIR" ]; then echo "Error: GIT_REPO_DIR is not set." && exit 1 From 81e25c48088d9db3464e8cdf9d3f446ea36af250 Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 22:29:11 -0800 Subject: [PATCH 27/33] wip:test --- scripts/validateXMLFiles.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/validateXMLFiles.bash b/scripts/validateXMLFiles.bash index 780b3863db4..4e7a4c5ffce 100755 --- a/scripts/validateXMLFiles.bash +++ b/scripts/validateXMLFiles.bash @@ -17,6 +17,7 @@ if [ -z "$1" ]; then fi SCHEMA=$1; shift +GIT_REPO_DIR=$2; LOGFILE=xml_validation_results.log # "-r" in GNU xargs omits the call if input is empty @@ -38,7 +39,6 @@ if [ "$METHOD" = "git" ] && ! (hash git &> /dev/null); then >&2 echo "Error: git is required when -g or --git is specified" exit else - GIT_REPO_DIR=$2; echo "INFO: The specified GIT_REPO_DIR" echo $GIT_REPO_DIR # Check GIT_REPO_DIR and its existence. Then add it to Git safe directories From 2995ee75e72753a1157b7564d587b7384199e66f Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 22:33:01 -0800 Subject: [PATCH 28/33] wip:test --- scripts/validateXMLFiles.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/validateXMLFiles.bash b/scripts/validateXMLFiles.bash index 4e7a4c5ffce..56a1ac1f5ce 100755 --- a/scripts/validateXMLFiles.bash +++ b/scripts/validateXMLFiles.bash @@ -17,7 +17,6 @@ if [ -z "$1" ]; then fi SCHEMA=$1; shift -GIT_REPO_DIR=$2; LOGFILE=xml_validation_results.log # "-r" in GNU xargs omits the call if input is empty @@ -39,6 +38,7 @@ if [ "$METHOD" = "git" ] && ! (hash git &> /dev/null); then >&2 echo "Error: git is required when -g or --git is specified" exit else + GIT_REPO_DIR=$1; echo "INFO: The specified GIT_REPO_DIR" echo $GIT_REPO_DIR # Check GIT_REPO_DIR and its existence. Then add it to Git safe directories From 8cba8ebe14e6ba7cb5bd2d185777a9ea4bde834f Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 22:44:11 -0800 Subject: [PATCH 29/33] wip:test --- scripts/validateXMLFiles.bash | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/validateXMLFiles.bash b/scripts/validateXMLFiles.bash index 56a1ac1f5ce..023a25c986a 100755 --- a/scripts/validateXMLFiles.bash +++ b/scripts/validateXMLFiles.bash @@ -41,6 +41,7 @@ else GIT_REPO_DIR=$1; echo "INFO: The specified GIT_REPO_DIR" echo $GIT_REPO_DIR + sudo chown -R root:root $GIT_REPO_DIR # Check GIT_REPO_DIR and its existence. Then add it to Git safe directories if [ -z "$GIT_REPO_DIR" ]; then echo "Error: GIT_REPO_DIR is not set." && exit 1 From c495d874ffa2b24aefe2248244ef841bb4db77f1 Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 22:54:46 -0800 Subject: [PATCH 30/33] wip:test --- scripts/validateXMLFiles.bash | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/validateXMLFiles.bash b/scripts/validateXMLFiles.bash index 023a25c986a..4f15143747b 100755 --- a/scripts/validateXMLFiles.bash +++ b/scripts/validateXMLFiles.bash @@ -52,6 +52,8 @@ else git config --global --add safe.directory "$GIT_REPO_DIR" && \ echo "'$GIT_REPO_DIR' has been successfully added." || \ echo "Error: Failed to add '$GIT_REPO_DIR'." + echo "INFO: Printing safe.directory: " + git config --global --list | grep safe.directory fi fi From 9be43ac8b4c202ed677faa0e69585e4aab893b79 Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 23:03:31 -0800 Subject: [PATCH 31/33] wip:test --- scripts/validateXMLFiles.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/validateXMLFiles.bash b/scripts/validateXMLFiles.bash index 4f15143747b..e25e0310f5e 100755 --- a/scripts/validateXMLFiles.bash +++ b/scripts/validateXMLFiles.bash @@ -41,7 +41,7 @@ else GIT_REPO_DIR=$1; echo "INFO: The specified GIT_REPO_DIR" echo $GIT_REPO_DIR - sudo chown -R root:root $GIT_REPO_DIR + chown -R root:root $GIT_REPO_DIR # Check GIT_REPO_DIR and its existence. Then add it to Git safe directories if [ -z "$GIT_REPO_DIR" ]; then echo "Error: GIT_REPO_DIR is not set." && exit 1 From 5256708db12926d30e529aaacfb4d7de89e3a9ea Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 23:11:28 -0800 Subject: [PATCH 32/33] wip:test --- scripts/validateXMLFiles.bash | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/validateXMLFiles.bash b/scripts/validateXMLFiles.bash index e25e0310f5e..87fa4d27366 100755 --- a/scripts/validateXMLFiles.bash +++ b/scripts/validateXMLFiles.bash @@ -41,7 +41,6 @@ else GIT_REPO_DIR=$1; echo "INFO: The specified GIT_REPO_DIR" echo $GIT_REPO_DIR - chown -R root:root $GIT_REPO_DIR # Check GIT_REPO_DIR and its existence. Then add it to Git safe directories if [ -z "$GIT_REPO_DIR" ]; then echo "Error: GIT_REPO_DIR is not set." && exit 1 From abfe003d3bb5044c9503ebbe44de4a84c4c5e04e Mon Sep 17 00:00:00 2001 From: Omar Duran Date: Tue, 28 Jan 2025 23:26:34 -0800 Subject: [PATCH 33/33] wip:test --- scripts/validateXMLFiles.bash | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/validateXMLFiles.bash b/scripts/validateXMLFiles.bash index 87fa4d27366..b95076f4fe4 100755 --- a/scripts/validateXMLFiles.bash +++ b/scripts/validateXMLFiles.bash @@ -83,9 +83,8 @@ list_xml_files_git () } - +git --version # emit location -ls -l pwd # create/nullify the log file