Skip to content

Add stats.jl script - #193

Merged
ufechner7 merged 6 commits into
mainfrom
new_tools
Aug 14, 2025
Merged

Add stats.jl script#193
ufechner7 merged 6 commits into
mainfrom
new_tools

Conversation

@ufechner7

Copy link
Copy Markdown
Member

Add script to list the function signatures and the non-documented, but exported symbols.

@ufechner7
ufechner7 requested a review from Copilot August 13, 2025 19:02

This comment was marked as outdated.

@ufechner7

ufechner7 commented Aug 13, 2025

Copy link
Copy Markdown
Member Author

Current output of this script:

julia> include("scripts/stats.jl")
Exported methods:

add_section!(wing::Wing, LE_point, TE_point, aero_model::AeroModel) 
add_section!(wing::Wing, LE_point, TE_point, aero_model::AeroModel, aero_data::Union{Nothing, Tuple{Float64, Float64}, NTuple{4, Vector{Float64}}, Tuple{Vector{Float64}, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, Matrix{Float64}}}) 
calculate_projected_area(wing::VortexStepMethod.AbstractWing) 
calculate_projected_area(wing::VortexStepMethod.AbstractWing, z_plane_vector) 
calculate_results(body_aero::BodyAerodynamics, gamma_new, reference_point, density, aerodynamic_model_type::Model, core_radius_fraction, mu, alpha_array, v_a_array, chord_array, x_airf_array, y_airf_array, z_airf_array, va_array, va_norm_array, va_unit_array, panels::Vector{VortexStepMethod.Panel}, is_only_f_and_gamma_output::Bool) 
calculate_span(wing::VortexStepMethod.AbstractWing) 
linearize(solver::Solver, body_aero::BodyAerodynamics, y::Vector{T}; theta_idxs, delta_idxs, va_idxs, omega_idxs, kwargs...) where T 
load_polar_data(csv_file_path::String) 
reinit!(panel::VortexStepMethod.Panel, section_1::Section, section_2::Section, aero_center, control_point, bound_point_1, bound_point_2, x_airf, y_airf, z_airf, delta, vec; init_aero, remove_nan) 
reinit!(filament::VortexStepMethod.BoundFilament, x1, x2) 
reinit!(filament::VortexStepMethod.BoundFilament, x1, x2, vec) 
reinit!(filament::VortexStepMethod.SemiInfiniteFilament, x1::Union{Vector, StaticArraysCore.MVector{3, Float64}}, direction::Union{Vector, StaticArraysCore.MVector{3, Float64}}, vel_mag::Real, filament_direction::Real) 
reinit!(refined_section::Section, section::Section) 
reinit!(section::Section, LE_point, TE_point, aero_model, aero_data) 
reinit!(section::Section, LE_point, TE_point) 
reinit!(section::Section, LE_point, TE_point, aero_model) 
reinit!(body_aero::BodyAerodynamics; init_aero, va, omega) 
reinit!(wing::VortexStepMethod.AbstractWing) 
set_va!(body_aero::BodyAerodynamics, va_distribution::Vector{Union{Vector, StaticArraysCore.MVector{3, Float64}}}) 
set_va!(body_aero::BodyAerodynamics, va::Union{Vector, StaticArraysCore.MVector{3, Float64}}) 
set_va!(body_aero::BodyAerodynamics, va_distribution::Vector{Union{Vector, StaticArraysCore.MVector{3, Float64}}}, omega) 
set_va!(body_aero::BodyAerodynamics, va::Union{Vector, StaticArraysCore.MVector{3, Float64}}, omega) 
set_va!(body_aero::BodyAerodynamics, settings::VSMSettings) 
solve(prob::SciMLBase.NonlinearProblem{<:Union{Number, var"#s3"} where var"#s3"<:AbstractArray, iip, <:Union{var"#s4", var"#s5"} where {var"#s4"<:ForwardDiff.Dual{T, V, P}, var"#s5"<:(AbstractArray{<:ForwardDiff.Dual{T, V, P}})}} where {iip, T, V, P}, alg::SimpleNonlinearSolve.AbstractSimpleNonlinearSolveAlgorithm, args...; kwargs...) 
solve(prob::SciMLBase.NonlinearProblem, alg::SimpleNonlinearSolve.AbstractSimpleNonlinearSolveAlgorithm, args...; kwargs...) 
solve(prob::SciMLBase.NonlinearProblem, args...; sensealg, u0, p, wrap, kwargs...) 
solve(prob::SciMLBase.PDEProblem, alg::SciMLBase.AbstractDEAlgorithm, args...; kwargs...) 
solve(prob::SciMLBase.IntervalNonlinearProblem{uType, iip, <:Union{var"#s2", var"#s3"} where {var"#s2"<:ForwardDiff.Dual{T, V, P}, var"#s3"<:(AbstractArray{<:ForwardDiff.Dual{T, V, P}})}} where {uType, iip}, alg::BracketingNonlinearSolve.Alefeld, args...; kwargs...) where {T, V, P} 
solve(prob::SciMLBase.IntervalNonlinearProblem{uType, iip, <:Union{var"#s2", var"#s3"} where {var"#s2"<:ForwardDiff.Dual{T, V, P}, var"#s3"<:(AbstractArray{<:ForwardDiff.Dual{T, V, P}})}} where {uType, iip}, alg::BracketingNonlinearSolve.Bisection, args...; kwargs...) where {T, V, P} 
solve(prob::SciMLBase.IntervalNonlinearProblem{uType, iip, <:Union{var"#s2", var"#s3"} where {var"#s2"<:ForwardDiff.Dual{T, V, P}, var"#s3"<:(AbstractArray{<:ForwardDiff.Dual{T, V, P}})}} where {uType, iip}, alg::BracketingNonlinearSolve.Falsi, args...; kwargs...) where {T, V, P} 
solve(prob::SciMLBase.IntervalNonlinearProblem{IP, Tuple{T, T}}, alg::DiffEqBase.InternalITP, args...; maxiters, kwargs...) where {IP, T} 
solve(prob::SciMLBase.IntervalNonlinearProblem{uType, iip, <:AbstractArray{<:ForwardDiff.Dual{T, V, P}}}, alg::DiffEqBase.InternalITP, args...; kwargs...) where {uType, iip, T, V, P} 
solve(prob::SciMLBase.IntervalNonlinearProblem{uType, iip, <:ForwardDiff.Dual{T, V, P}}, alg::DiffEqBase.InternalITP, args...; kwargs...) where {uType, iip, T, V, P} 
solve(prob::SciMLBase.IntervalNonlinearProblem{uType, iip, <:Union{var"#s2", var"#s3"} where {var"#s2"<:ForwardDiff.Dual{T, V, P}, var"#s3"<:(AbstractArray{<:ForwardDiff.Dual{T, V, P}})}} where {uType, iip}, alg::BracketingNonlinearSolve.Brent, args...; kwargs...) where {T, V, P} 
solve(prob::SciMLBase.IntervalNonlinearProblem{uType, iip, <:Union{var"#s2", var"#s3"} where {var"#s2"<:ForwardDiff.Dual{T, V, P}, var"#s3"<:(AbstractArray{<:ForwardDiff.Dual{T, V, P}})}} where {uType, iip}, alg::BracketingNonlinearSolve.Ridder, args...; kwargs...) where {T, V, P} 
solve(prob::SciMLBase.IntervalNonlinearProblem{uType, iip, <:Union{var"#s2", var"#s3"} where {var"#s2"<:ForwardDiff.Dual{T, V, P}, var"#s3"<:(AbstractArray{<:ForwardDiff.Dual{T, V, P}})}} where {uType, iip}, alg::BracketingNonlinearSolve.ITP, args...; kwargs...) where {T, V, P} 
solve(prob::SciMLBase.IntervalNonlinearProblem, alg::BracketingNonlinearSolve.AbstractBracketingAlgorithm, args...; sensealg, kwargs...) 
solve(prob::SciMLBase.IntervalNonlinearProblem; kwargs...) 
solve(prob::SciMLBase.IntervalNonlinearProblem, nothing, args...; kwargs...) 
solve(prob::SciMLBase.AbstractJumpProblem, args...; kwargs...) 
solve(prob::SciMLBase.NonlinearLeastSquaresProblem{<:Union{Number, var"#s4"} where var"#s4"<:AbstractArray, iip, <:Union{var"#s3", var"#s2"} where {var"#s3"<:ForwardDiff.Dual{T, V, P}, var"#s2"<:(AbstractArray{<:ForwardDiff.Dual{T, V, P}})}} where {iip, T, V, P}, alg::SimpleNonlinearSolve.AbstractSimpleNonlinearSolveAlgorithm, args...; kwargs...) 
solve(prob::SciMLBase.AbstractNoiseProblem, args...; kwargs...) 
solve(prob::SciMLBase.AbstractODEProblem{uType, tType, isinplace}, Alg::DiffEqBase.InternalEuler.FwdEulerAlg; dt, tstops, kwargs...) where {uType, tType, isinplace} 
solve(prob::SciMLBase.AbstractODEProblem{uType, tType, isinplace}, Alg::DiffEqBase.InternalEuler.BwdEulerAlg; dt, tstops, tol, maxiter, kwargs...) where {uType, tType, isinplace} 
solve(prob::Union{SciMLBase.ImmutableNonlinearProblem, SciMLBase.NonlinearLeastSquaresProblem}, alg::SimpleNonlinearSolve.AbstractSimpleNonlinearSolveAlgorithm, args...; sensealg, u0, p, kwargs...) 
solve(prob::SciMLBase.AbstractDEProblem, args...; sensealg, u0, p, wrap, kwargs...) 
solve(prob::SciMLBase.OptimizationProblem, alg, args...; kwargs...) 
solve(prob::SciMLBase.LinearProblem{uType, iip, <:StaticArraysCore.SMatrix, <:Union{var"#s53", var"#s52"} where {var"#s53"<:(StaticArraysCore.SMatrix), var"#s52"<:(StaticArraysCore.SVector)}} where {uType, iip}, alg::LinearSolve.SciMLLinearSolveAlgorithm, args...; kwargs...) 
solve(prob::SciMLBase.LinearProblem{uType, iip, <:StaticArraysCore.SMatrix, <:Union{var"#s53", var"#s52"} where {var"#s53"<:(StaticArraysCore.SMatrix), var"#s52"<:(StaticArraysCore.SVector)}} where {uType, iip}, alg::Nothing, args...; kwargs...) 
solve(prob::SciMLBase.LinearProblem{uType, iip, <:StaticArraysCore.SMatrix, <:Union{var"#s53", var"#s52"} where {var"#s53"<:(StaticArraysCore.SMatrix), var"#s52"<:(StaticArraysCore.SVector)}} where {uType, iip}, args...; kwargs...) 
solve(prob::SciMLBase.LinearProblem, alg::LinearSolve.SciMLLinearSolveAlgorithm, args...; kwargs...) 
solve(prob::SciMLBase.LinearProblem, ::Nothing, args...; assump, kwargs...) 
solve(prob::SciMLBase.LinearProblem, args...; kwargs...) 
solve(solver::Solver, body_aero::BodyAerodynamics; ...) 
solve(solver::Solver, body_aero::BodyAerodynamics, gamma_distribution; log, reference_point) 
solve(prob::SciMLBase.WeightedEnsembleProblem, args...; kwargs...) 
solve(prob::SciMLBase.EnsembleProblem{T}, args...; kwargs...) where T<:OptimizationProblem 
solve(prob::SciMLBase.EnsembleProblem, args...; kwargs...) 
solve(args...; kwargs...) 
solve!(cache::LineSearch.LineSearchesJLCache, u, du) 
solve!(cache::LineSearch.StaticLiFukushimaLineSearchCache, u, du) 
solve!(cache::LinearSolve.SimpleGMRESCache{false}, lincache::LinearSolve.LinearCache) 
solve!(cache::LinearSolve.SimpleGMRESCache{true}, lincache::LinearSolve.LinearCache) 
solve!(cache::LinearSolveForwardDiffExt.DualLinearCache, alg::LinearSolve.SciMLLinearSolveAlgorithm, args...; kwargs...) 
solve!(cache::LinearSolveForwardDiffExt.DualLinearCache, args...; kwargs...) 
solve!(cache::NonlinearSolveBase.NonlinearSolveForwardDiffCache) 
solve!(cache::SciMLBase.AbstractOptimizationCache) 
solve!(solver::Solver, body_aero::BodyAerodynamics; ...) 
solve!(solver::Solver, body_aero::BodyAerodynamics, gamma_distribution; log, reference_point, moment_frac) 
solve!(cache::LineSearch.RobustNonMonotoneLineSearchCache, u, du) 
solve!(integ::DiffEqBase.NullODEIntegrator) 
solve!(cache::LineSearch.LiFukushimaLineSearchCache, u, du) 
solve!(cache::NonlinearSolveBase.NonlinearSolveNoInitCache) 
solve!(cache::NonlinearSolveBase.NonlinearSolvePolyAlgorithmCache{Val{N}}) where N 
solve!(cache::NonlinearSolveBase.AbstractNonlinearSolveCache) 
solve!(cache::LineSearch.NoLineSearchCache, u, du) 
solve!(cache::LineSearch.BackTrackingCache, u, du) 
solve!(cache::LinearSolve.LinearCache, alg::LinearSolve.KLUFactorization; kwargs...) 
solve!(cache::LinearSolve.LinearCache, alg::LinearSolve.DirectLdiv!, args...; kwargs...) 
solve!(cache::LinearSolve.LinearCache, alg::LinearSolve.SimpleLUFactorization; kwargs...) 
solve!(cache::LinearSolve.LinearCache, alg::Nothing, args...; assump, kwargs...) 
solve!(cache::LinearSolve.LinearCache, alg::LinearSolve.AppleAccelerateLUFactorization; kwargs...) 
solve!(cache::LinearSolve.LinearCache, alg::LinearSolve.DiagonalFactorization; kwargs...) 
solve!(cache::LinearSolve.LinearCache, alg::LinearSolve.NormalBunchKaufmanFactorization; kwargs...) 
solve!(cache::LinearSolve.LinearCache, alg::LinearSolve.MKLLUFactorization; kwargs...) 
solve!(cache::LinearSolve.LinearCache, alg::LinearSolve.DefaultLinearSolver, args...; assump, kwargs...) 
solve!(cache::LinearSolve.LinearCache, alg::LinearSolve.UMFPACKFactorization; kwargs...) 
solve!(cache::LinearSolve.LinearCache, alg::LinearSolve.KrylovJL; kwargs...) 
solve!(cache::LinearSolve.LinearCache, alg::LinearSolve.LinearSolveFunction, args...; kwargs...) 
solve!(cache::LinearSolve.LinearCache, alg::LinearSolve.LUFactorization; kwargs...) 
solve!(cache::LinearSolve.LinearCache, alg::LinearSolve.GenericLUFactorization; kwargs...) 
solve!(cache::LinearSolve.LinearCache, alg::LinearSolve.CHOLMODFactorization; kwargs...) 
solve!(cache::LinearSolve.LinearCache, alg::LinearSolve.NormalCholeskyFactorization; kwargs...) 
solve!(cache::LinearSolve.LinearCache, alg::LinearSolve.AbstractFactorization; kwargs...) 
solve!(cache::LinearSolve.LinearCache, alg::LinearSolve.SimpleGMRES; kwargs...) 
solve!(cache::LinearSolve.LinearCache, args...; kwargs...) 
solve_base!(solver::Solver, body_aero::BodyAerodynamics; ...) 
solve_base!(solver::Solver, body_aero::BodyAerodynamics, gamma_distribution; log, reference_point) 

