Skip to content

Better test label#1380

Open
danieljvickers wants to merge 15 commits intoMFlowCode:masterfrom
danieljvickers:better-test-label
Open

Better test label#1380
danieljvickers wants to merge 15 commits intoMFlowCode:masterfrom
danieljvickers:better-test-label

Conversation

@danieljvickers
Copy link
Copy Markdown
Member

@danieljvickers danieljvickers commented Apr 24, 2026

Description

I think it would be better to label tests by compiler name instead of if they are or are not intel compilers. That is all.

Type of change

  • Documentation

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 24, 2026

📝 Walkthrough

Walkthrough

This pull request contains two minor formatting updates. The first modifies .github/workflows/test.yml to improve the job display name by converting a boolean matrix value into a conditional string discriminator, replacing direct variable interpolation. The second updates src/common/m_model.fpp to add spacing in a console output message for improved readability. Both changes are purely cosmetic and involve no alterations to logic, control flow, or public entity declarations.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Better test label' is concise and directly related to the main change: improving test labeling in the CI workflow by using compiler names instead of boolean values.
Description check ✅ Passed The description provides motivation for the change and includes the required 'Type of change' section, but is missing the 'Testing' section and other optional sections from the template.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

Claude Code Review

Head SHA: 90a988b

Files changed:

  • 1
  • .github/workflows/test.yml

Findings

Malformed GitHub Actions expression — job name broken

.github/workflows/test.yml, changed line:

name: ${{ matrix.nvhpc && format('NVHPC {0} ({1})', matrix.nvhpc, matrix.target) || format('Github ({0}, {1}, {2}, matrix.intel && 'intel' || 'GNU')', matrix.os, matrix.mpi, matrix.debug, matrix.intel) }}

The ternary-style expression matrix.intel && 'intel' || 'GNU' was placed inside the format string literal instead of as a fourth argument to format(). In GitHub Actions expressions, string literals are delimited by single quotes, so the format string 'Github ({0}, {1}, {2}, matrix.intel && ' is terminated at the ' immediately before intel. The remainder — intel' || 'GNU') — is then parsed as bare identifiers and string fragments, making the entire expression syntactically invalid.

The expression will either error at evaluation time or produce a mangled job name, making matrix job identification unreliable in the Actions UI.

The intended fix is to move the conditional outside the format string as the fourth positional argument:

format('Github ({0}, {1}, {2}, {3})', matrix.os, matrix.mpi, matrix.debug, matrix.intel && 'intel' || 'GNU')

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.76%. Comparing base (be1e665) to head (7e40852).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1380   +/-   ##
=======================================
  Coverage   64.76%   64.76%           
=======================================
  Files          71       71           
  Lines       18713    18713           
  Branches     1549     1549           
=======================================
  Hits        12119    12119           
  Misses       5638     5638           
  Partials      956      956           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@danieljvickers
Copy link
Copy Markdown
Member Author

@sbryngelson This incredibly important and revolutionary PR is ready for review.

@sbryngelson
Copy link
Copy Markdown
Member

hard to say... https://github.com/MFlowCode/MFC/actions/runs/24893271532

You need to make a trivial change to a source file to trigger test runs so we can see the re-labeling.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f756d33e-921c-4711-8d7b-d5f81a474536

📥 Commits

Reviewing files that changed from the base of the PR and between 10a2f60 and ab9d71b.

📒 Files selected for processing (2)
  • .github/workflows/test.yml
  • src/common/m_model.fpp

Comment thread .github/workflows/test.yml Outdated

github:
name: ${{ matrix.nvhpc && format('NVHPC {0} ({1})', matrix.nvhpc, matrix.target) || format('Github ({0}, {1}, {2}, intel={3})', matrix.os, matrix.mpi, matrix.debug, matrix.intel) }}
name: ${{ matrix.nvhpc && format('NVHPC {0} ({1})', matrix.nvhpc, matrix.target) || format('Github ({0}, {1}, {2}, matrix.intel && 'intel' || 'GNU')', matrix.os, matrix.mpi, matrix.debug, matrix.intel) }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify malformed vs corrected expression pattern on the changed line.
set -euo pipefail

echo "Current Line 152:"
sed -n '152p' .github/workflows/test.yml

echo
echo "Check for malformed token placement (conditional inside quoted format string):"
rg -n "format\('Github \(\{0\}, \{1\}, \{2\}, matrix\.intel && 'intel' \|\| 'GNU'\)'" .github/workflows/test.yml || true

echo
echo "Expected after fix:"
echo "format('Github ({0}, {1}, {2}, {3})', ..., matrix.intel && 'intel' || 'GNU')"

Repository: MFlowCode/MFC

Length of output: 675


🌐 Web query:

GitHub Actions format() function syntax expressions

💡 Result:

GitHub Actions expression format syntax 1) Where you use it - In workflow files, format is a built-in function you call inside a GitHub Actions expression, usually within ${{ ... }}. - Expressions are written as ${{ }}. 2) Syntax (parameter order) - format( string, replaceValue0, replaceValue1, ..., replaceValueN ) - The string contains placeholders in {N} form (0-based), where N is an integer. - You must provide at least one replaceValue and the string. - Curly braces must be escaped by doubling them (e.g., {{ and }}) when you want literal braces in the output. 3) Examples - Basic substitution: ${{ format('Hello {0} {1} {2}', 'Mona', 'the', 'Octocat') }} -> Hello Mona the Octocat - Escaping braces: ${{ format('{{Hello {0} {1} {2}!}}', 'Mona', 'the', 'Octocat') }} -> {Hello Mona the Octocat!} 4) Common usage pattern - You can pass contexts/variables as arguments to format; they’ll be substituted into the {N} placeholders. Example pattern: ${{ format('https://{0}.app.com', steps.env_target_prod.outputs.TARGET || steps.env_target_stage.outputs.TARGET) }} 5) Notes / pitfalls - Make sure you’re not treating the format call as plain text—wrap it in ${{ ... }} so GitHub evaluates it. - Placeholders must be exactly {0}, {1}, etc.; escaping with {{ / }} is required for literal braces.

