Skip to content

Commit 6976e9e

Browse files
Merge pull request #313 from ChrisRackauckas-Claude/runic-formatting
Switch from JuliaFormatter to Runic.jl for code formatting
2 parents 2558cb1 + 7295e7d commit 6976e9e

5 files changed

Lines changed: 245 additions & 160 deletions

File tree

.JuliaFormatter.toml

Lines changed: 0 additions & 2 deletions
This file was deleted.

.github/workflows/FormatCheck.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: format-check
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
- 'main'
8+
- 'release-'
9+
tags: '*'
10+
pull_request:
11+
12+
jobs:
13+
runic:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: fredrikekre/runic-action@v1
18+
with:
19+
version: '1'

docs/CommercialSupportComponent.jl

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
struct JuliaHubCommercialSupportComponent <: MultiDocumenter.DropdownComponent
1+
struct JuliaHubCommercialSupportComponent <: MultiDocumenter.DropdownComponent
22
link::String
33
end
44

@@ -13,7 +13,7 @@ function MultiDocumenter.render(c::JuliaHubCommercialSupportComponent, doc, this
1313
<a href="$(c.link)" class="nav-link nav-item">JuliaHub offers commercial support for ModelingToolkit and the SciML ecosystem. Contact us today to discuss your needs!</a>
1414
</div>
1515
"""
16-
16+
1717
end
1818

1919
struct ProductsUsedComponent <: MultiDocumenter.DropdownComponent end
@@ -27,13 +27,15 @@ PRODUCTNAME_IMAGE_LINK = [
2727
]
2828

2929
function MultiDocumenter.render(c::ProductsUsedComponent, doc, thispage, prettyurls)
30-
strings = [MultiDocumenter.@htl """
31-
<li>
32-
<a href=$(product.link) class="nav-link nav-item">
33-
$(product.product)
34-
</a>
35-
</li>
36-
""" for product in PRODUCTNAME_IMAGE_LINK]
30+
strings = [
31+
MultiDocumenter.@htl """
32+
<li>
33+
<a href=$(product.link) class="nav-link nav-item">
34+
$(product.product)
35+
</a>
36+
</li>
37+
""" for product in PRODUCTNAME_IMAGE_LINK
38+
]
3739

3840
return MultiDocumenter.@htl """
3941
<table>
@@ -52,4 +54,4 @@ function MultiDocumenter.render(c::Link, doc, thispage, prettyurls)
5254
return MultiDocumenter.@htl """
5355
<a href=$(c.link) class="nav-link nav-item">$(c.text)</a>
5456
"""
55-
end
57+
end

docs/make.jl

Lines changed: 68 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,29 @@ cp("./docs/Project.toml", "./docs/src/assets/Project.toml", force = true)
77
ENV["GKSwstype"] = "100"
88
using Plots
99

10-
mathengine = MathJax3(Dict(:loader => Dict("load" => ["[tex]/require", "[tex]/mathtools"]),
11-
:tex => Dict("inlineMath" => [["\$", "\$"], ["\\(", "\\)"]],
12-
"packages" => [
13-
"base",
14-
"ams",
15-
"autoload",
16-
"mathtools",
17-
"require"
18-
])))
10+
mathengine = MathJax3(
11+
Dict(
12+
:loader => Dict("load" => ["[tex]/require", "[tex]/mathtools"]),
13+
:tex => Dict(
14+
"inlineMath" => [["\$", "\$"], ["\\(", "\\)"]],
15+
"packages" => [
16+
"base",
17+
"ams",
18+
"autoload",
19+
"mathtools",
20+
"require",
21+
]
22+
)
23+
)
24+
)
1925

20-
makedocs(sitename = "Overview of Julia's SciML",
26+
makedocs(
27+
sitename = "Overview of Julia's SciML",
2128
authors = "Chris Rackauckas",
2229
modules = Module[],
2330
clean = true, doctest = false, linkcheck = true,
24-
linkcheck_ignore = ["https://twitter.com/ChrisRackauckas/status/1477274812460449793",
31+
linkcheck_ignore = [
32+
"https://twitter.com/ChrisRackauckas/status/1477274812460449793",
2533
"https://epubs.siam.org/doi/10.1137/0903023",
2634
"https://bkamins.github.io/julialang/2020/12/24/minilanguage.html",
2735
"https://arxiv.org/abs/2109.06786",
@@ -31,11 +39,13 @@ makedocs(sitename = "Overview of Julia's SciML",
3139
"https://github.com/JuliaDiff/ForwardDiff.jl/blob/master/docs/src/dev/how_it_works.md",
3240
"https://github.com/SciML/Optimization.jl/blob/master/lib/OptimizationPolyalgorithms/src/OptimizationPolyalgorithms.jl",
3341
"http://www.scholarpedia.org/article/Differential-algebraic_equations",
34-
"https://computing.llnl.gov/projects/sundials"
35-
],
36-
format = Documenter.HTML(assets = ["assets/favicon.ico"],
42+
"https://computing.llnl.gov/projects/sundials",
43+
],
44+
format = Documenter.HTML(
45+
assets = ["assets/favicon.ico"],
3746
canonical = "https://docs.sciml.ai/stable/",
38-
mathengine = mathengine),
47+
mathengine = mathengine
48+
),
3949
pages = [
4050
"SciML: Open Source Software for Scientific Machine Learning with Julia" => "index.md",
4151
"Getting Started" => [
@@ -45,46 +55,66 @@ makedocs(sitename = "Overview of Julia's SciML",
4555
"getting_started/first_simulation.md",
4656
"getting_started/first_optimization.md",
4757
"getting_started/fit_simulation.md",
48-
"getting_started/find_root.md"
58+
"getting_started/find_root.md",
4959
],
5060
"Comparison With Other Tools" => [
5161
"comparisons/python.md",
5262
"comparisons/matlab.md",
5363
"comparisons/r.md",
54-
"comparisons/cppfortran.md"
55-
]
64+
"comparisons/cppfortran.md",
65+
],
5666
],
57-
"Showcase of Cool Examples" => Any["showcase/showcase.md",
58-
"Automated Model Discovery" => Any["showcase/missing_physics.md",
67+
"Showcase of Cool Examples" => Any[
68+
"showcase/showcase.md",
69+
"Automated Model Discovery" => Any[
70+
"showcase/missing_physics.md",
5971
"showcase/bayesian_neural_ode.md",
6072
"showcase/optimal_data_gathering_for_missing_physics.md",
61-
"showcase/blackhole.md"],
62-
"Solving Difficult Equations Efficiently" => Any["showcase/brusselator.md",
73+
"showcase/blackhole.md",
74+
],
75+
"Solving Difficult Equations Efficiently" => Any[
76+
"showcase/brusselator.md",
6377
"showcase/pinngpu.md",
6478
"showcase/massively_parallel_gpu.md",
65-
"showcase/gpu_spde.md"],
66-
"Useful Cool Wonky Things" => Any["showcase/ode_types.md",
79+
"showcase/gpu_spde.md",
80+
],
81+
"Useful Cool Wonky Things" => Any[
82+
"showcase/ode_types.md",
6783
"showcase/symbolic_analysis.md",
68-
"showcase/optimization_under_uncertainty.md"]],
69-
"What is SciML?" => ["overview.md",
70-
"Solvers" => ["highlevels/equation_solvers.md",
84+
"showcase/optimization_under_uncertainty.md",
85+
],
86+
],
87+
"What is SciML?" => [
88+
"overview.md",
89+
"Solvers" => [
90+
"highlevels/equation_solvers.md",
7191
"highlevels/inverse_problems.md",
72-
"highlevels/partial_differential_equation_solvers.md"],
73-
"Modeling Tools" => ["highlevels/modeling_languages.md",
92+
"highlevels/partial_differential_equation_solvers.md",
93+
],
94+
"Modeling Tools" => [
95+
"highlevels/modeling_languages.md",
7496
"highlevels/model_libraries_and_importers.md",
7597
"highlevels/symbolic_tools.md",
76-
"highlevels/array_libraries.md"],
77-
"Simulation Analysis" => ["highlevels/parameter_analysis.md",
98+
"highlevels/array_libraries.md",
99+
],
100+
"Simulation Analysis" => [
101+
"highlevels/parameter_analysis.md",
78102
"highlevels/uncertainty_quantification.md",
79-
"highlevels/plots_visualization.md"],
80-
"Machine Learning" => ["highlevels/function_approximation.md",
103+
"highlevels/plots_visualization.md",
104+
],
105+
"Machine Learning" => [
106+
"highlevels/function_approximation.md",
81107
"highlevels/implicit_layers.md",
82-
"highlevels/symbolic_learning.md"],
83-
"Developer Tools" => ["highlevels/numerical_utilities.md",
108+
"highlevels/symbolic_learning.md",
109+
],
110+
"Developer Tools" => [
111+
"highlevels/numerical_utilities.md",
84112
"highlevels/interfaces.md",
85-
"highlevels/developer_documentation.md"],
86-
"Extra Learning Resources" => ["highlevels/learning_resources.md"]
87-
]],
113+
"highlevels/developer_documentation.md",
114+
],
115+
"Extra Learning Resources" => ["highlevels/learning_resources.md"],
116+
],
117+
],
88118
)
89119

90120
deploydocs(repo = "github.com/SciML/SciMLDocs")

0 commit comments

Comments
 (0)