Total: 98

Undocumented exported symbols: 
[:SPLIT_PROVIDED, :INFEASIBLE, :FAILURE, :ELLIPTIC, :LOOP, :INVISCID, :plot_geometry, :VortexStepMethod, :POLAR_MATRICES, :LLT, :FEASIBLE, :plot_distribution, :POLAR_VECTORS, :COSINE_VAN_GARREL, :solve_base!, :ZEROS, :NONLIN, :UNCHANGED, :COSINE, :VSM, :plot_polars, :plot_circulation_distribution, :SolverSettings, :save_plot, :LINEAR, :show_plot, :WingSettings, :plot_polar_data, :VSMSettings, :LEI_AIRFOIL_BREUKELS]

Running this script in regular intervals (manually) can help to:

  • keep the function signatures consistant
  • spot methods that perhaps should not be exported
  • find the functions and constants that are exported, but not yet documented

@ufechner7
ufechner7 marked this pull request as draft August 13, 2025 19:07
@codecov

codecov Bot commented Aug 13, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@ufechner7
ufechner7 requested a review from Copilot August 13, 2025 19:17

This comment was marked as outdated.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@1-Bart-1

Copy link
Copy Markdown
Member

the non-documented, but exported symbols

Building the documentation will already fail if this happens

ufechner7 and others added 2 commits August 13, 2025 21:19
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@ufechner7
ufechner7 requested a review from Copilot August 13, 2025 19:20

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

