Add capability to exclude individual Fortran files from Codee formatting in GitHub actions#732
Merged
Merged
Conversation
Add missing spaces in host cap (for Codee).
…' and 'code format on' blocks (test/unit_tests/sample_files/fortran_files/{linebreak_test.F90,comments_test.F90,long_string_test.F90})
….F90` (NCAR#722) 1. Add threading test to `capgen_test`. This is exercised with `ctest` without any further changes, and it passes. I added a comparison of all averages to the `compare_data` call, which compares the `omp1` and `omp2` test runs. This is commit NCAR@900069b. While testing this, @peverwhee and I uncovered a bug (uninitialized variable, see NCAR#722 (comment)) that I had to fix. 2. Update Codee to 2025.4.8 and simplify `.github/workflows/fortran-formatting.yaml` (there was an actual error using the workflow that needed to be fixed). This is commit NCAR@a76f82c 3. Codee format `test/capgen_test/*.F90`. This is commit NCAR@24223ff User interface changes?: No Issues: Working toward NCAR#721 Testing: all pass test removed: n/a unit tests: n/a system tests: existing capgen test now run with `OMP_NUM_THREADS=1` and `OMP_NUM_THREADS=2` manual testing: tested manually on my dev machine with spack-stack-2.1.0
…cl (NCAR#726) Fix TypeError from ParseSyntaxError in parse_fortran_var_decl In `parse_fortran_var_decl()`, when `FortranVar()` raises a `ParseSyntaxError`, the exception object was appended directly to the errors list. `parse_module` expects string elements and calls `'\n'.join(errors)`, which crashes with a `TypeError`. Convert the exception to a string before appending. From the context above `errmsg` is already being appended to `errors` array so I think this is a safe change to make that is consistent with the intended type of `errors[]`. User interface changes?: No Fixes: closes NCAR#725 Testing: unit tests: New doctest for parse_fortran_var_decl() covers previous error manual testing: see minimal reproducible example in issue NCAR#725
This was referenced Apr 3, 2026
climbfuji
commented
Apr 6, 2026
Collaborator
Author
|
@gold2718 Ready for your review |
peverwhee
approved these changes
Apr 6, 2026
dustinswales
approved these changes
Apr 7, 2026
dustinswales
left a comment
Member
There was a problem hiding this comment.
Looks good to me. Thanks!
Collaborator
Author
|
@mkavulich Looks like we have all the approvals we need to merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds the capability to exclude individual Fortran files from Codee formatting in GitHub actions. This was originally motivated by issues with making the Fortran writer Codee compliant (PR #727). These issues were resolved, but there are scenarios were excluding individual files from Codee formatting checks may be needed (see comments in #727).
User interface changes?: No
Issues
N/A
Testing
Testing: all pass (only updates to existing tests, no new tests, no tests removed)
Additional information
See comments in #727