Skip to content

Commit 72f50b0

Browse files
Formatting
1 parent f918d83 commit 72f50b0

File tree

5 files changed

+25
-32
lines changed

5 files changed

+25
-32
lines changed

docs/make.jl

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,14 @@ cp("./docs/Project.toml", "./docs/src/assets/Project.toml", force = true)
55

66
include("pages.jl")
77

8-
makedocs(
9-
sitename="SymbolicIndexingInterface.jl",
10-
authors="Chris Rackauckas",
11-
modules=[SymbolicIndexingInterface],
12-
clean=true,doctest=false,
13-
format = Documenter.HTML(analytics = "UA-90474609-3",
14-
assets = ["assets/favicon.ico"],
15-
canonical="https://docs.sciml.ai/SymbolicIndexingInterface/stable/"),
16-
pages=pages
17-
)
8+
makedocs(sitename = "SymbolicIndexingInterface.jl",
9+
authors = "Chris Rackauckas",
10+
modules = [SymbolicIndexingInterface],
11+
clean = true, doctest = false,
12+
format = Documenter.HTML(analytics = "UA-90474609-3",
13+
assets = ["assets/favicon.ico"],
14+
canonical = "https://docs.sciml.ai/SymbolicIndexingInterface/stable/"),
15+
pages = pages)
1816

19-
deploydocs(
20-
repo = "github.com/SciML/SymbolicIndexingInterface.jl.git";
21-
push_preview = true
22-
)
17+
deploydocs(repo = "github.com/SciML/SymbolicIndexingInterface.jl.git";
18+
push_preview = true)

docs/pages.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Put in a separate page so it can be used by SciMLDocs.jl
22

3-
pages=[
3+
pages = [
44
"Home" => "index.md",
55
"API" => "api.md",
6-
]
6+
]

src/interface.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ $(TYPEDSIGNATURES)
5555
Check if the given sym is a parameter variable in the given system. Defaults
5656
to `false` if not implemented for the given system/container type.
5757
"""
58-
function is_param_sym end
58+
function is_param_sym end

src/symbolcache.jl

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
1-
struct SymbolCache{S,T,U}
1+
struct SymbolCache{S, T, U}
22
syms::S
33
indepsym::T
44
paramsyms::U
55
end
66

7-
87
independent_variables(sc::SymbolCache) = sc.indepsym
9-
independent_variables(::SymbolCache{S,Nothing}) where {S} = []
8+
independent_variables(::SymbolCache{S, Nothing}) where {S} = []
109
is_indep_sum(::Any, _) = false
1110
is_indep_sym(sc::SymbolCache, sym) = any(isequal(sym), sc.indepsym)
12-
is_indep_sym(::SymbolCache{S,Nothing}, _) where {S} = false
11+
is_indep_sym(::SymbolCache{S, Nothing}, _) where {S} = false
1312
states(sc::SymbolCache) = sc.syms
1413
states(::SymbolCache{Nothing}) = []
1514
state_sym_to_index(sc::SymbolCache, sym) = findfirst(isequal(sym), sc.syms)
1615
state_sym_to_index(::SymbolCache{Nothing}, _) = nothing
1716
is_state_sym(::Any, _) = false
1817
is_state_sym(sc::SymbolCache, sym) = !isnothing(state_sym_to_index(sc, sym))
1918
parameters(sc::SymbolCache) = sc.paramsyms
20-
parameters(::SymbolCache{S,T,Nothing}) where {S,T} = []
19+
parameters(::SymbolCache{S, T, Nothing}) where {S, T} = []
2120
param_sym_to_index(sc::SymbolCache, sym) = findfirst(isequal(sym), sc.paramsyms)
22-
param_sym_to_index(::SymbolCache{S,T,Nothing}, _) where {S,T} = nothing
21+
param_sym_to_index(::SymbolCache{S, T, Nothing}, _) where {S, T} = nothing
2322
is_param_sym(::Any, _) = false
2423
is_param_sym(sc::SymbolCache, sym) = !isnothing(param_sym_to_index(sc, sym))
25-
26-
Base.copy(VA::SymbolCache) = typeof(VA)(
27-
(VA.syms===nothing) ? nothing : copy(VA.syms),
28-
(VA.indepsym===nothing) ? nothing : copy(VA.indepsym),
29-
(VA.paramsyms===nothing) ? nothing : copy(VA.paramsyms),
30-
)
24+
25+
function Base.copy(VA::SymbolCache)
26+
typeof(VA)((VA.syms === nothing) ? nothing : copy(VA.syms),
27+
(VA.indepsym === nothing) ? nothing : copy(VA.indepsym),
28+
(VA.paramsyms === nothing) ? nothing : copy(VA.paramsyms))
29+
end

test/runtests.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
using SymbolicIndexingInterface
22
using Test
33

4-
@time begin
5-
@time @testset begin include("symbolcache.jl") end
6-
end
4+
@time begin @time @testset begin include("symbolcache.jl") end end

0 commit comments

Comments
 (0)