Skip to content

Commit 93e3d09

Browse files
authored
Replace pylint + autopep8 with ruff (#1300)
1 parent 0ac2be7 commit 93e3d09

File tree

165 files changed

+7267
-6599
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+7267
-6599
lines changed

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ All commands run from the repo root via `./mfc.sh`.
4141
# Verification (pre-commit CI checks)
4242
./mfc.sh precheck -j 8 # Run all 5 lint checks (same as CI gate)
4343
./mfc.sh format -j 8 # Auto-format Fortran (.fpp/.f90) + Python
44-
./mfc.sh lint # Pylint + Python unit tests
44+
./mfc.sh lint # Ruff lint + Python unit tests
4545
./mfc.sh spelling # Spell check
4646

4747
# Module loading (HPC clusters only — must use `source`)

benchmarks/5eq_rk3_weno3_hllc/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
# - weno_order : 3
77
# - riemann_solver : 2
88

9+
import argparse
910
import json
1011
import math
11-
import argparse
1212

1313
parser = argparse.ArgumentParser(prog="Benchmarking Case 1", description="This MFC case was created for the purposes of benchmarking MFC.", formatter_class=argparse.ArgumentDefaultsHelpFormatter)
1414

benchmarks/hypo_hll/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
# - hypoelasticity : T
55
# - riemann_solver : 1
66

7+
import argparse
78
import json
89
import math
9-
import argparse
1010

1111
parser = argparse.ArgumentParser(prog="Benchmarkin Case 3", description="This MFC case was created for the purposes of benchmarking MFC.", formatter_class=argparse.ArgumentDefaultsHelpFormatter)
1212

benchmarks/ibm/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
# Additional Benchmarked Features
44
# - ibm : T
55

6+
import argparse
67
import json
78
import math
8-
import argparse
99

1010
parser = argparse.ArgumentParser(prog="Benchmarking Case 4", description="This MFC case was created for the purposes of benchmarking MFC.", formatter_class=argparse.ArgumentDefaultsHelpFormatter)
1111

benchmarks/igr/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
# - viscous : T
66
# - igr_order : 5
77

8+
import argparse
89
import json
910
import math
10-
import argparse
1111

1212
parser = argparse.ArgumentParser(prog="Benchmarking Case 5", description="This MFC case was created for the purposes of benchmarking MFC.", formatter_class=argparse.ArgumentDefaultsHelpFormatter)
1313

benchmarks/viscous_weno5_sgb_acoustic/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
# - bubble_model : 3
99
# - acoustic_source : T
1010

11+
import argparse
1112
import json
1213
import math
13-
import argparse
1414

1515
parser = argparse.ArgumentParser(prog="Benchmarking Case 2", description="This MFC case was created for the purposes of benchmarking MFC.", formatter_class=argparse.ArgumentDefaultsHelpFormatter)
1616

docs/documentation/contributing.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -715,14 +715,15 @@ Every push to a PR triggers CI. Understanding the pipeline helps you fix failure
715715

716716
### Lint Gate (runs first, blocks all other jobs)
717717

718-
All four checks must pass before any builds start:
718+
All five checks must pass before any builds start:
719719

720720
1. **Formatting**`./mfc.sh format` (auto-handled by pre-commit hook)
721721
2. **Spelling**`./mfc.sh spelling`
722-
3. **Toolchain lint**`./mfc.sh lint` (Python code quality)
722+
3. **Toolchain lint**`./mfc.sh lint` (ruff + Python unit tests)
723723
4. **Source lint** — checks for:
724724
- Raw `!$acc` or `!$omp` directives (must use Fypp GPU macros)
725725
- Double-precision intrinsics (`dsqrt`, `dexp`, `dble`, etc.)
726+
5. **Doc references** — validates documentation cross-references
726727

727728
### Build and Test Matrix
728729

examples/0D_bubblecollapse_adap/case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
2-
import math
32
import json
3+
import math
44

55
# FLUID PROPERTIES
66
# Water

examples/1D_bubblescreen/case.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
2-
import math
32
import json
3+
import math
44

55
# FLUID PROPERTIES
66
R_uni = 8314.0 # [J/kmol/K]
@@ -53,7 +53,6 @@
5353
u0 = math.sqrt(p0 / rho0) # [m/s]
5454
t0 = x0 / u0 # [s]
5555

56-
#
5756
cfl = 0.1
5857
Nx = 100
5958
Ldomain = 20.0e-03

examples/1D_convergence/case.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python3
2-
import math
3-
import json
42
import argparse
3+
import json
4+
import math
55

66
# Parsing command line arguments
77
parser = argparse.ArgumentParser(description="Generate JSON case configuration for two-fluid convergence simulation.")
@@ -67,10 +67,10 @@
6767
"patch_icpp(1)%length_x": 1.0,
6868
"patch_icpp(1)%vel(1)": 1.0,
6969
"patch_icpp(1)%pres": 1.0,
70-
"patch_icpp(1)%alpha_rho(1)": f"0.5 - 0.5*sin(2*pi*x)",
71-
"patch_icpp(1)%alpha(1)": f"0.5 - 0.5*sin(2*pi*x)",
72-
"patch_icpp(1)%alpha_rho(2)": f"0.5 + 0.5*sin(2*pi*x)",
73-
"patch_icpp(1)%alpha(2)": f"0.5 + 0.5*sin(2*pi*x)",
70+
"patch_icpp(1)%alpha_rho(1)": "0.5 - 0.5*sin(2*pi*x)",
71+
"patch_icpp(1)%alpha(1)": "0.5 - 0.5*sin(2*pi*x)",
72+
"patch_icpp(1)%alpha_rho(2)": "0.5 + 0.5*sin(2*pi*x)",
73+
"patch_icpp(1)%alpha(2)": "0.5 + 0.5*sin(2*pi*x)",
7474
# Fluids Physical Parameters
7575
"fluid_pp(1)%gamma": 1.0e00 / (1.4 - 1.0e00),
7676
"fluid_pp(1)%pi_inf": 0.0,

0 commit comments

Comments
 (0)