Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
This PR aims to eliminate JETLS warnings across the codebase by tightening types, refactoring a few hot-path functions, and adjusting test setup to be more explicit/robust.
Changes:
- Refactors core geometry/solver code to reduce lints (type annotations, no-op removals, updated iteration patterns).
- Tightens aero-data validation and interpolation handling for POLAR_* models.
- Updates tests and test environment configuration (test Project sources, includes, test selection).
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
test/test_data_utils.jl |
Makes test_data_path more robust by stringifying path components. |
test/solver/test_solver.jl |
Includes shared test utilities directly for solver tests. |
test/runtests.jl |
Refactors test selection logic and simplifies special-arg handling. |
test/Project.toml |
Adds VortexStepMethod as a test dep and pins to local path via [sources]. |
test/plotting/test_plotting.jl |
Adjusts global initialization patterns to avoid definition warnings. |
test/body_aerodynamics/test_body_aerodynamics.jl |
Ensures test utilities are available when running file standalone. |
test/bench.jl |
Updates benchmark callsites to match new calculate_results signature. |
src/yaml_geometry.jl |
Switches CSV parsing loop to eachindex with header-skip. |
src/wing_geometry.jl |
Refactors section reinit, makes Wing parametric, and tightens NaN cleanup helpers. |
src/VortexStepMethod.jl |
Cleans imports/exports, adds PACKAGE_ROOT, and adjusts example-path logic. |
src/solver.jl |
Refactors NONLIN cache init and removes unused args from results computation call chain. |
src/settings.jl |
Adds a concrete type annotation for remove_nan. |
src/polars.jl |
Removes unused assignments and improves file IO / header parsing robustness. |
src/panel.jl |
Adds stricter aero_data validation and safer interpolation usage in coefficient evaluation. |
src/obj_geometry.jl |
Minor cleanup: argument naming, string construction, and matrix/vector conversions. |
src/body_aerodynamics.jl |
Makes BodyAerodynamics parametric over wing type; refactors set_va! and stall-angle helpers. |
bin/jetls |
Adds a helper script to run jetls checks. |
.JETLSConfig.toml |
Adds diagnostic suppression patterns to reduce noise. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 25 out of 26 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
src/body_aerodynamics.jl:1094
set_va!(body_aero, va_distribution::AbstractMatrix)updates per-panel velocities but does not updatebody_aero.omega, so a previously nonzeroomegacan remain stale. Also_vais currently set to the simple mean of the distribution, which is inconsistent with_compute_reference_velocity_from_distribution(RMS/mean-direction) used elsewhere (e.g., omega!=0 path and wake). Consider resettingomegato zeros here and computing_vavia_compute_reference_velocity_from_distribution(va_distribution, n_panels, panel_areas)for consistency.
function set_va!(body_aero::BodyAerodynamics, va_distribution::AbstractMatrix)
size(va_distribution, 1) != length(body_aero.panels) &&
throw(ArgumentError("Number of rows in va distribution should be equal to number of panels."))
for (i, panel) in enumerate(body_aero.panels)
panel.va .= va_distribution[i, :]
end
# Update wake elements
frozen_wake!(body_aero, va_distribution)
body_aero._va .= [mean(va_distribution[:,i]) for i in 1:3]
body_aero.has_distributed_va = true
return nothing
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1-Bart-1
left a comment
There was a problem hiding this comment.
Thanks for fixing the duplicate code
reference_pointfromsolve_base!test/test_setup.shto instantiate the environment