Citations:


Fix malformed GitHub Actions expression in job name.

Line 152 embeds the conditional matrix.intel && 'intel' || 'GNU' as literal text inside the format string instead of evaluating it as an argument. This will cause the job name to display the literal conditional text rather than the intended value.

Proposed fix
-    name: ${{ matrix.nvhpc && format('NVHPC {0} ({1})', matrix.nvhpc, matrix.target) || format('Github ({0}, {1}, {2}, matrix.intel && 'intel' || 'GNU')', matrix.os, matrix.mpi, matrix.debug, matrix.intel) }}
+    name: ${{ matrix.nvhpc && format('NVHPC {0} ({1})', matrix.nvhpc, matrix.target) || format('Github ({0}, {1}, {2}, {3})', matrix.os, matrix.mpi, matrix.debug, matrix.intel && 'intel' || 'GNU') }}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
name: ${{ matrix.nvhpc && format('NVHPC {0} ({1})', matrix.nvhpc, matrix.target) || format('Github ({0}, {1}, {2}, matrix.intel && 'intel' || 'GNU')', matrix.os, matrix.mpi, matrix.debug, matrix.intel) }}
name: ${{ matrix.nvhpc && format('NVHPC {0} ({1})', matrix.nvhpc, matrix.target) || format('Github ({0}, {1}, {2}, {3})', matrix.os, matrix.mpi, matrix.debug, matrix.intel && 'intel' || 'GNU') }}
🧰 Tools
🪛 actionlint (1.7.12)

[error] 152-152: unexpected token "IDENT" while parsing arguments of function call. expecting ",", ")"

(expression)

wilfonba
wilfonba previously approved these changes Apr 24, 2026
@sbryngelson
Copy link
Copy Markdown
Member

Invalid workflow file: .github/workflows/test.yml#L1
(Line: 152, Col: 11): Unexpected symbol: 'intel''. Located at position 123 within expression: matrix.nvhpc && format('NVHPC {0} ({1})', matrix.nvhpc, matrix.target) || format('Github ({0}, {1}, {2}, matrix.intel && 'intel' || 'GNU')', matrix.os, matrix.mpi, matrix.debug, matrix.intel)

danieljvickers and others added 4 commits April 26, 2026 10:30
Co-authored-by: Daniel Vickers <danieljvickers@login09.frontier.olcf.ornl.gov>
Co-authored-by: Daniel Vickers <danieljvickers@frontier00007.frontier.olcf.ornl.gov>
Co-authored-by: Daniel Vickers <danieljvickers@login12.frontier.olcf.ornl.gov>
Co-authored-by: wilfonba <bwilfong3@gatech.edu>
Co-authored-by: Daniel Vickers <danieljvickers@frontier01665.frontier.olcf.ornl.gov>
Co-authored-by: Dimitrios Adam <dimitriosadam@Dimitrioss-MacBook-Air.local>
Co-authored-by: Dimitrios Adam <dimitriosadam@ipsec-10-2-192-204.vpn.gatech.edu>
Co-authored-by: Spencer Bryngelson <sbryngelson@gmail.com>
Co-authored-by: Spencer Bryngelson <shb@gatech.edu>
Co-authored-by: sidkamat <siddharthbkamat@gmail.com>
@danieljvickers
Copy link
Copy Markdown
Member Author

danieljvickers commented Apr 26, 2026

@sbryngelson I confirmed that the code worked, and printed either GNU or intel in the test suite, and then revered the changes to src. This should be good to PR now.
Screenshot from 2026-04-26 10-33-14

@sbryngelson
Copy link
Copy Markdown
Member

What happened to your comment that vanished? I'm confused

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants