Skip to content

style: apply ffmt v0.4.3 formatting; bump ffmt pin#1584

Open
sbryngelson wants to merge 2 commits into
masterfrom
ffmt-0.4.3
Open

style: apply ffmt v0.4.3 formatting; bump ffmt pin#1584
sbryngelson wants to merge 2 commits into
masterfrom
ffmt-0.4.3

Conversation

@sbryngelson

Copy link
Copy Markdown
Member

Bumps the ffmt pin to 0.4.3 (release notes) and applies its formatting.

ffmt 0.4.3 fixes the continuation-handling bugs that earlier ffmt versions introduced into this codebase, and repairs the damage they left behind:

  • Stray blank lines inside continued subroutine argument lists (introduced by ffmt ~v0.1 in Replace fprettify with ffmt formatter; comment cleanup #1334, frozen in place by every version since) are removed and the signatures rewrapped — all five Riemann solver files, m_viscous, m_weno, m_bubbles, m_muscl, m_rhs, m_mpi_common, m_helper_basic, m_riemann_state
  • Blank lines after if (...) then ! comment openers are now managed consistently with comment-less openers (m_body_forces, m_mpi_common, m_riemann_state, HardcodedIC includes)
  • Unicode punctuation in one inline comment converted to ASCII (2dHardcodedIC.fpp)
  • One over-length !< doc comment relocated to a !> block (m_derived_types.fpp)

No code tokens change. The reformat was verified idempotent (ffmt --check clean on the result) and the formatter outputs were gfortran compile-checked during ffmt's release validation. ffmt 0.4.3 also prevents the class of bug that caused this: split string literals, dangling &s, and OpenACC/OpenMP sentinels inside continuations are now handled per the F2018 continuation rules.

ffmt 0.4.3 fixes the continuation-handling bugs that earlier versions
introduced into this codebase, and the new version repairs the damage:

- stray blank lines inside continued subroutine argument lists (introduced
  by ffmt ~v0.1 in #1334) are removed and the signatures rewrapped
- blank lines after `if (...) then  ! comment` openers are now managed
  consistently with comment-less openers
- unicode punctuation in one inline comment converted to ASCII
- one over-length `!<` doc comment relocated to a `!>` block

No code tokens change; output verified idempotent and compile-checked.
Copilot AI review requested due to automatic review settings June 12, 2026 14:48

Copilot AI left a comment

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.

Pull request overview

Updates the toolchain’s pinned ffmt version to 0.4.3 and reapplies formatter output across the Fortran .fpp sources to eliminate prior continuation/blank-line formatting artifacts, without intended semantic changes.

Changes:

  • Bump ffmt pin from 0.4.1 to 0.4.3 in the Python toolchain.
  • Reformat multiple Fortran/Fypp sources to remove stray blank lines in continued argument lists and normalize continuation wrapping.
  • Minor comment/doc formatting adjustments (ASCII punctuation, doc comment block relocation).

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
toolchain/pyproject.toml Bumps the pinned ffmt dependency to 0.4.3.
src/simulation/m_weno.fpp Removes stray blank line in a continued subroutine argument list; rewrites signature wrapping.
src/simulation/m_viscous.fpp Rewraps long subroutine signatures to avoid problematic blank lines in continuations.
src/simulation/m_riemann_state.fpp Normalizes continuation formatting and removes blank lines after commented if (...) then openers.
src/simulation/m_riemann_solvers.fpp Rewraps s_riemann_solver argument list continuation formatting.
src/simulation/m_riemann_solver_lf.fpp Rewraps s_lf_riemann_solver argument list continuation formatting.
src/simulation/m_riemann_solver_hlld.fpp Rewraps s_hlld_riemann_solver argument list continuation formatting.
src/simulation/m_riemann_solver_hllc.fpp Rewraps s_hllc_riemann_solver argument list continuation formatting.
src/simulation/m_riemann_solver_hll.fpp Rewraps s_hll_riemann_solver argument list continuation formatting.
src/simulation/m_rhs.fpp Removes stray blank line in a continued subroutine argument list; normalizes spacing.
src/simulation/m_muscl.fpp Removes stray blank line in a continued subroutine argument list; rewrites signature wrapping.
src/simulation/m_bubbles.fpp Removes stray blank lines in continued subroutine argument lists; normalizes wrapping.
src/simulation/m_body_forces.fpp Removes blank lines after commented if (...) then openers for consistent formatting.
src/common/m_mpi_common.fpp Removes blank lines after commented if (...) then openers in MPI send/recv logic.
src/common/m_helper_basic.fpp Removes stray blank line in a continued subroutine argument list; normalizes wrapping.
src/common/m_derived_types.fpp Moves an overlong inline !< doc comment into a !> block and aligns declarations.
src/common/include/2dHardcodedIC.fpp Converts Unicode punctuation in a comment to ASCII/escaped sequences.
src/common/include/1dHardcodedIC.fpp Removes a couple of blank lines inside a select case block for consistent formatting.

Comment thread src/common/include/2dHardcodedIC.fpp Outdated
! q_prim_vf(eqn_idx%E)%sf(i,j,0) = 6._wp - q_prim_vf(eqn_idx%B%beg)%sf(i,j,0)**2/2._wp
end if
case (262) ! Tilted 2D MHD shocktube at α = arctan2 (≈63.4°)
case (262) ! Tilted 2D MHD shock-tube at \alpha = arctan2 (\approx63.4 deg)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good catch — the arctan2 wording predates this PR (the unicode conversion just made it visible), but it does read like atan2. Fixed to arctan(2) in aa0e92b to match the atan(2._wp) below. The earlier CI failures were PyPI propagation lag (ffmt==0.4.3 was published minutes before the run); the index serves it now and this push retriggers CI.

@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.93%. Comparing base (ac5774e) to head (aa0e92b).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1584      +/-   ##
==========================================
- Coverage   60.94%   60.93%   -0.02%     
==========================================
  Files          82       82              
  Lines       19922    19916       -6     
  Branches     2924     2924              
==========================================
- Hits        12141    12135       -6     
  Misses       5805     5805              
  Partials     1976     1976              

☔ View full report in Codecov by Harness.
📢 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.

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.

2 participants