This PR adds a new utility script stats.jl to analyze the VortexStepMethod module by listing exported function signatures and identifying undocumented exported symbols. This appears to be a development tool for tracking API documentation coverage.

Key changes:

  • Creates a script to enumerate all exported function methods and their signatures
  • Implements documentation status checking for exported symbols
  • Provides summary statistics on total methods and undocumented symbols

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ufechner7

ufechner7 commented Aug 13, 2025

Copy link
Copy Markdown
Member Author

Building the documentation will already fail if this happens

No, it doesn't. Otherwise there would not be so many undocumented, exported symbols. Building the documentation only fails if you have a reference (@ref) to an undocumented symbol.

@ufechner7
ufechner7 marked this pull request as ready for review August 13, 2025 19:30
Comment thread scripts/stats.jl Outdated
@ufechner7
ufechner7 requested a review from 1-Bart-1 August 13, 2025 20:25
@ufechner7
ufechner7 merged commit c9f5594 into main Aug 14, 2025
8 checks passed
@ufechner7
ufechner7 deleted the new_tools branch August 14, 2025 07:09
1-Bart-1 pushed a commit that referenced this pull request Jul 1, 2026
* Add stats.jl script

* Refactoring

* Update scripts/stats.jl

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update scripts/stats.jl

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update scripts/stats.jl

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Change license to MIT

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants