From 1a5db708b0e9ec6425d8f18578da6d4c410f0230 Mon Sep 17 00:00:00 2001 From: jennyhickson Date: Mon, 15 Dec 2025 14:22:13 +0000 Subject: [PATCH 1/4] add error message --- lfric_macros/check_macro_chains.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lfric_macros/check_macro_chains.py b/lfric_macros/check_macro_chains.py index e59906e..af7316d 100755 --- a/lfric_macros/check_macro_chains.py +++ b/lfric_macros/check_macro_chains.py @@ -98,10 +98,26 @@ def compare_tags(before, after, path, errors): ) + "\n".join(x for x in single_tags) +def check_fcm(): + """ + Check if this script is being run for a fcm working copy and fail gracefully + if so. + """ + dependency = os.path.join(os.environ["SOURCE_ROOT"], "apps", "dependencies.sh") + + if os.path.exists(dependency): + raise Exception( + "[ERROR] check_macro_chains.py no longer works with FCM sources. " + "Please ignore this error until you have migrated your work" + "to GitHub. Thank you" + ) + + def main(): """ Main function of the program """ + check_fcm() source_apps = os.path.join(os.environ["SOURCE_ROOT"], "lfric_apps") source_core = os.path.join(os.environ["SOURCE_ROOT"], "lfric_core") From 2817c604e6a826229fcdb18678bd91e739f96025 Mon Sep 17 00:00:00 2001 From: jennyhickson Date: Mon, 15 Dec 2025 14:59:13 +0000 Subject: [PATCH 2/4] add debug message --- lfric_macros/check_macro_chains.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lfric_macros/check_macro_chains.py b/lfric_macros/check_macro_chains.py index af7316d..d85a147 100755 --- a/lfric_macros/check_macro_chains.py +++ b/lfric_macros/check_macro_chains.py @@ -105,6 +105,7 @@ def check_fcm(): """ dependency = os.path.join(os.environ["SOURCE_ROOT"], "apps", "dependencies.sh") + print ("check FCM") if os.path.exists(dependency): raise Exception( "[ERROR] check_macro_chains.py no longer works with FCM sources. " From 36e60281be77646d9cf655d049179cb4eacad8a6 Mon Sep 17 00:00:00 2001 From: jennyhickson Date: Mon, 15 Dec 2025 15:47:02 +0000 Subject: [PATCH 3/4] add space --- lfric_macros/check_macro_chains.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lfric_macros/check_macro_chains.py b/lfric_macros/check_macro_chains.py index d85a147..e5daf68 100755 --- a/lfric_macros/check_macro_chains.py +++ b/lfric_macros/check_macro_chains.py @@ -109,7 +109,7 @@ def check_fcm(): if os.path.exists(dependency): raise Exception( "[ERROR] check_macro_chains.py no longer works with FCM sources. " - "Please ignore this error until you have migrated your work" + "Please ignore this error until you have migrated your work " "to GitHub. Thank you" ) From 7ed28a555ff89217338839059e2dfd0665a435c9 Mon Sep 17 00:00:00 2001 From: jennyhickson Date: Mon, 15 Dec 2025 15:47:33 +0000 Subject: [PATCH 4/4] remove debug print --- lfric_macros/check_macro_chains.py | 1 - 1 file changed, 1 deletion(-) diff --git a/lfric_macros/check_macro_chains.py b/lfric_macros/check_macro_chains.py index e5daf68..f606e30 100755 --- a/lfric_macros/check_macro_chains.py +++ b/lfric_macros/check_macro_chains.py @@ -105,7 +105,6 @@ def check_fcm(): """ dependency = os.path.join(os.environ["SOURCE_ROOT"], "apps", "dependencies.sh") - print ("check FCM") if os.path.exists(dependency): raise Exception( "[ERROR] check_macro_chains.py no longer works with FCM sources. "