-
Notifications
You must be signed in to change notification settings - Fork 543
Merge rc-5.0.1 to dev (maintenance) #3474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
a605a77
AD: fix OLAF treecode near-core regularization floor and TwrInfl Open…
luwang00 a207551
FVW/OLAF: skip particle exp mollifier beyond 2 core radii
luwang00 45f0112
CMake: CYGWIN or MINGW
RBergua 409ed98
SrcPnlFile parsing
RBergua 28beea2
Merge pull request #3443 from RBergua/OLAF_filename_parsing
andrew-platt 663fc50
Merge pull request #3442 from RBergua/SoilDyn_GCC_initialization
andrew-platt 460c9c0
DTaero tolerance instead of epsilon fraction
RBergua 4839314
Remove OneMinusEpsilon declaration
RBergua 2248a77
OLAF: remove unused Tree DistanceDirect field; convert velocity-metho…
luwang00 980d9e3
Update r-test pointer
luwang00 0ec4bb2
Merge pull request #3454 from RBergua/OLAF-timestep-tolerance-fix
andrew-platt 287381a
Merge pull request #3430 from luwang00/b/OLAF
andrew-platt d937bfb
GetBoundsT: lower bound with grid tolerance
RBergua 0c5c942
IfW_FlowField.f90: Fix typos
RBergua d0e013a
FVW_Subs: convert InducedVelocitiesAll_OnGrid (wake tree rebuild) int…
RBergua 3e163e1
FVW: build the wake tree once per VTK and reuse it for all grids
RBergua b1e2954
FVW: Streamline VTK grid-output condition
RBergua aa22ddc
AD: refresh wind rotations for direction linearization
Mohammad-Salik 316018d
Add GitHub action to check Fortran source for tab characters
andrew-platt bf06cde
StrucCtrl: remove tabs from omega_P description string
andrew-platt a42c07d
Replace tabs with spaces per format requirement
andrew-platt 6f85fe7
Address PR review: fail the tab check on scan errors
andrew-platt 2ac51e1
Remove leftover assignment
RBergua 9dd8ea8
Fix missing regularization core on mirrored FVW segments (ShearModel=1)
luwang00 d7694a2
Merge pull request #3472 from luwang00/b/OLAFMirror
andrew-platt 718f1df
Address PR review: scan all Fortran sources, fix column reporting
andrew-platt a63ded4
Address PR review: correct stale exclusion note in the workflow
andrew-platt 1f05313
Merge pull request #3470 from RBergua/OLAF_VTK_grid_outputs
andrew-platt fbb3dab
Merge pull request #3469 from andrew-platt/f/GH_action_tab_check
andrew-platt bcc7623
Merge pull request #3466 from RBergua/InflowWind_Grid3DField
andrew-platt 1bb6809
Merge pull request #3468 from Mohammad-Salik/fix/aerodyn-propagation-…
andrew-platt 6e5f894
Update regression tests with aero after OF PR #3468
andrew-platt 2fb7c4b
Merge remote-tracking branch 'OpenFAST/rc-5.0.1' into m/501_dev_Sept26
andrew-platt b21a20b
FVW: import T_Tree explicitly from FVW_VortexTools
andrew-platt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| #!/usr/bin/env bash | ||
| # | ||
| # check_tabs.sh -- verify that no Fortran source file contains tab characters. | ||
| # | ||
| # OpenFAST style requires 3-space indentation; tab characters are not allowed | ||
| # because they render inconsistently across editors and break the alignment of | ||
| # continuation lines. | ||
| # | ||
| # Scans every git-tracked *.f90 / *.F90 file, with no exclusions. When a tab is | ||
| # found in a file generated by the OpenFAST Registry, the report says so and | ||
| # points at the registry input, since the fix belongs in the .txt rather than in | ||
| # the generated Fortran. | ||
| # | ||
| # Exit status: | ||
| # 0 no tab characters found | ||
| # 1 one or more tab characters found | ||
| # 2 the check could not run (not a git checkout, or a file failed to scan) | ||
| # | ||
| set -uo pipefail | ||
|
|
||
| TAB=$(printf '\t') | ||
| MARK='--->' | ||
|
|
||
| repo_root=$(git rev-parse --show-toplevel) || { | ||
| echo "ERROR: not inside a git checkout; cannot determine repository root." | ||
| exit 2 | ||
| } | ||
| cd "$repo_root" || exit 2 | ||
|
|
||
| echo "OpenFAST Fortran source style check" | ||
| echo "===================================" | ||
| echo | ||
| echo "OpenFAST style requires 3 space indentation in all Fortran source files." | ||
| echo "Tab characters are not allowed." | ||
| echo | ||
|
|
||
| mapfile -t FILES < <(git ls-files -- '*.f90' '*.F90' | sort) | ||
|
|
||
| if [ "${#FILES[@]}" -eq 0 ]; then | ||
| echo "ERROR: no Fortran source files found -- is this a git checkout?" | ||
| exit 2 | ||
| fi | ||
|
|
||
| n_bad_files=0 | ||
| n_bad_lines=0 | ||
|
|
||
| for file in "${FILES[@]}"; do | ||
| # grep exits 0 on a match, 1 on no match, and >1 on an actual error. | ||
| # Only "no match" may be skipped; a scan failure must not look like a pass. | ||
| matches=$(grep -n -- "$TAB" "$file") | ||
| status=$? | ||
| if [ "$status" -eq 1 ]; then | ||
| continue | ||
| elif [ "$status" -ne 0 ]; then | ||
| echo "ERROR: failed to scan ${file} (grep exit ${status})." | ||
| exit 2 | ||
| fi | ||
|
|
||
| n_bad_files=$((n_bad_files + 1)) | ||
| echo "$file" | ||
|
|
||
| while IFS= read -r match; do | ||
| lineno=${match%%:*} | ||
| content=${match#*:} | ||
|
|
||
| # Compute the column with parameter expansion rather than awk: "awk -v" | ||
| # decodes backslash escapes in the assigned value, which shifts the index | ||
| # on any line containing a backslash (Doxygen markup, format strings). | ||
| prefix=${content%%$TAB*} | ||
| column=$(( ${#prefix} + 1 )) | ||
| n_bad_lines=$((n_bad_lines + 1)) | ||
|
|
||
| printf ' line %s, column %s: %s\n' "$lineno" "$column" "${content//$TAB/$MARK}" | ||
|
|
||
| # Inline annotation on the pull request diff. | ||
| if [ "${GITHUB_ACTIONS:-}" = "true" ]; then | ||
| echo "::error file=${file},line=${lineno},col=${column}::Tab character found. Use 3 space indentation; tabs are not allowed." | ||
| fi | ||
| done <<< "$matches" | ||
|
|
||
| # A tab in a Registry-generated file cannot be fixed in place: it was copied | ||
| # from a description string in the registry input, so point the developer | ||
| # there instead. | ||
| if head -n 1 "$file" 2>/dev/null | grep -q 'STARTOFREGISTRYGENERATEDFILE'; then | ||
| echo " NOTE: this file is generated by the OpenFAST Registry. Fix the tab in" | ||
| echo " the corresponding registry input (.txt) in the same directory," | ||
| echo " then regenerate this file." | ||
| fi | ||
|
|
||
| echo | ||
| done | ||
|
|
||
| echo "Checked ${#FILES[@]} Fortran source file(s)." | ||
|
|
||
| if [ "$n_bad_files" -gt 0 ]; then | ||
| echo | ||
| echo "ERROR: found ${n_bad_lines} line(s) containing tab characters in ${n_bad_files} file(s)." | ||
| echo " Replace each tab with spaces (3 space indentation) and commit the fix." | ||
| echo " Tabs above are shown as '${MARK}'." | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "No tab characters found." | ||
| exit 0 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
|
|
||
| name: 'Fortran Source Style' | ||
|
|
||
| #------------------------------------------------------------------------------- | ||
| # Notes | ||
| # - OpenFAST requires 3 space indentation in Fortran source; tab characters are | ||
| # not allowed. This workflow enforces that rule on all git-tracked *.f90 and | ||
| # *.F90 files. | ||
| # - No files are excluded from the scan. A tab in a Registry-generated file is | ||
| # reported with a note pointing at the registry .txt input, since that is | ||
| # where it has to be fixed. | ||
| #------------------------------------------------------------------------------- | ||
|
|
||
| on: | ||
| push: | ||
| paths: | ||
| - '**.f90' | ||
| - '**.F90' | ||
| - '.github/workflows/check-tabs.yml' | ||
| - '.github/scripts/check_tabs.sh' | ||
|
|
||
| pull_request: | ||
| types: [opened, synchronize, edited, reopened] | ||
|
|
||
| jobs: | ||
| check-tabs: | ||
| name: Check for tab characters | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: false | ||
|
|
||
| - name: Check Fortran source for tab characters | ||
| run: .github/scripts/check_tabs.sh |
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.