Skip to content

Commit ae08c81

Browse files
ocotsgithub-actions[bot]
authored andcommitted
🤖 Format .jl files
1 parent 80ac58b commit ae08c81

17 files changed

+258
-215
lines changed

benchmarks/core-midpoint-trapeze.jl

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Modeler: :exa
22

33
function run()
4-
results = CTBenchmarks.benchmark(
4+
results = CTBenchmarks.benchmark(;
55
problems=[
66
:beam,
77
:chain,
@@ -20,19 +20,14 @@ function run()
2020
],
2121

2222
# solver × modeler
23-
solver_models = [
24-
:madnlp => [:exa],
25-
:ipopt => [:exa],
26-
],
27-
28-
disc_methods = [:trapeze, :midpoint],
29-
30-
grid_sizes = [200],
31-
tol = 1e-8,
32-
ipopt_mu_strategy = "adaptive",
33-
print_trace = false,
34-
max_iter = 2000,
35-
max_wall_time = 600.0,
23+
solver_models=[:madnlp => [:exa], :ipopt => [:exa]],
24+
disc_methods=[:trapeze, :midpoint],
25+
grid_sizes=[200],
26+
tol=1e-8,
27+
ipopt_mu_strategy="adaptive",
28+
print_trace=false,
29+
max_iter=2000,
30+
max_wall_time=600.0,
3631
)
3732
println("✅ Benchmark midpoint vs trapeze completed successfully!")
3833
return results

benchmarks/core-moonshot-gpu.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ function run()
1010
# :ducted_fan,
1111
:electric_vehicle,
1212
:glider,
13-
## :insurance, # to be re-added (unstable / sincos issue)
13+
## :insurance, # to be re-added (unstable / sincos issue)
1414
:jackson,
1515
:robbins,
16-
## :robot, # to be re-added (unstable / sincos issue)
16+
## :robot, # to be re-added (unstable / sincos issue)
1717
:rocket,
18-
## :space_shuttle, # to be re-added (unstable / sincos issue)
19-
## :steering, # to be re-added (unstable / sincos issue)
18+
## :space_shuttle, # to be re-added (unstable / sincos issue)
19+
## :steering, # to be re-added (unstable / sincos issue)
2020
:vanderpol,
2121
],
2222
solver_models=[:madnlp => [:exa, :exa_gpu]],

docs/make.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ with_processed_template_problems(
120120
"Developers Guidelines" => [
121121
"Add a New Benchmark" => "add_benchmark.md",
122122
"Add a Custom Profile" => "add_performance_profile.md",
123-
"DocUtils Template System" => joinpath("developers", "docutils_templates.md"),
123+
"DocUtils Template System" =>
124+
joinpath("developers", "docutils_templates.md"),
124125
"Documentation Process" => "documentation_process.md",
125126
],
126127
],

docs/src/assets/benchmarks/core-midpoint-trapeze/core-midpoint-trapeze.jl

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Modeler: :exa
22

33
function run()
4-
results = CTBenchmarks.benchmark(
4+
results = CTBenchmarks.benchmark(;
55
problems=[
66
:beam,
77
:chain,
@@ -20,19 +20,14 @@ function run()
2020
],
2121

2222
# solver × modeler
23-
solver_models = [
24-
:madnlp => [:exa],
25-
:ipopt => [:exa],
26-
],
27-
28-
disc_methods = [:trapeze, :midpoint],
29-
30-
grid_sizes = [200],
31-
tol = 1e-8,
32-
ipopt_mu_strategy = "adaptive",
33-
print_trace = false,
34-
max_iter = 2000,
35-
max_wall_time = 600.0,
23+
solver_models=[:madnlp => [:exa], :ipopt => [:exa]],
24+
disc_methods=[:trapeze, :midpoint],
25+
grid_sizes=[200],
26+
tol=1e-8,
27+
ipopt_mu_strategy="adaptive",
28+
print_trace=false,
29+
max_iter=2000,
30+
max_wall_time=600.0,
3631
)
3732
println("✅ Benchmark midpoint vs trapeze completed successfully!")
3833
return results

docs/src/assets/benchmarks/core-moonshot-gpu/core-moonshot-gpu.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ function run()
1010
# :ducted_fan,
1111
:electric_vehicle,
1212
:glider,
13-
## :insurance, # to be re-added (unstable / sincos issue)
13+
## :insurance, # to be re-added (unstable / sincos issue)
1414
:jackson,
1515
:robbins,
16-
## :robot, # to be re-added (unstable / sincos issue)
16+
## :robot, # to be re-added (unstable / sincos issue)
1717
:rocket,
18-
## :space_shuttle, # to be re-added (unstable / sincos issue)
19-
## :steering, # to be re-added (unstable / sincos issue)
18+
## :space_shuttle, # to be re-added (unstable / sincos issue)
19+
## :steering, # to be re-added (unstable / sincos issue)
2020
:vanderpol,
2121
],
2222
solver_models=[:madnlp => [:exa, :exa_gpu]],

docs/src/docutils/CTBenchmarksDocUtils.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ using .DocumenterReference
129129
# Wrapper Functions (no src_dir parameter needed in templates)
130130
# ═══════════════════════════════════════════════════════════════════════════════
131131

