From a2fcab5f375469a75de51bdc4abc740a56ab441e Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Tue, 22 Sep 2026 17:17:35 +0100 Subject: [PATCH 01/70] first attempt at improve-quality-job comparison job --- .github/workflows/process.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index bbe664f884..7e1d9c19eb 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -155,6 +155,31 @@ jobs: hatch run lint:fmt_extra "${files[@]}" + env: # need number of errors being flagged in these files + num_pr_errors: $(hatch run lint:fmt_extra "${files[@]}" | wc -l) + + - name: Get information about the current run + uses: Fusion-Power-Plant-Framework/fppf-actions/get-workflow-origin@f94a8de5f658cf65c79e1f143a7a31fb94a05793 + id: workflow-run-info + - name: Checkout main for linting comparison + if: steps.workflow-run-info.outputs.pullRequestNumber != '' + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + ref: ${{ workflow-run-info.outputs.targetBranch }} + - name: Linting comparison with main + env: + num_main_errors: $(hatch run lint:fmt_extra "${files[@]}" | wc -l) + compared_errors: num_pr_errors - num_main_errors + - name: Warning comment + if: compared_errors > 0 + uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 + with: + issue-number: ${{ steps.workflow-run-info.outputs.pullRequestNumber }} + body: | + ⚠️ improve_quality_job warning! + Files changed by this PR have introduced $compared_errors more linting errors when compared to main. + Please fix these + tracking: # update tracker to include the MFILEs created by the run-tracking-inputs job From f062f8b33a18079326781900fe4a15a72aa0ef83 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Tue, 22 Sep 2026 17:20:38 +0100 Subject: [PATCH 02/70] add env. to access vars --- .github/workflows/process.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 7e1d9c19eb..f3849fd31a 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -169,9 +169,9 @@ jobs: - name: Linting comparison with main env: num_main_errors: $(hatch run lint:fmt_extra "${files[@]}" | wc -l) - compared_errors: num_pr_errors - num_main_errors + compared_errors: env.num_pr_errors - env.num_main_errors - name: Warning comment - if: compared_errors > 0 + if: env.compared_errors > 0 uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 with: issue-number: ${{ steps.workflow-run-info.outputs.pullRequestNumber }} From 74e7f775769f7696e370d11603adf6ede918fa01 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Wed, 23 Sep 2026 10:29:15 +0100 Subject: [PATCH 03/70] test --- .github/workflows/process.yml | 46 +++++++++++++++++------------------ 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index f3849fd31a..291a8bd1e6 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -155,30 +155,30 @@ jobs: hatch run lint:fmt_extra "${files[@]}" - env: # need number of errors being flagged in these files - num_pr_errors: $(hatch run lint:fmt_extra "${files[@]}" | wc -l) + # env: # need number of errors being flagged in these files + # num_pr_errors: $(hatch run lint:fmt_extra "${files[@]}" | wc -l) - - name: Get information about the current run - uses: Fusion-Power-Plant-Framework/fppf-actions/get-workflow-origin@f94a8de5f658cf65c79e1f143a7a31fb94a05793 - id: workflow-run-info - - name: Checkout main for linting comparison - if: steps.workflow-run-info.outputs.pullRequestNumber != '' - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - ref: ${{ workflow-run-info.outputs.targetBranch }} - - name: Linting comparison with main - env: - num_main_errors: $(hatch run lint:fmt_extra "${files[@]}" | wc -l) - compared_errors: env.num_pr_errors - env.num_main_errors - - name: Warning comment - if: env.compared_errors > 0 - uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 - with: - issue-number: ${{ steps.workflow-run-info.outputs.pullRequestNumber }} - body: | - ⚠️ improve_quality_job warning! - Files changed by this PR have introduced $compared_errors more linting errors when compared to main. - Please fix these + # - name: Get information about the current run + # uses: Fusion-Power-Plant-Framework/fppf-actions/get-workflow-origin@f94a8de5f658cf65c79e1f143a7a31fb94a05793 + # id: workflow-run-info + # - name: Checkout main for linting comparison + # if: steps.workflow-run-info.outputs.pullRequestNumber != '' + # uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + # with: + # ref: ${{ workflow-run-info.outputs.targetBranch }} + # - name: Linting comparison with main + # env: + # num_main_errors: $(hatch run lint:fmt_extra "${files[@]}" | wc -l) + # compared_errors: env.num_pr_errors - env.num_main_errors + # - name: Warning comment + # if: env.compared_errors > 0 + # uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 + # with: + # issue-number: ${{ steps.workflow-run-info.outputs.pullRequestNumber }} + # body: | + # ⚠️ improve_quality_job warning! + # Files changed by this PR have introduced $compared_errors more linting errors when compared to main. + # Please fix these tracking: From 6480172251f654aeedc32c42c0b3df291ea6986c Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Thu, 24 Sep 2026 14:40:17 +0100 Subject: [PATCH 04/70] trying to get running --- .github/workflows/process.yml | 46 +++++++++++++++++------------------ 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 291a8bd1e6..4d92b99110 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -155,30 +155,30 @@ jobs: hatch run lint:fmt_extra "${files[@]}" - # env: # need number of errors being flagged in these files - # num_pr_errors: $(hatch run lint:fmt_extra "${files[@]}" | wc -l) + env: # need number of errors being flagged in these files + num_pr_errors: $(hatch run lint:fmt_extra "${files[@]}" | wc -l) - # - name: Get information about the current run - # uses: Fusion-Power-Plant-Framework/fppf-actions/get-workflow-origin@f94a8de5f658cf65c79e1f143a7a31fb94a05793 - # id: workflow-run-info - # - name: Checkout main for linting comparison - # if: steps.workflow-run-info.outputs.pullRequestNumber != '' - # uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - # with: - # ref: ${{ workflow-run-info.outputs.targetBranch }} - # - name: Linting comparison with main - # env: - # num_main_errors: $(hatch run lint:fmt_extra "${files[@]}" | wc -l) - # compared_errors: env.num_pr_errors - env.num_main_errors - # - name: Warning comment - # if: env.compared_errors > 0 - # uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 - # with: - # issue-number: ${{ steps.workflow-run-info.outputs.pullRequestNumber }} - # body: | - # ⚠️ improve_quality_job warning! - # Files changed by this PR have introduced $compared_errors more linting errors when compared to main. - # Please fix these + - name: Get information about the current run + uses: Fusion-Power-Plant-Framework/fppf-actions/get-workflow-origin@f94a8de5f658cf65c79e1f143a7a31fb94a05793 + id: workflow-run-info + - name: Checkout main for linting comparison + if: steps.workflow-run-info.outputs.pullRequestNumber != '' + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + ref: ${{ workflow-run-info.outputs.targetBranch }} + - name: Linting comparison with main + env: + num_main_errors: $(hatch run lint:fmt_extra "${files[@]}" | wc -l) + compared_errors: ${{env.num_pr_errors - env.num_main_errors}} + - name: Warning comment + if: env.compared_errors > 0 + uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 + with: + issue-number: ${{ steps.workflow-run-info.outputs.pullRequestNumber }} + body: | + ⚠️ improve_quality_job warning! + Files changed by this PR have introduced $compared_errors more linting errors when compared to main. + Please fix these tracking: From 71de18598a3b318276e0f27087cdbc50ca85b14e Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Thu, 24 Sep 2026 15:32:31 +0100 Subject: [PATCH 05/70] fixes - subtract 1, and subtract correctly for compared errors --- .github/workflows/process.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 4d92b99110..91c9684d1a 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -156,7 +156,8 @@ jobs: hatch run lint:fmt_extra "${files[@]}" env: # need number of errors being flagged in these files - num_pr_errors: $(hatch run lint:fmt_extra "${files[@]}" | wc -l) + # subtract 1 as final summary line is not an error + num_pr_errors: $(($(hatch run lint:fmt_extra "${files[@]}" | wc -l) - 1)) - name: Get information about the current run uses: Fusion-Power-Plant-Framework/fppf-actions/get-workflow-origin@f94a8de5f658cf65c79e1f143a7a31fb94a05793 @@ -168,8 +169,8 @@ jobs: ref: ${{ workflow-run-info.outputs.targetBranch }} - name: Linting comparison with main env: - num_main_errors: $(hatch run lint:fmt_extra "${files[@]}" | wc -l) - compared_errors: ${{env.num_pr_errors - env.num_main_errors}} + num_main_errors: $(($(hatch run lint:fmt_extra "${files[@]}" | wc -l) - 1)) + compared_errors: $((env.num_pr_errors - env.num_main_errors)) - name: Warning comment if: env.compared_errors > 0 uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 From 21b28689e9fafed2ed0823699cf339d47527807c Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Thu, 24 Sep 2026 15:34:41 +0100 Subject: [PATCH 06/70] use steps.workflow-run-info --- .github/workflows/process.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 91c9684d1a..9e712d7268 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -166,7 +166,7 @@ jobs: if: steps.workflow-run-info.outputs.pullRequestNumber != '' uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: - ref: ${{ workflow-run-info.outputs.targetBranch }} + ref: ${{ steps.workflow-run-info.outputs.targetBranch }} - name: Linting comparison with main env: num_main_errors: $(($(hatch run lint:fmt_extra "${files[@]}" | wc -l) - 1)) From d2c00797b7b7d45545857ffd6a9fcc8cae2e42c3 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Thu, 24 Sep 2026 15:39:50 +0100 Subject: [PATCH 07/70] get number from final line of output --- .github/workflows/process.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 9e712d7268..f3cf95dcbe 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -157,7 +157,7 @@ jobs: env: # need number of errors being flagged in these files # subtract 1 as final summary line is not an error - num_pr_errors: $(($(hatch run lint:fmt_extra "${files[@]}" | wc -l) - 1)) + num_pr_errors: $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') - name: Get information about the current run uses: Fusion-Power-Plant-Framework/fppf-actions/get-workflow-origin@f94a8de5f658cf65c79e1f143a7a31fb94a05793 @@ -169,7 +169,7 @@ jobs: ref: ${{ steps.workflow-run-info.outputs.targetBranch }} - name: Linting comparison with main env: - num_main_errors: $(($(hatch run lint:fmt_extra "${files[@]}" | wc -l) - 1)) + num_main_errors: $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') compared_errors: $((env.num_pr_errors - env.num_main_errors)) - name: Warning comment if: env.compared_errors > 0 From 430943cb6e4693813f7292bf425b0cfe23033834 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Thu, 24 Sep 2026 15:46:05 +0100 Subject: [PATCH 08/70] new line --- .github/workflows/process.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index f3cf95dcbe..b55e7023d4 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -155,7 +155,8 @@ jobs: hatch run lint:fmt_extra "${files[@]}" - env: # need number of errors being flagged in these files + env: + # need number of errors being flagged in these files # subtract 1 as final summary line is not an error num_pr_errors: $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') From 74ee33134deaa9db50ca268f8c5bb246afed5a57 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Thu, 24 Sep 2026 15:53:35 +0100 Subject: [PATCH 09/70] try to fix error --- .github/workflows/process.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index b55e7023d4..4942467ba3 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -169,6 +169,7 @@ jobs: with: ref: ${{ steps.workflow-run-info.outputs.targetBranch }} - name: Linting comparison with main + if: steps.workflow-run-info.outputs.pullRequestNumber != '' env: num_main_errors: $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') compared_errors: $((env.num_pr_errors - env.num_main_errors)) From 3018b9676df1478751a5f04844ec471de08bf878 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Thu, 24 Sep 2026 15:54:51 +0100 Subject: [PATCH 10/70] try to fix --- .github/workflows/process.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 4942467ba3..58a04acf06 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -163,7 +163,8 @@ jobs: - name: Get information about the current run uses: Fusion-Power-Plant-Framework/fppf-actions/get-workflow-origin@f94a8de5f658cf65c79e1f143a7a31fb94a05793 id: workflow-run-info - - name: Checkout main for linting comparison + - name: Checkout + # check out main if: steps.workflow-run-info.outputs.pullRequestNumber != '' uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: From 0f323c3101a447d8ecd3eaeba7980129810dc52d Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Thu, 24 Sep 2026 15:59:58 +0100 Subject: [PATCH 11/70] testing --- .github/workflows/process.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 58a04acf06..227d3aaf87 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -163,14 +163,12 @@ jobs: - name: Get information about the current run uses: Fusion-Power-Plant-Framework/fppf-actions/get-workflow-origin@f94a8de5f658cf65c79e1f143a7a31fb94a05793 id: workflow-run-info - - name: Checkout + - name: Checkout and lint on main # check out main if: steps.workflow-run-info.outputs.pullRequestNumber != '' uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ steps.workflow-run-info.outputs.targetBranch }} - - name: Linting comparison with main - if: steps.workflow-run-info.outputs.pullRequestNumber != '' env: num_main_errors: $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') compared_errors: $((env.num_pr_errors - env.num_main_errors)) From e96b3489dc9f28b31753693a18cfbcc29084e2fd Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Thu, 24 Sep 2026 16:03:44 +0100 Subject: [PATCH 12/70] test the new job! --- process/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/process/main.py b/process/main.py index ad22d34ad5..0446333949 100644 --- a/process/main.py +++ b/process/main.py @@ -30,6 +30,8 @@ Box file F/RS/CIRE5523/PWF (up to 15/01/96) Box file F/MI/PJK/PROCESS and F/PL/PJK/PROCESS (15/01/96 to 24/01/12) Box file T&M/PKNIGHT/PROCESS (from 24/01/12) + +TEST """ import logging From ae4c740e6557fdd994a4632a400e722027aa3769 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Thu, 24 Sep 2026 16:22:15 +0100 Subject: [PATCH 13/70] run job when improve-quality has failed --- .github/workflows/process.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 227d3aaf87..457c828bea 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -161,11 +161,12 @@ jobs: num_pr_errors: $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') - name: Get information about the current run + if: failure() uses: Fusion-Power-Plant-Framework/fppf-actions/get-workflow-origin@f94a8de5f658cf65c79e1f143a7a31fb94a05793 id: workflow-run-info - name: Checkout and lint on main # check out main - if: steps.workflow-run-info.outputs.pullRequestNumber != '' + if: failure() && steps.workflow-run-info.outputs.pullRequestNumber != '' uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ steps.workflow-run-info.outputs.targetBranch }} @@ -173,7 +174,7 @@ jobs: num_main_errors: $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') compared_errors: $((env.num_pr_errors - env.num_main_errors)) - name: Warning comment - if: env.compared_errors > 0 + if: failure() && env.compared_errors > 0 uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 with: issue-number: ${{ steps.workflow-run-info.outputs.pullRequestNumber }} From 67bc785c6ba4f5049bc4f82219e9f24bcefc6714 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Thu, 24 Sep 2026 16:29:02 +0100 Subject: [PATCH 14/70] test adding more improve-quality errors --- process/main.py | 119 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 118 insertions(+), 1 deletion(-) diff --git a/process/main.py b/process/main.py index 0446333949..23d846b44c 100644 --- a/process/main.py +++ b/process/main.py @@ -31,7 +31,6 @@ Box file F/MI/PJK/PROCESS and F/PL/PJK/PROCESS (15/01/96 to 24/01/12) Box file T&M/PKNIGHT/PROCESS (from 24/01/12) -TEST """ import logging @@ -610,6 +609,124 @@ def validate_input(self, replace_obsolete: bool = False): else: print("The IN.DAT file does not contain any obsolete variables.") + def test_another_lint_error(self, replace_obsolete: bool = False): + """Checks the input IN.DAT file for any obsolete variables in the OBS_VARS dict + contained within obsolete_variables.py. + If obsolete variables are found, and if `replace_obsolete` is set to True, + they are either removed or replaced by their updated names as specified + in the OBS_VARS dictionary. + + Raises + ------ + ValueError + If obsolete variables are present in the input file. + """ + obsolete_variables = ov.OBS_VARS + obsolete_vars_help_message = ov.OBS_VARS_HELP + + filename = self.input_file + variables_in_in_dat = [] + modified_lines = [] + changes_made = [] # To store details of the changes + + with open(filename) as file: + for line in file: + # Skip comment lines or lines without an assignment + if line.startswith("*") or "=" not in line: + modified_lines.append(line) + continue + + # Extract the variable name before the separator + raw_variable_name = line.split("=", 1)[0].strip() + # handle cases where the variable name might have parentheses + variable_name = ( + raw_variable_name.split("(", 1)[0] + if "(" in raw_variable_name + else raw_variable_name + ) + + # Check if the variable is obsolete and needs replacing + if variable_name in obsolete_variables: + replacement = obsolete_variables.get(variable_name) + if replace_obsolete: + # Prepare replacement or removal + if replacement is None: + # If no replacement is defined, comment out the line + modified_lines.append(f"* Obsolete: {line}") + changes_made.append( + f"Commented out obsolete variable: {variable_name}" + ) + else: + if isinstance(replacement, list): + # Raise an error if replacement is a list + replacement_str = ", ".join(replacement) + raise ValueError( + f"The variable '{variable_name}' is obsolete and " + "should be replaced by the following variables: " + f"{replacement_str}. " + "Please set their values accordingly." + ) + # Replace obsolete variable + modified_line = line.replace(variable_name, replacement, 1) + modified_lines.append( + f"* Replaced '{variable_name}' with " + f"'{replacement}'\n{modified_line}" + ) + changes_made.append( + f"Replaced '{variable_name}' with '{replacement}'" + ) + variables_in_in_dat.append(variable_name) + else: + # If replacement is False, add the line as-is + modified_lines.append(line) + variables_in_in_dat.append(variable_name) + else: + modified_lines.append(line) + + obs_vars_in_in_dat = [ + var for var in variables_in_in_dat if var in obsolete_variables + ] + + if obs_vars_in_in_dat: + if replace_obsolete: + # If replace_obsolete is True, write the modified content to the file + with open(filename, "w") as file: + file.writelines(modified_lines) + print( + "The IN.DAT file has been updated to replace or " + "comment out obsolete variables." + ) + print("Summary of changes made:") + for change in changes_made: + print(f" - {change}") + else: + # Only print the report if replace_obsolete is False + message = ( + "The IN.DAT file contains obsolete variables " + "from the OBS_VARS dictionary. " + "The obsolete variables in your IN.DAT file are: " + f"{obs_vars_in_in_dat}. " + "Either remove these or replace them with " + "their updated variable names. " + ) + for obs_var in obs_vars_in_in_dat: + replacement = obsolete_variables.get(obs_var) + if replacement is None: + message += ( + f"\n\n{obs_var} is an obsolete variable " + "and needs to be removed." + ) + else: + message += ( + f"\n\n{obs_var} is an obsolete variable " + f"and needs to be replaced by {replacement}." + ) + message += f" {obsolete_vars_help_message.get(obs_var, '')}" + raise ValueError(message) + + else: + print("The IN.DAT file does not contain any obsolete variables.") + def validate_user_model(self): """Checks that a user-created model has been injected correctly From 15bf17e4296e64a1aec3682c221712013573503d Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Thu, 24 Sep 2026 16:31:22 +0100 Subject: [PATCH 15/70] try to fix again --- .github/workflows/process.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 457c828bea..a836372cea 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -174,7 +174,7 @@ jobs: num_main_errors: $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') compared_errors: $((env.num_pr_errors - env.num_main_errors)) - name: Warning comment - if: failure() && env.compared_errors > 0 + if: env.compared_errors > 0 uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 with: issue-number: ${{ steps.workflow-run-info.outputs.pullRequestNumber }} From 2ffa59b19a17abb4ca3b84d4a84a7cc66af5c4f2 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Thu, 24 Sep 2026 16:40:20 +0100 Subject: [PATCH 16/70] debugging --- .github/workflows/process.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index a836372cea..a89b089686 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -155,6 +155,7 @@ jobs: hatch run lint:fmt_extra "${files[@]}" + echo $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') env: # need number of errors being flagged in these files # subtract 1 as final summary line is not an error @@ -173,6 +174,9 @@ jobs: env: num_main_errors: $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') compared_errors: $((env.num_pr_errors - env.num_main_errors)) + run: | + echo $env.num_main_errors >> "${GITHUB_ENV}" + echo $env.compared_errors >> "${GITHUB_ENV}" - name: Warning comment if: env.compared_errors > 0 uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 From e9c1772c367a5e19fdb78909755842c6076e4f33 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Thu, 24 Sep 2026 16:41:15 +0100 Subject: [PATCH 17/70] try again --- .github/workflows/process.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index a89b089686..5ad97fe226 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -175,8 +175,8 @@ jobs: num_main_errors: $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') compared_errors: $((env.num_pr_errors - env.num_main_errors)) run: | - echo $env.num_main_errors >> "${GITHUB_ENV}" - echo $env.compared_errors >> "${GITHUB_ENV}" + echo $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') >> "${GITHUB_ENV}" + echo $((env.num_pr_errors - env.num_main_errors)) >> "${GITHUB_ENV}" - name: Warning comment if: env.compared_errors > 0 uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 From 1fe3ba3ab7917ce2b712561cea9fc81195d64a9f Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Thu, 24 Sep 2026 16:56:45 +0100 Subject: [PATCH 18/70] try --- .github/workflows/process.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 5ad97fe226..ce01970c11 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -175,8 +175,8 @@ jobs: num_main_errors: $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') compared_errors: $((env.num_pr_errors - env.num_main_errors)) run: | - echo $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') >> "${GITHUB_ENV}" - echo $((env.num_pr_errors - env.num_main_errors)) >> "${GITHUB_ENV}" + echo ${{env.num_main_errors}} >> "${GITHUB_ENV}" + echo ${{env.compared_errors}} >> "${GITHUB_ENV}" - name: Warning comment if: env.compared_errors > 0 uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 From 33c16f7345b470661e3a1727e941e1940ee70e22 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Thu, 24 Sep 2026 16:57:57 +0100 Subject: [PATCH 19/70] hmm --- .github/workflows/process.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index ce01970c11..207d04955e 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -174,9 +174,6 @@ jobs: env: num_main_errors: $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') compared_errors: $((env.num_pr_errors - env.num_main_errors)) - run: | - echo ${{env.num_main_errors}} >> "${GITHUB_ENV}" - echo ${{env.compared_errors}} >> "${GITHUB_ENV}" - name: Warning comment if: env.compared_errors > 0 uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 From 340863bf210b8e9b313872093f0cc9ba2bdb27aa Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Thu, 24 Sep 2026 17:01:11 +0100 Subject: [PATCH 20/70] hmmmm --- .github/workflows/process.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 207d04955e..36ec6d9e97 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -155,7 +155,6 @@ jobs: hatch run lint:fmt_extra "${files[@]}" - echo $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') env: # need number of errors being flagged in these files # subtract 1 as final summary line is not an error @@ -175,7 +174,7 @@ jobs: num_main_errors: $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') compared_errors: $((env.num_pr_errors - env.num_main_errors)) - name: Warning comment - if: env.compared_errors > 0 + # if: env.compared_errors > 0 uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 with: issue-number: ${{ steps.workflow-run-info.outputs.pullRequestNumber }} From 794015855fc09583ad90fbafe13f832be2ab21ab Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Thu, 24 Sep 2026 17:02:57 +0100 Subject: [PATCH 21/70] test agaaaaain --- .github/workflows/process.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 36ec6d9e97..54ea2e85f1 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -174,7 +174,7 @@ jobs: num_main_errors: $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') compared_errors: $((env.num_pr_errors - env.num_main_errors)) - name: Warning comment - # if: env.compared_errors > 0 + if: failure() # && env.compared_errors > 0 uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 with: issue-number: ${{ steps.workflow-run-info.outputs.pullRequestNumber }} From 59f3eea3376f5f872f4974289d601c2b19a63b9f Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Thu, 24 Sep 2026 18:15:35 +0100 Subject: [PATCH 22/70] add find warning report job --- .github/workflows/process.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 54ea2e85f1..21a2257311 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -173,15 +173,25 @@ jobs: env: num_main_errors: $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') compared_errors: $((env.num_pr_errors - env.num_main_errors)) + - name: Find warning report comment + if: failure () && env.compared_errors > 0 && steps.workflow-run-info.outputs.pullRequestNumber != '' + uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0 + id: find-warning-report-comment + with: + issue-number: ${{ steps.workflow-run-info.outputs.pullRequestNumber }} + comment-author: "github-actions[bot]" + body-includes: ⚠️ improve_quality_job warning! + direction: last - name: Warning comment - if: failure() # && env.compared_errors > 0 + if: failure() && env.compared_errors > 0 uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 with: + comment-id: ${{ steps.find-warning-report-comment.outputs.comment-id }} issue-number: ${{ steps.workflow-run-info.outputs.pullRequestNumber }} body: | - ⚠️ improve_quality_job warning! Files changed by this PR have introduced $compared_errors more linting errors when compared to main. Please fix these + edit-mode: replace tracking: From f51225d5d8fc334e0e31a9582f967056b6849c9a Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Thu, 24 Sep 2026 18:19:09 +0100 Subject: [PATCH 23/70] testing --- .github/workflows/process.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 21a2257311..79d431ddff 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -174,7 +174,7 @@ jobs: num_main_errors: $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') compared_errors: $((env.num_pr_errors - env.num_main_errors)) - name: Find warning report comment - if: failure () && env.compared_errors > 0 && steps.workflow-run-info.outputs.pullRequestNumber != '' + if: failure () && steps.workflow-run-info.outputs.pullRequestNumber != '' # && env.compared_errors > 0 uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0 id: find-warning-report-comment with: @@ -183,7 +183,7 @@ jobs: body-includes: ⚠️ improve_quality_job warning! direction: last - name: Warning comment - if: failure() && env.compared_errors > 0 + if: failure() # && env.compared_errors > 0 uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 with: comment-id: ${{ steps.find-warning-report-comment.outputs.comment-id }} From 522dd52563f7953437949b2c3fa1606b22cf9ff4 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Thu, 24 Sep 2026 18:29:49 +0100 Subject: [PATCH 24/70] try permissions write? --- .github/workflows/process.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 79d431ddff..dfc5e3b5ce 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -117,6 +117,7 @@ jobs: uses: Fusion-Power-Plant-Framework/fppf-actions/hatch-lint@c6af22fc8d00be67cca53a61177301462f499fb2 improve_quality_check: + permissions: write runs-on: ubuntu-latest if: github.event_name == 'pull_request' needs: [pre-commit-quality-check] From bef4cbd7ec6c6f26b721d0f4eb6a4bc9bf75ff61 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Thu, 24 Sep 2026 18:31:03 +0100 Subject: [PATCH 25/70] try permissions write --- .github/workflows/process.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index dfc5e3b5ce..2c5f5a6e33 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -117,7 +117,8 @@ jobs: uses: Fusion-Power-Plant-Framework/fppf-actions/hatch-lint@c6af22fc8d00be67cca53a61177301462f499fb2 improve_quality_check: - permissions: write + permissions: + pull-requests: write runs-on: ubuntu-latest if: github.event_name == 'pull_request' needs: [pre-commit-quality-check] From addc56e97203cb213762f95bee69601bf322cb5a Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Thu, 24 Sep 2026 18:34:53 +0100 Subject: [PATCH 26/70] try to fix message --- .github/workflows/process.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 2c5f5a6e33..f3ec821e8f 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -191,7 +191,7 @@ jobs: comment-id: ${{ steps.find-warning-report-comment.outputs.comment-id }} issue-number: ${{ steps.workflow-run-info.outputs.pullRequestNumber }} body: | - Files changed by this PR have introduced $compared_errors more linting errors when compared to main. + Files changed by this PR have introduced "$compared_errors" more linting errors when compared to main. Please fix these edit-mode: replace From 6c80943470e1337e05e03954c8560cf86c612fe5 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Thu, 24 Sep 2026 18:43:40 +0100 Subject: [PATCH 27/70] try again --- .github/workflows/process.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index f3ec821e8f..2485685633 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -191,7 +191,7 @@ jobs: comment-id: ${{ steps.find-warning-report-comment.outputs.comment-id }} issue-number: ${{ steps.workflow-run-info.outputs.pullRequestNumber }} body: | - Files changed by this PR have introduced "$compared_errors" more linting errors when compared to main. + Files changed by this PR have introduced ${{compared_errors}} more linting errors when compared to main. Please fix these edit-mode: replace From fba21cad09de86416dd868ed41283c3c0ef41f7a Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Thu, 24 Sep 2026 18:46:04 +0100 Subject: [PATCH 28/70] fix --- .github/workflows/process.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 2485685633..c84464dde0 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -176,7 +176,7 @@ jobs: num_main_errors: $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') compared_errors: $((env.num_pr_errors - env.num_main_errors)) - name: Find warning report comment - if: failure () && steps.workflow-run-info.outputs.pullRequestNumber != '' # && env.compared_errors > 0 + if: failure () && steps.workflow-run-info.outputs.pullRequestNumber != '' && env.compared_errors > 0 uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0 id: find-warning-report-comment with: @@ -185,13 +185,13 @@ jobs: body-includes: ⚠️ improve_quality_job warning! direction: last - name: Warning comment - if: failure() # && env.compared_errors > 0 + if: failure() && env.compared_errors > 0 uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 with: comment-id: ${{ steps.find-warning-report-comment.outputs.comment-id }} issue-number: ${{ steps.workflow-run-info.outputs.pullRequestNumber }} body: | - Files changed by this PR have introduced ${{compared_errors}} more linting errors when compared to main. + Files changed by this PR have introduced ${{env.compared_errors}} more linting errors when compared to main. Please fix these edit-mode: replace From 0f317c8931fef294b2df81be016295ba1e8095c3 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Thu, 24 Sep 2026 18:48:23 +0100 Subject: [PATCH 29/70] change if condition to test --- .github/workflows/process.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index c84464dde0..e3af6f9ce0 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -176,7 +176,7 @@ jobs: num_main_errors: $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') compared_errors: $((env.num_pr_errors - env.num_main_errors)) - name: Find warning report comment - if: failure () && steps.workflow-run-info.outputs.pullRequestNumber != '' && env.compared_errors > 0 + if: failure () # && steps.workflow-run-info.outputs.pullRequestNumber != '' && env.compared_errors > 0 uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0 id: find-warning-report-comment with: @@ -185,7 +185,7 @@ jobs: body-includes: ⚠️ improve_quality_job warning! direction: last - name: Warning comment - if: failure() && env.compared_errors > 0 + if: failure() # && env.compared_errors > 0 uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 with: comment-id: ${{ steps.find-warning-report-comment.outputs.comment-id }} From 93a4385ba4303466dd6e3f9f5ced4822e6782bdc Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Thu, 24 Sep 2026 18:52:02 +0100 Subject: [PATCH 30/70] $ --- .github/workflows/process.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index e3af6f9ce0..acb0a9afbd 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -191,7 +191,7 @@ jobs: comment-id: ${{ steps.find-warning-report-comment.outputs.comment-id }} issue-number: ${{ steps.workflow-run-info.outputs.pullRequestNumber }} body: | - Files changed by this PR have introduced ${{env.compared_errors}} more linting errors when compared to main. + Files changed by this PR have introduced $env.compared_errors more linting errors when compared to main. Please fix these edit-mode: replace From 664a0c9e1b98e1615d3cdcba2b8a74f5309306fd Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 15:08:25 +0100 Subject: [PATCH 31/70] try to print number of errors in comment --- .github/workflows/process.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index acb0a9afbd..bc197ea7d1 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -159,7 +159,6 @@ jobs: env: # need number of errors being flagged in these files - # subtract 1 as final summary line is not an error num_pr_errors: $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') - name: Get information about the current run @@ -191,7 +190,7 @@ jobs: comment-id: ${{ steps.find-warning-report-comment.outputs.comment-id }} issue-number: ${{ steps.workflow-run-info.outputs.pullRequestNumber }} body: | - Files changed by this PR have introduced $env.compared_errors more linting errors when compared to main. + Files changed by this PR have introduced ${{ env.compared_errors }} more linting errors when compared to main. Please fix these edit-mode: replace From 492cf6e96489399b5f6c858f29ea083744fdeffc Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 15:08:55 +0100 Subject: [PATCH 32/70] space --- .github/workflows/process.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index bc197ea7d1..5f26618d1f 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -175,7 +175,7 @@ jobs: num_main_errors: $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') compared_errors: $((env.num_pr_errors - env.num_main_errors)) - name: Find warning report comment - if: failure () # && steps.workflow-run-info.outputs.pullRequestNumber != '' && env.compared_errors > 0 + if: failure() # && steps.workflow-run-info.outputs.pullRequestNumber != '' && env.compared_errors > 0 uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0 id: find-warning-report-comment with: From efbdf51218965707de962fee377aea5f6abf939e Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 15:14:43 +0100 Subject: [PATCH 33/70] try to only make comment if more errors now --- .github/workflows/process.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 5f26618d1f..9a013f519d 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -175,7 +175,7 @@ jobs: num_main_errors: $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') compared_errors: $((env.num_pr_errors - env.num_main_errors)) - name: Find warning report comment - if: failure() # && steps.workflow-run-info.outputs.pullRequestNumber != '' && env.compared_errors > 0 + if: failure() && env.compared_errors > 0 uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0 id: find-warning-report-comment with: @@ -184,7 +184,7 @@ jobs: body-includes: ⚠️ improve_quality_job warning! direction: last - name: Warning comment - if: failure() # && env.compared_errors > 0 + if: failure() && env.compared_errors > 0 uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 with: comment-id: ${{ steps.find-warning-report-comment.outputs.comment-id }} From d504a3d288e19abea03e4361a2aa41551eccd2f2 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 15:18:23 +0100 Subject: [PATCH 34/70] shorten ci for pr testing --- .github/workflows/process.yml | 358 +++++++++++++++++----------------- 1 file changed, 179 insertions(+), 179 deletions(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 9a013f519d..0ac90971b3 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -17,93 +17,93 @@ env: python-version: '3.10' jobs: - unit-test: - strategy: - matrix: - os: [ubuntu-latest, macos-latest] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - - name: Setup python and hatch - uses: Fusion-Power-Plant-Framework/fppf-actions/setup-hatch@c6af22fc8d00be67cca53a61177301462f499fb2 - - name: Run unit tests with coverage report - run: | - hatch run test:tests-cov tests/unit - - name: Upload coverage to Codecov - uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - with: - fail_ci_if_error: ${{ github.ref_name == 'main' }} + # unit-test: + # strategy: + # matrix: + # os: [ubuntu-latest, macos-latest] + # runs-on: ${{ matrix.os }} + # steps: + # - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + # - name: Setup python and hatch + # uses: Fusion-Power-Plant-Framework/fppf-actions/setup-hatch@c6af22fc8d00be67cca53a61177301462f499fb2 + # - name: Run unit tests with coverage report + # run: | + # hatch run test:tests-cov tests/unit + # - name: Upload coverage to Codecov + # uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7 + # env: + # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + # with: + # fail_ci_if_error: ${{ github.ref_name == 'main' }} - integration-test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - - name: Setup python and hatch - uses: Fusion-Power-Plant-Framework/fppf-actions/setup-hatch@c6af22fc8d00be67cca53a61177301462f499fb2 - with: - python-version: ${{ env.python-version }} - - name: Run integration tests - run: hatch run test.py${{ env.python-version }}:tests-integration + # integration-test: + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + # - name: Setup python and hatch + # uses: Fusion-Power-Plant-Framework/fppf-actions/setup-hatch@c6af22fc8d00be67cca53a61177301462f499fb2 + # with: + # python-version: ${{ env.python-version }} + # - name: Run integration tests + # run: hatch run test.py${{ env.python-version }}:tests-integration - example-test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - - name: Setup python and hatch - uses: Fusion-Power-Plant-Framework/fppf-actions/setup-hatch@c6af22fc8d00be67cca53a61177301462f499fb2 - with: - python-version: ${{ env.python-version }} - - name: Run example tests - run: hatch run test.py${{ env.python-version }}:tests-examples + # example-test: + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + # - name: Setup python and hatch + # uses: Fusion-Power-Plant-Framework/fppf-actions/setup-hatch@c6af22fc8d00be67cca53a61177301462f499fb2 + # with: + # python-version: ${{ env.python-version }} + # - name: Run example tests + # run: hatch run test.py${{ env.python-version }}:tests-examples - regression-test: - runs-on: ubuntu-latest - needs: [tracking] - # depend on make and tracking job but don't skip if tracking was skipped - # run PROCESS on the regression test input files and compare results to the tracked files - if: always() - continue-on-error: true - strategy: - matrix: - tolerance: [0.2, 5] - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - with: - fetch-depth: 0 - - name: Setup python and hatch - uses: Fusion-Power-Plant-Framework/fppf-actions/setup-hatch@c6af22fc8d00be67cca53a61177301462f499fb2 - with: - python-version: ${{ env.python-version }} - - name: Run regression tests - run: hatch run test.py${{ env.python-version }}:tests-regression --reg-tolerance=${{ matrix.tolerance }} + # regression-test: + # runs-on: ubuntu-latest + # needs: [tracking] + # # depend on make and tracking job but don't skip if tracking was skipped + # # run PROCESS on the regression test input files and compare results to the tracked files + # if: always() + # continue-on-error: true + # strategy: + # matrix: + # tolerance: [0.2, 5] + # steps: + # - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + # with: + # fetch-depth: 0 + # - name: Setup python and hatch + # uses: Fusion-Power-Plant-Framework/fppf-actions/setup-hatch@c6af22fc8d00be67cca53a61177301462f499fb2 + # with: + # python-version: ${{ env.python-version }} + # - name: Run regression tests + # run: hatch run test.py${{ env.python-version }}:tests-regression --reg-tolerance=${{ matrix.tolerance }} - run-tracking-inputs: - runs-on: ubuntu-latest - # run PROCESS on the regression test input files and archive output MFILEs - # only runs upon merge to main - if: github.ref == 'refs/heads/main' - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - - name: Setup python and hatch - uses: Fusion-Power-Plant-Framework/fppf-actions/setup-hatch@c6af22fc8d00be67cca53a61177301462f499fb2 - with: - python-version: ${{ env.python-version }} - - name: Run regression input files - run: hatch run track:create-tracking-inputs - - name: Move other files - run: mv tests/regression/input_files/*.json tracking/ - - name: Archive tracked MFILEs - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a - with: - name: tracked-mfiles - path: tracking/*_MFILE.DAT - - name: Archive tracked SIG_TF.json - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a - with: - name: sig-tfs - path: tracking/*.json + # run-tracking-inputs: + # runs-on: ubuntu-latest + # # run PROCESS on the regression test input files and archive output MFILEs + # # only runs upon merge to main + # if: github.ref == 'refs/heads/main' + # steps: + # - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + # - name: Setup python and hatch + # uses: Fusion-Power-Plant-Framework/fppf-actions/setup-hatch@c6af22fc8d00be67cca53a61177301462f499fb2 + # with: + # python-version: ${{ env.python-version }} + # - name: Run regression input files + # run: hatch run track:create-tracking-inputs + # - name: Move other files + # run: mv tests/regression/input_files/*.json tracking/ + # - name: Archive tracked MFILEs + # uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a + # with: + # name: tracked-mfiles + # path: tracking/*_MFILE.DAT + # - name: Archive tracked SIG_TF.json + # uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a + # with: + # name: sig-tfs + # path: tracking/*.json pre-commit-quality-check: runs-on: ubuntu-latest @@ -195,100 +195,100 @@ jobs: edit-mode: replace - tracking: - # update tracker to include the MFILEs created by the run-tracking-inputs job - concurrency: - group: tracking-jobs - cancel-in-progress: false - runs-on: ubuntu-latest - # depends on run-tracking-inputs; only runs upon merge to main - needs: run-tracking-inputs - if: github.ref == 'refs/heads/main' - env: - COMMIT_MESSAGE: ${{ github.event.head_commit.message }} - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - - name: Setup python and hatch - uses: Fusion-Power-Plant-Framework/fppf-actions/setup-hatch@c6af22fc8d00be67cca53a61177301462f499fb2 - with: - python-version: ${{ env.python-version }} - - name: Setup SSH identity - uses: webfactory/ssh-agent@e83874834305fe9a4a2997156cb26c5de65a8555 - with: - ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} - - name: Download tracking data - run: git clone git@github.com:timothy-nunn/process-tracking-data.git process-tracking-data - - name: Download MFILEs - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c - with: - name: tracked-mfiles - path: tracking/ - - name: Create new tracking entries - shell: bash - run: | - MSG=$(printf "%q " $COMMIT_MESSAGE) - git config --global --add safe.directory '*' - hatch run track:run-tracker "${MSG}" ${{ github.sha }} - - name: Create the tracking dashboard - run: hatch run python tracking/tracking_data.py plot process-tracking-data --out tracking.html - - name: Archive tracking dashboard - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a - with: - name: tracking-html - path: tracking.html - - name: Setup Git identity - run: | - git config --global user.email "${{ github.triggering_actor }}@github.runner" - git config --global user.name "${{ github.job }}" - - name: Commit and push tracking data - run: | - cd process-tracking-data - git add . - git commit -m "${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}" - git push + # tracking: + # # update tracker to include the MFILEs created by the run-tracking-inputs job + # concurrency: + # group: tracking-jobs + # cancel-in-progress: false + # runs-on: ubuntu-latest + # # depends on run-tracking-inputs; only runs upon merge to main + # needs: run-tracking-inputs + # if: github.ref == 'refs/heads/main' + # env: + # COMMIT_MESSAGE: ${{ github.event.head_commit.message }} + # steps: + # - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + # - name: Setup python and hatch + # uses: Fusion-Power-Plant-Framework/fppf-actions/setup-hatch@c6af22fc8d00be67cca53a61177301462f499fb2 + # with: + # python-version: ${{ env.python-version }} + # - name: Setup SSH identity + # uses: webfactory/ssh-agent@e83874834305fe9a4a2997156cb26c5de65a8555 + # with: + # ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} + # - name: Download tracking data + # run: git clone git@github.com:timothy-nunn/process-tracking-data.git process-tracking-data + # - name: Download MFILEs + # uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c + # with: + # name: tracked-mfiles + # path: tracking/ + # - name: Create new tracking entries + # shell: bash + # run: | + # MSG=$(printf "%q " $COMMIT_MESSAGE) + # git config --global --add safe.directory '*' + # hatch run track:run-tracker "${MSG}" ${{ github.sha }} + # - name: Create the tracking dashboard + # run: hatch run python tracking/tracking_data.py plot process-tracking-data --out tracking.html + # - name: Archive tracking dashboard + # uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a + # with: + # name: tracking-html + # path: tracking.html + # - name: Setup Git identity + # run: | + # git config --global user.email "${{ github.triggering_actor }}@github.runner" + # git config --global user.name "${{ github.job }}" + # - name: Commit and push tracking data + # run: | + # cd process-tracking-data + # git add . + # git commit -m "${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}" + # git push - docs: - concurrency: - group: docs-jobs - cancel-in-progress: false - runs-on: ubuntu-latest - # depends on tracking; only runs upon merge to main - needs: tracking - if: github.ref == 'refs/heads/main' - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - with: - fetch-depth: 0 - - name: Setup python and hatch - uses: Fusion-Power-Plant-Framework/fppf-actions/setup-hatch@c6af22fc8d00be67cca53a61177301462f499fb2 - with: - python-version: ${{ env.python-version }} - - run: git config --global --add safe.directory '*' - - name: Download STF_TF.json files - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c - with: - name: sig-tfs - path: tracking/ - - name: Download MFILEs - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c - with: - name: tracked-mfiles - path: tracking/ - - run: mv tracking/large_tokamak_nof.SIG_TF.json tracking/large_tokamak_nof_SIG_TF.json - - name: Create an example plot summary - run: hatch run process plot summary -f tracking/large_tokamak_nof_MFILE.DAT - - name: Move plot summary file to docs images - run: mv tracking/large_tokamak_nof_MFILE.DATSUMMARY.pdf documentation/source/images/plot_summary.pdf - - run: hatch run docs:build - - name: Download tracking html - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c - with: - name: tracking-html - - run: mv tracking.html site || cp site/404.html site/tracking.html - - name: Upload documentation page - uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 - with: - path: site/ - - name: Deploy GitHub pages - id: deployment - uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 + # docs: + # concurrency: + # group: docs-jobs + # cancel-in-progress: false + # runs-on: ubuntu-latest + # # depends on tracking; only runs upon merge to main + # needs: tracking + # if: github.ref == 'refs/heads/main' + # steps: + # - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + # with: + # fetch-depth: 0 + # - name: Setup python and hatch + # uses: Fusion-Power-Plant-Framework/fppf-actions/setup-hatch@c6af22fc8d00be67cca53a61177301462f499fb2 + # with: + # python-version: ${{ env.python-version }} + # - run: git config --global --add safe.directory '*' + # - name: Download STF_TF.json files + # uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c + # with: + # name: sig-tfs + # path: tracking/ + # - name: Download MFILEs + # uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c + # with: + # name: tracked-mfiles + # path: tracking/ + # - run: mv tracking/large_tokamak_nof.SIG_TF.json tracking/large_tokamak_nof_SIG_TF.json + # - name: Create an example plot summary + # run: hatch run process plot summary -f tracking/large_tokamak_nof_MFILE.DAT + # - name: Move plot summary file to docs images + # run: mv tracking/large_tokamak_nof_MFILE.DATSUMMARY.pdf documentation/source/images/plot_summary.pdf + # - run: hatch run docs:build + # - name: Download tracking html + # uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c + # with: + # name: tracking-html + # - run: mv tracking.html site || cp site/404.html site/tracking.html + # - name: Upload documentation page + # uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 + # with: + # path: site/ + # - name: Deploy GitHub pages + # id: deployment + # uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 From d90e9a6d3398ef2019b734952265347969bb3796 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 15:22:31 +0100 Subject: [PATCH 35/70] print compared errors --- .github/workflows/process.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 0ac90971b3..26eb7c9611 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -174,6 +174,8 @@ jobs: env: num_main_errors: $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') compared_errors: $((env.num_pr_errors - env.num_main_errors)) + run: | + echo "$env.compared_errors" - name: Find warning report comment if: failure() && env.compared_errors > 0 uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0 From 546bf600a87e436663f41d78389ee650c6d1db37 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 15:26:13 +0100 Subject: [PATCH 36/70] try again print --- .github/workflows/process.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 26eb7c9611..0e8f2f932f 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -175,7 +175,7 @@ jobs: num_main_errors: $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') compared_errors: $((env.num_pr_errors - env.num_main_errors)) run: | - echo "$env.compared_errors" + echo "$env.compared_errors" >> $GITHUB_OUTPUT - name: Find warning report comment if: failure() && env.compared_errors > 0 uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0 From 4c3d9935777137aa26f59af4cedda3f6d8d58f5d Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 15:28:56 +0100 Subject: [PATCH 37/70] try with curly brackets --- .github/workflows/process.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 0e8f2f932f..edb0591e7a 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -175,7 +175,7 @@ jobs: num_main_errors: $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') compared_errors: $((env.num_pr_errors - env.num_main_errors)) run: | - echo "$env.compared_errors" >> $GITHUB_OUTPUT + echo "${env.compared_errors}" >> $GITHUB_OUTPUT - name: Find warning report comment if: failure() && env.compared_errors > 0 uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0 From ca7e65cd9482542e6a546bb19b072744ae8a98d6 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 15:31:33 +0100 Subject: [PATCH 38/70] trial --- .github/workflows/process.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index edb0591e7a..773abb3526 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -171,6 +171,8 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ steps.workflow-run-info.outputs.targetBranch }} + - name: Numbers of errors + if: failure() env: num_main_errors: $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') compared_errors: $((env.num_pr_errors - env.num_main_errors)) From 7107f2a52ef248779b001c22672cd04491fbd3dd Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 15:34:03 +0100 Subject: [PATCH 39/70] extra brackets ? --- .github/workflows/process.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 773abb3526..909ff5fcf5 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -177,7 +177,7 @@ jobs: num_main_errors: $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') compared_errors: $((env.num_pr_errors - env.num_main_errors)) run: | - echo "${env.compared_errors}" >> $GITHUB_OUTPUT + echo "${{env.compared_errors}}" >> $GITHUB_OUTPUT - name: Find warning report comment if: failure() && env.compared_errors > 0 uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0 From 3432fa1745e4b1f536399c1550d8c880a38491c9 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 15:38:00 +0100 Subject: [PATCH 40/70] add space --- .github/workflows/process.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 909ff5fcf5..04bbe432c8 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -175,7 +175,7 @@ jobs: if: failure() env: num_main_errors: $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') - compared_errors: $((env.num_pr_errors - env.num_main_errors)) + compared_errors: $(( env.num_pr_errors - env.num_main_errors )) run: | echo "${{env.compared_errors}}" >> $GITHUB_OUTPUT - name: Find warning report comment From f17c270576d8ce3b3bee658ba8e5cf81ec160a7c Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 15:45:26 +0100 Subject: [PATCH 41/70] try outputting both --- .github/workflows/process.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 04bbe432c8..fc1cad3c36 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -175,9 +175,10 @@ jobs: if: failure() env: num_main_errors: $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') - compared_errors: $(( env.num_pr_errors - env.num_main_errors )) + # compared_errors: $(( env.num_pr_errors - env.num_main_errors )) run: | - echo "${{env.compared_errors}}" >> $GITHUB_OUTPUT + echo "${{env.num_pr_errors}}" >> $GITHUB_OUTPUT + echo "${{env.num_main_errors}}" >> $GITHUB_OUTPUT - name: Find warning report comment if: failure() && env.compared_errors > 0 uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0 From 86ae867a9b750fb033e653f68dfb4e3d8f420d0d Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 15:52:29 +0100 Subject: [PATCH 42/70] give steps id instead of env --- .github/workflows/process.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index fc1cad3c36..ec2fe34cd1 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -157,9 +157,9 @@ jobs: hatch run lint:fmt_extra "${files[@]}" - env: # need number of errors being flagged in these files num_pr_errors: $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') + id: improvement_lint - name: Get information about the current run if: failure() @@ -173,14 +173,12 @@ jobs: ref: ${{ steps.workflow-run-info.outputs.targetBranch }} - name: Numbers of errors if: failure() - env: - num_main_errors: $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') - # compared_errors: $(( env.num_pr_errors - env.num_main_errors )) run: | - echo "${{env.num_pr_errors}}" >> $GITHUB_OUTPUT - echo "${{env.num_main_errors}}" >> $GITHUB_OUTPUT + compared_errors: $(( steps.improvement_lint.outputs.num_pr_errors - $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') )) + id: num_errors + - name: Find warning report comment - if: failure() && env.compared_errors > 0 + if: failure() && steps.num_errors.compared_errors > 0 uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0 id: find-warning-report-comment with: @@ -189,7 +187,7 @@ jobs: body-includes: ⚠️ improve_quality_job warning! direction: last - name: Warning comment - if: failure() && env.compared_errors > 0 + if: failure() && && steps.num_errors.compared_errors > 0 uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 with: comment-id: ${{ steps.find-warning-report-comment.outputs.comment-id }} From f2b1fab4af54e9ded7b520f151d8efd4d0c7967c Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 15:52:57 +0100 Subject: [PATCH 43/70] whoops --- .github/workflows/process.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index ec2fe34cd1..95ef5c79cf 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -187,7 +187,7 @@ jobs: body-includes: ⚠️ improve_quality_job warning! direction: last - name: Warning comment - if: failure() && && steps.num_errors.compared_errors > 0 + if: failure() && steps.num_errors.compared_errors > 0 uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 with: comment-id: ${{ steps.find-warning-report-comment.outputs.comment-id }} From 45c21488c2fa9d43fd32ab90efde3566a1c018be Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 15:56:59 +0100 Subject: [PATCH 44/70] try equals and more brackets --- .github/workflows/process.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 95ef5c79cf..44c87e7263 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -174,7 +174,7 @@ jobs: - name: Numbers of errors if: failure() run: | - compared_errors: $(( steps.improvement_lint.outputs.num_pr_errors - $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') )) + compared_errors=$(( ${{ steps.improvement_lint.outputs.num_pr_errors }} - $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') )) id: num_errors - name: Find warning report comment From 5004c6bc2e6215cbb9b8f7da539096a2c997c522 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 15:59:35 +0100 Subject: [PATCH 45/70] print compared errors --- .github/workflows/process.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 44c87e7263..69f7ff3f25 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -175,6 +175,8 @@ jobs: if: failure() run: | compared_errors=$(( ${{ steps.improvement_lint.outputs.num_pr_errors }} - $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') )) + + echo "$compared_errors" >> GITHUB_OUTPUT id: num_errors - name: Find warning report comment From 99fb01d0ca274e018e4424e60a28ee05089ed51a Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 16:04:51 +0100 Subject: [PATCH 46/70] test --- .github/workflows/process.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 69f7ff3f25..9b8f7af9b0 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -176,7 +176,7 @@ jobs: run: | compared_errors=$(( ${{ steps.improvement_lint.outputs.num_pr_errors }} - $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') )) - echo "$compared_errors" >> GITHUB_OUTPUT + echo "comp errors = $compared_errors" >> GITHUB_OUTPUT id: num_errors - name: Find warning report comment From b6b33e472ba5782c06cbd0b9a1a33ab80a9ae7f9 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 16:07:36 +0100 Subject: [PATCH 47/70] print pr errors --- .github/workflows/process.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 9b8f7af9b0..f8e3463bc9 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -177,6 +177,7 @@ jobs: compared_errors=$(( ${{ steps.improvement_lint.outputs.num_pr_errors }} - $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') )) echo "comp errors = $compared_errors" >> GITHUB_OUTPUT + echo "pr errors ${{ steps.improvement_lint.outputs.num_pr_errors }}" >> GITHUB_OUTPUT id: num_errors - name: Find warning report comment From 6a2ff6c3d351656130ba9569ae074dc5e0ea0f6b Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 16:16:19 +0100 Subject: [PATCH 48/70] print separately --- .github/workflows/process.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index f8e3463bc9..ee592125d6 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -175,7 +175,7 @@ jobs: if: failure() run: | compared_errors=$(( ${{ steps.improvement_lint.outputs.num_pr_errors }} - $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') )) - + echo $"(( ${{ steps.improvement_lint.outputs.num_pr_errors }} - $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') ))" echo "comp errors = $compared_errors" >> GITHUB_OUTPUT echo "pr errors ${{ steps.improvement_lint.outputs.num_pr_errors }}" >> GITHUB_OUTPUT id: num_errors From f18152884bf7970c9fc2f34b8157e68cb4fbffc6 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 16:54:47 +0100 Subject: [PATCH 49/70] use = --- .github/workflows/process.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index ee592125d6..a3d35e0c68 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -158,7 +158,7 @@ jobs: hatch run lint:fmt_extra "${files[@]}" # need number of errors being flagged in these files - num_pr_errors: $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') + num_pr_errors=$((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') id: improvement_lint - name: Get information about the current run From ef7c45d18c4905bd64b2ced2d9458b020196dd46 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 17:01:19 +0100 Subject: [PATCH 50/70] default to 0 --- .github/workflows/process.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index a3d35e0c68..f6b0bcbad8 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -159,6 +159,9 @@ jobs: # need number of errors being flagged in these files num_pr_errors=$((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') + # default to 0 if no errors found + num_pr_errors=${num_pr_errors:-0} + id: improvement_lint - name: Get information about the current run From 29a6a658e55384d478516adc5aeab7c904490d58 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 17:03:46 +0100 Subject: [PATCH 51/70] remove outputs --- .github/workflows/process.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index f6b0bcbad8..46fb1283e9 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -177,7 +177,7 @@ jobs: - name: Numbers of errors if: failure() run: | - compared_errors=$(( ${{ steps.improvement_lint.outputs.num_pr_errors }} - $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') )) + compared_errors=$(( ${{ steps.improvement_lint.num_pr_errors }} - $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') )) echo $"(( ${{ steps.improvement_lint.outputs.num_pr_errors }} - $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') ))" echo "comp errors = $compared_errors" >> GITHUB_OUTPUT echo "pr errors ${{ steps.improvement_lint.outputs.num_pr_errors }}" >> GITHUB_OUTPUT From 18d173b2c258d9adf8f458707ede361fc6e72c28 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 17:08:47 +0100 Subject: [PATCH 52/70] move " --- .github/workflows/process.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 46fb1283e9..7600d068c6 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -178,7 +178,7 @@ jobs: if: failure() run: | compared_errors=$(( ${{ steps.improvement_lint.num_pr_errors }} - $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') )) - echo $"(( ${{ steps.improvement_lint.outputs.num_pr_errors }} - $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') ))" + echo "$(( ${{ steps.improvement_lint.outputs.num_pr_errors }} - $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') ))" echo "comp errors = $compared_errors" >> GITHUB_OUTPUT echo "pr errors ${{ steps.improvement_lint.outputs.num_pr_errors }}" >> GITHUB_OUTPUT id: num_errors From 6c02f28af05e39efca09319047ea712787af825e Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 17:14:43 +0100 Subject: [PATCH 53/70] add .outputs --- .github/workflows/process.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 7600d068c6..aad437fae2 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -177,14 +177,14 @@ jobs: - name: Numbers of errors if: failure() run: | - compared_errors=$(( ${{ steps.improvement_lint.num_pr_errors }} - $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') )) + compared_errors=$(( ${{ steps.improvement_lint.outputs.num_pr_errors }} - $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') )) echo "$(( ${{ steps.improvement_lint.outputs.num_pr_errors }} - $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') ))" echo "comp errors = $compared_errors" >> GITHUB_OUTPUT echo "pr errors ${{ steps.improvement_lint.outputs.num_pr_errors }}" >> GITHUB_OUTPUT id: num_errors - name: Find warning report comment - if: failure() && steps.num_errors.compared_errors > 0 + if: failure() && steps.num_errors.outputs.compared_errors > 0 uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0 id: find-warning-report-comment with: @@ -193,7 +193,7 @@ jobs: body-includes: ⚠️ improve_quality_job warning! direction: last - name: Warning comment - if: failure() && steps.num_errors.compared_errors > 0 + if: failure() && steps.num_errors.outputs.compared_errors > 0 uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 with: comment-id: ${{ steps.find-warning-report-comment.outputs.comment-id }} From 1e215ac559f2a2409cbcda80186721b999d24cf4 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 17:19:03 +0100 Subject: [PATCH 54/70] bracket --- .github/workflows/process.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index aad437fae2..a15f0f48fd 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -177,7 +177,7 @@ jobs: - name: Numbers of errors if: failure() run: | - compared_errors=$(( ${{ steps.improvement_lint.outputs.num_pr_errors }} - $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') )) + compared_errors=$((${{steps.improvement_lint.outputs.num_pr_errors}} - $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9'))) echo "$(( ${{ steps.improvement_lint.outputs.num_pr_errors }} - $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') ))" echo "comp errors = $compared_errors" >> GITHUB_OUTPUT echo "pr errors ${{ steps.improvement_lint.outputs.num_pr_errors }}" >> GITHUB_OUTPUT From 8787b1357fb94c761cd848aef4af2dbb3341ccad Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 17:21:04 +0100 Subject: [PATCH 55/70] print pr errors --- .github/workflows/process.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index a15f0f48fd..9279cfbd56 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -162,6 +162,8 @@ jobs: # default to 0 if no errors found num_pr_errors=${num_pr_errors:-0} + echo "num pr errors = $num_pr_errors" + id: improvement_lint - name: Get information about the current run From c422e74930acd0f47338a45621c97cf522ec7530 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 17:21:58 +0100 Subject: [PATCH 56/70] only apply to changed files !!! --- .github/workflows/process.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 9279cfbd56..fdce462758 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -158,7 +158,7 @@ jobs: hatch run lint:fmt_extra "${files[@]}" # need number of errors being flagged in these files - num_pr_errors=$((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') + num_pr_errors=$((hatch run lint:fmt_extra "${files[@]}" | tail -1) | tr -dc '0-9') # default to 0 if no errors found num_pr_errors=${num_pr_errors:-0} @@ -179,8 +179,8 @@ jobs: - name: Numbers of errors if: failure() run: | - compared_errors=$((${{steps.improvement_lint.outputs.num_pr_errors}} - $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9'))) - echo "$(( ${{ steps.improvement_lint.outputs.num_pr_errors }} - $((hatch run lint:fmt_extra | tail -1) | tr -dc '0-9') ))" + compared_errors=$((${{steps.improvement_lint.outputs.num_pr_errors}} - $((hatch run lint:fmt_extra "${files[@]}" | tail -1) | tr -dc '0-9'))) + echo "$(( ${{ steps.improvement_lint.outputs.num_pr_errors }} - $((hatch run lint:fmt_extra "${files[@]}" | tail -1) | tr -dc '0-9') ))" echo "comp errors = $compared_errors" >> GITHUB_OUTPUT echo "pr errors ${{ steps.improvement_lint.outputs.num_pr_errors }}" >> GITHUB_OUTPUT id: num_errors From 80c7780ed594ae986d4485a22032c993d7593ce9 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 17:23:25 +0100 Subject: [PATCH 57/70] print pr errors --- .github/workflows/process.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index fdce462758..9c695accf3 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -162,7 +162,8 @@ jobs: # default to 0 if no errors found num_pr_errors=${num_pr_errors:-0} - echo "num pr errors = $num_pr_errors" + echo "num pr errors" + echo "${num_pr_errors} id: improvement_lint From 8f32331b20c1a64b5423047ee1b6644c9c98333e Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 17:28:04 +0100 Subject: [PATCH 58/70] try new condtion --- .github/workflows/process.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 9c695accf3..ee26eb2016 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -180,14 +180,13 @@ jobs: - name: Numbers of errors if: failure() run: | - compared_errors=$((${{steps.improvement_lint.outputs.num_pr_errors}} - $((hatch run lint:fmt_extra "${files[@]}" | tail -1) | tr -dc '0-9'))) - echo "$(( ${{ steps.improvement_lint.outputs.num_pr_errors }} - $((hatch run lint:fmt_extra "${files[@]}" | tail -1) | tr -dc '0-9') ))" - echo "comp errors = $compared_errors" >> GITHUB_OUTPUT - echo "pr errors ${{ steps.improvement_lint.outputs.num_pr_errors }}" >> GITHUB_OUTPUT + num_main_errors=$((hatch run lint:fmt_extra "${files[@]}" | tail -1) | tr -dc '0-9') + id: num_errors - name: Find warning report comment - if: failure() && steps.num_errors.outputs.compared_errors > 0 + # if more errors in this PR than on main in the changed files + if: failure() && ${{ ${{steps.improvement_lint.outputs.num_pr_errors}} > ${{steps.num_errors.outputs.num_main_errors}} }} uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0 id: find-warning-report-comment with: From 9fac3f71fb569e1f9720c8a1b08a3081500e9c3c Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 17:28:45 +0100 Subject: [PATCH 59/70] again --- .github/workflows/process.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index ee26eb2016..373a6d2683 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -186,7 +186,7 @@ jobs: - name: Find warning report comment # if more errors in this PR than on main in the changed files - if: failure() && ${{ ${{steps.improvement_lint.outputs.num_pr_errors}} > ${{steps.num_errors.outputs.num_main_errors}} }} + if: failure() && ${{ steps.improvement_lint.outputs.num_pr_errors > steps.num_errors.outputs.num_main_errors }} uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0 id: find-warning-report-comment with: From 0a536e9186569e5046019aa3b223fe9f5ad3741c Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 17:31:01 +0100 Subject: [PATCH 60/70] hmm --- .github/workflows/process.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 373a6d2683..61aec56302 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -181,12 +181,14 @@ jobs: if: failure() run: | num_main_errors=$((hatch run lint:fmt_extra "${files[@]}" | tail -1) | tr -dc '0-9') - + compared_errors=$((${{steps.improvement_lint.outputs.num_pr_errors}} - )) + echo "$(( ${{ steps.improvement_lint.outputs.num_pr_errors }} - $((hatch run lint:fmt_extra "${files[@]}" | tail -1) | tr -dc '0-9') ))" + echo "comp errors = $compared_errors" >> GITHUB_OUTPUT + echo "pr errors ${{ steps.improvement_lint.outputs.num_pr_errors }}" >> GITHUB_OUTPUT id: num_errors - name: Find warning report comment - # if more errors in this PR than on main in the changed files - if: failure() && ${{ steps.improvement_lint.outputs.num_pr_errors > steps.num_errors.outputs.num_main_errors }} + if: failure() && steps.num_errors.outputs.compared_errors > 0 uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0 id: find-warning-report-comment with: @@ -201,7 +203,7 @@ jobs: comment-id: ${{ steps.find-warning-report-comment.outputs.comment-id }} issue-number: ${{ steps.workflow-run-info.outputs.pullRequestNumber }} body: | - Files changed by this PR have introduced ${{ env.compared_errors }} more linting errors when compared to main. + Files changed by this PR have introduced ${{ steps.num_errors.outputs.compared_errors }} more linting errors when compared to main. Please fix these edit-mode: replace From 893deb8f11ae2fd07565bf1ec9f4f4867177f15a Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 17:32:44 +0100 Subject: [PATCH 61/70] try to get the comment --- .github/workflows/process.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 61aec56302..3812f571d1 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -188,7 +188,7 @@ jobs: id: num_errors - name: Find warning report comment - if: failure() && steps.num_errors.outputs.compared_errors > 0 + if: failure() # && steps.num_errors.outputs.compared_errors > 0 uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4.0.0 id: find-warning-report-comment with: @@ -197,7 +197,7 @@ jobs: body-includes: ⚠️ improve_quality_job warning! direction: last - name: Warning comment - if: failure() && steps.num_errors.outputs.compared_errors > 0 + if: failure() # && steps.num_errors.outputs.compared_errors > 0 uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 with: comment-id: ${{ steps.find-warning-report-comment.outputs.comment-id }} From a509def961cc4e8f70c707df91fd437a4eb0d0bc Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 17:35:54 +0100 Subject: [PATCH 62/70] fix --- .github/workflows/process.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 3812f571d1..cd8de861fa 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -181,8 +181,10 @@ jobs: if: failure() run: | num_main_errors=$((hatch run lint:fmt_extra "${files[@]}" | tail -1) | tr -dc '0-9') - compared_errors=$((${{steps.improvement_lint.outputs.num_pr_errors}} - )) - echo "$(( ${{ steps.improvement_lint.outputs.num_pr_errors }} - $((hatch run lint:fmt_extra "${files[@]}" | tail -1) | tr -dc '0-9') ))" + num_main_errors=${num_main_errors:-0} + + compared_errors=$((${{steps.improvement_lint.outputs.num_pr_errors}} - ${{steps.num_errors.outputs.num_main_errors}})) + echo "$(( ${{ steps.improvement_lint.outputs.num_pr_errors }} - $((hatch run lint:fmt_extra "${files[@]}" | tail -1) | tr -dc '0-9') ))" >> GITHUB_OUTPUT echo "comp errors = $compared_errors" >> GITHUB_OUTPUT echo "pr errors ${{ steps.improvement_lint.outputs.num_pr_errors }}" >> GITHUB_OUTPUT id: num_errors From 3b2003dd95217a7dd80957408a62d452d3257c42 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 17:40:14 +0100 Subject: [PATCH 63/70] try again --- .github/workflows/process.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index cd8de861fa..1d17804d26 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -183,8 +183,7 @@ jobs: num_main_errors=$((hatch run lint:fmt_extra "${files[@]}" | tail -1) | tr -dc '0-9') num_main_errors=${num_main_errors:-0} - compared_errors=$((${{steps.improvement_lint.outputs.num_pr_errors}} - ${{steps.num_errors.outputs.num_main_errors}})) - echo "$(( ${{ steps.improvement_lint.outputs.num_pr_errors }} - $((hatch run lint:fmt_extra "${files[@]}" | tail -1) | tr -dc '0-9') ))" >> GITHUB_OUTPUT + compared_errors=$((steps.improvement_lint.outputs.num_pr_errors - steps.num_errors.outputs.num_main_errors)) echo "comp errors = $compared_errors" >> GITHUB_OUTPUT echo "pr errors ${{ steps.improvement_lint.outputs.num_pr_errors }}" >> GITHUB_OUTPUT id: num_errors From d67c5d2216b5cf60157217b3c493322e6d6f09ab Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 17:42:56 +0100 Subject: [PATCH 64/70] bracket again --- .github/workflows/process.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 1d17804d26..ea897ac894 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -183,7 +183,7 @@ jobs: num_main_errors=$((hatch run lint:fmt_extra "${files[@]}" | tail -1) | tr -dc '0-9') num_main_errors=${num_main_errors:-0} - compared_errors=$((steps.improvement_lint.outputs.num_pr_errors - steps.num_errors.outputs.num_main_errors)) + compared_errors=$(( $((steps.improvement_lint.outputs.num_pr_errors)) - $((steps.num_errors.outputs.num_main_errors)) )) echo "comp errors = $compared_errors" >> GITHUB_OUTPUT echo "pr errors ${{ steps.improvement_lint.outputs.num_pr_errors }}" >> GITHUB_OUTPUT id: num_errors From 0042f0ec90f709286647d6fa5df371affe7134ab Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 17:45:14 +0100 Subject: [PATCH 65/70] remove spaces --- .github/workflows/process.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index ea897ac894..616200845a 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -183,7 +183,7 @@ jobs: num_main_errors=$((hatch run lint:fmt_extra "${files[@]}" | tail -1) | tr -dc '0-9') num_main_errors=${num_main_errors:-0} - compared_errors=$(( $((steps.improvement_lint.outputs.num_pr_errors)) - $((steps.num_errors.outputs.num_main_errors)) )) + compared_errors=$(($((steps.improvement_lint.outputs.num_pr_errors))-$((steps.num_errors.outputs.num_main_errors)))) echo "comp errors = $compared_errors" >> GITHUB_OUTPUT echo "pr errors ${{ steps.improvement_lint.outputs.num_pr_errors }}" >> GITHUB_OUTPUT id: num_errors From eeb4832d846f26f566d738408d3ac05491d8b05d Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 17:47:55 +0100 Subject: [PATCH 66/70] testing --- .github/workflows/process.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 616200845a..7fe9164e7c 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -183,7 +183,8 @@ jobs: num_main_errors=$((hatch run lint:fmt_extra "${files[@]}" | tail -1) | tr -dc '0-9') num_main_errors=${num_main_errors:-0} - compared_errors=$(($((steps.improvement_lint.outputs.num_pr_errors))-$((steps.num_errors.outputs.num_main_errors)))) + ((compared_errors=steps.improvement_lint.outputs.num_pr_errors-steps.num_errors.outputs.num_main_errors)) + # compared_errors=$(($((steps.improvement_lint.outputs.num_pr_errors))-$((steps.num_errors.outputs.num_main_errors)))) echo "comp errors = $compared_errors" >> GITHUB_OUTPUT echo "pr errors ${{ steps.improvement_lint.outputs.num_pr_errors }}" >> GITHUB_OUTPUT id: num_errors From cc89766a495b771d8dc93a665aa5a217a3740780 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 17:50:40 +0100 Subject: [PATCH 67/70] try --- .github/workflows/process.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 7fe9164e7c..825d5db1d5 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -183,10 +183,11 @@ jobs: num_main_errors=$((hatch run lint:fmt_extra "${files[@]}" | tail -1) | tr -dc '0-9') num_main_errors=${num_main_errors:-0} - ((compared_errors=steps.improvement_lint.outputs.num_pr_errors-steps.num_errors.outputs.num_main_errors)) + echo $num_main_errors + # # compared_errors=$(($((steps.improvement_lint.outputs.num_pr_errors))-$((steps.num_errors.outputs.num_main_errors)))) - echo "comp errors = $compared_errors" >> GITHUB_OUTPUT - echo "pr errors ${{ steps.improvement_lint.outputs.num_pr_errors }}" >> GITHUB_OUTPUT + # echo "comp errors = $compared_errors" >> GITHUB_OUTPUT + # echo "pr errors ${{ steps.improvement_lint.outputs.num_pr_errors }}" >> GITHUB_OUTPUT id: num_errors - name: Find warning report comment From e597c28c2bacf1651489012232ffaf46ef298f8c Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 17:54:51 +0100 Subject: [PATCH 68/70] back to curly brackets --- .github/workflows/process.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 825d5db1d5..3f1de57c80 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -185,7 +185,7 @@ jobs: echo $num_main_errors # - # compared_errors=$(($((steps.improvement_lint.outputs.num_pr_errors))-$((steps.num_errors.outputs.num_main_errors)))) + # compared_errors=$(( ${{ steps.improvement_lint.outputs.num_pr_errors }} - ${{ steps.num_errors.outputs.num_main_errors }})) # echo "comp errors = $compared_errors" >> GITHUB_OUTPUT # echo "pr errors ${{ steps.improvement_lint.outputs.num_pr_errors }}" >> GITHUB_OUTPUT id: num_errors From 9e33b563cade12289291dc318a16400c0c1b3351 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 17:55:12 +0100 Subject: [PATCH 69/70] whoops --- .github/workflows/process.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index 3f1de57c80..bafeeefad5 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -184,10 +184,10 @@ jobs: num_main_errors=${num_main_errors:-0} echo $num_main_errors - # - # compared_errors=$(( ${{ steps.improvement_lint.outputs.num_pr_errors }} - ${{ steps.num_errors.outputs.num_main_errors }})) - # echo "comp errors = $compared_errors" >> GITHUB_OUTPUT - # echo "pr errors ${{ steps.improvement_lint.outputs.num_pr_errors }}" >> GITHUB_OUTPUT + + compared_errors=$(( ${{ steps.improvement_lint.outputs.num_pr_errors }} - ${{ steps.num_errors.outputs.num_main_errors }})) + echo "comp errors = $compared_errors" >> GITHUB_OUTPUT + echo "pr errors ${{ steps.improvement_lint.outputs.num_pr_errors }}" >> GITHUB_OUTPUT id: num_errors - name: Find warning report comment From e4905548e200d3af9871b86b3d678df06a32b5c3 Mon Sep 17 00:00:00 2001 From: Clair Mould <86794332+clmould@users.noreply.github.com> Date: Mon, 28 Sep 2026 17:59:46 +0100 Subject: [PATCH 70/70] print number --- .github/workflows/process.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml index bafeeefad5..d2e840ddba 100644 --- a/.github/workflows/process.yml +++ b/.github/workflows/process.yml @@ -206,7 +206,7 @@ jobs: comment-id: ${{ steps.find-warning-report-comment.outputs.comment-id }} issue-number: ${{ steps.workflow-run-info.outputs.pullRequestNumber }} body: | - Files changed by this PR have introduced ${{ steps.num_errors.outputs.compared_errors }} more linting errors when compared to main. + Files changed by this PR have introduced $"{{ steps.num_errors.outputs.compared_errors }}" more linting errors when compared to main. Please fix these edit-mode: replace