132-
133132
# ═══════════════════════════════════════════════════════════════════════════════
134133
# Exports
135134
# ═══════════════════════════════════════════════════════════════════════════════

docs/src/docutils/Core/FigureEngine.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,7 @@ plt = call_figure_function("_plot_profile_default_cpu", ["core-ubuntu-latest"])
5050
```
5151
"""
5252
function call_figure_function(
53-
function_name::AbstractString,
54-
args::Vector{<:AbstractString},
55-
extra_args::Tuple=()
53+
function_name::AbstractString, args::Vector{<:AbstractString}, extra_args::Tuple=()
5654
)
5755
if !haskey(FIGURE_FUNCTIONS, function_name)
5856
available = join(sort(collect(keys(FIGURE_FUNCTIONS))), ", ")

docs/src/docutils/Core/ProfileEngine.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function plot_profile_from_registry(
3333
name::String,
3434
bench_id::AbstractString,
3535
src_dir::AbstractString;
36-
combos::Union{Nothing,Vector{<:Tuple}}=nothing
36+
combos::Union{Nothing,Vector{<:Tuple}}=nothing,
3737
)
3838
config = CTBenchmarks.get_config(PROFILE_REGISTRY, name)
3939
json_path = joinpath(src_dir, "assets", "benchmarks", bench_id, bench_id * ".json")
@@ -67,7 +67,7 @@ function analyze_profile_from_registry(
6767
name::String,
6868
bench_id::AbstractString,
6969
src_dir::AbstractString;
70-
combos::Union{Nothing,Vector{<:Tuple}}=nothing
70+
combos::Union{Nothing,Vector{<:Tuple}}=nothing,
7171
)
7272
config = CTBenchmarks.get_config(PROFILE_REGISTRY, name)
7373
json_path = joinpath(src_dir, "assets", "benchmarks", bench_id, bench_id * ".json")

docs/src/docutils/Core/TemplateEngine.jl

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -404,8 +404,17 @@ function replace_profile_plot_blocks(
404404
plt = plot_profile_from_registry(profile_name, bench_id, SRC_DIR; combos=combos)
405405

406406
# Generate unique basename for the figure
407-
args_str = bench_id * (isnothing(combos) ? "" : "_" * join(["$(m)_$(s)" for (m, s) in combos], "_"))
408-
basename = generate_figure_basename(template_filename, "profile_plot_$(profile_name)", args_str)
407+
args_str =
408+
bench_id * (
409+
if isnothing(combos)
410+
""
411+
else
412+
"_" * join(["$(m)_$(s)" for (m, s) in combos], "_")
413+
end
414+
)
415+
basename = generate_figure_basename(
416+
template_filename, "profile_plot_$(profile_name)", args_str
417+
)
409418

410419
# Create output directory if it doesn't exist
411420
mkpath(figures_output_dir)
@@ -442,7 +451,9 @@ function replace_profile_plot_blocks(
442451

443452
catch e
444453
if DOC_DEBUG[]
445-
@error " ✗ Failed to generate profile plot" exception = (e, catch_backtrace())
454+
@error " ✗ Failed to generate profile plot" exception = (
455+
e, catch_backtrace()
456+
)
446457
else
447458
@error " ✗ Failed to generate profile plot: $(e)"
448459
end
@@ -528,13 +539,17 @@ function replace_profile_analysis_blocks(content::String)
528539
end
529540

530541
try
531-
text_md = analyze_profile_from_registry(profile_name, bench_id, SRC_DIR; combos=combos)
542+
text_md = analyze_profile_from_registry(
543+
profile_name, bench_id, SRC_DIR; combos=combos
544+
)
532545
DOC_DEBUG[] &&
533546
@info " ✓ Replaced PROFILE_ANALYSIS block #$block_count: $profile_name for $bench_id"
534547
return text_md
535548
catch e
536549
if DOC_DEBUG[]
537-
@error " ✗ Failed to generate profile analysis" exception = (e, catch_backtrace())
550+
@error " ✗ Failed to generate profile analysis" exception = (
551+
e, catch_backtrace()
552+
)
538553
else
539554
@error " ✗ Failed to generate profile analysis: $(e)"
540555
end

docs/src/docutils/Core/TextEngine.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ string that will be inlined directly into the generated documentation.
1111

1212
const TEXT_FUNCTIONS = Dict{String,Function}()
1313

14-
1514
"""
1615
register_text_handler!(name::String, func::Function)
1716
@@ -43,9 +42,7 @@ Arguments are passed as: `func(extra_args..., args...)` so that injected
4342
dependencies (like `src_dir`) come first, following the Dependency Inversion Principle.
4443
"""
4544
function call_text_function(
46-
function_name::AbstractString,
47-
args::Vector{<:AbstractString},
48-
extra_args::Tuple=()
45+
function_name::AbstractString, args::Vector{<:AbstractString}, extra_args::Tuple=()
4946
)
5047
if !haskey(TEXT_FUNCTIONS, function_name)
5148
available = join(sort(collect(keys(TEXT_FUNCTIONS))), ", ")

0 commit comments

Comments
 (0)