Skip to content

Commit f6ced18

Browse files
committed
Merge branch 'formatting' of github.com:SciML/Catalyst.jl into formatting
2 parents 6563e76 + 617a567 commit f6ced18

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

src/network_analysis.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ end
398398
# Used in the subsequent function.
399399
function subnetworkmapping(linkageclass, allrxs, complextorxsmap, p)
400400
rxinds = sort!(collect(Set(rxidx for rcidx in linkageclass
401-
for rxidx in complextorxsmap[rcidx])))
401+
for rxidx in complextorxsmap[rcidx])))
402402
rxs = allrxs[rxinds]
403403
specset = Set(s for rx in rxs for s in rx.substrates if !isconstant(s))
404404
for rx in rxs

src/reaction.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,8 @@ function MT.namespace_equation(rx::Reaction, name; kw...)
334334
ns = similar(rx.netstoich)
335335
map!(n -> f(n[1]) => f(n[2]), ns, rx.netstoich)
336336
end
337-
Reaction(
338-
rate, subs, prods, substoich, prodstoich, netstoich, rx.only_use_rate, rx.metadata)
337+
Reaction(rate, subs, prods, substoich, prodstoich, netstoich,
338+
rx.only_use_rate, rx.metadata)
339339
end
340340

341341
# Overwrites equation-type functions to give the correct input for `Reaction`s.
@@ -497,7 +497,7 @@ function getmetadata(reaction::Reaction, md_key::Symbol)
497497
end
498498
metadata = getmetadata_dict(reaction)
499499
return metadata[findfirst(isequal(md_key, entry[1])
500-
for entry in getmetadata_dict(reaction))][2]
500+
for entry in getmetadata_dict(reaction))][2]
501501
end
502502

503503
### Implemented Reaction Metadata ###

src/reactionsystem.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,9 +1251,8 @@ function set_default_metadata(rs::ReactionSystem; default_reaction_metadata = []
12511251
ns_syms = [Symbolics.unwrap(sym) for sym in get_variables(ns_expr)]
12521252
ns_ps = Iterators.filter(ModelingToolkit.isparameter, ns_syms)
12531253
ns_sps = Iterators.filter(Catalyst.isspecies, ns_syms)
1254-
ns_vs = Iterators.filter(
1255-
sym -> !Catalyst.isspecies(sym) &&
1256-
!ModelingToolkit.isparameter(sym), ns_syms)
1254+
ns_vs = Iterators.filter(sym -> !Catalyst.isspecies(sym) &&
1255+
!ModelingToolkit.isparameter(sym), ns_syms)
12571256
# Adds parameters, species, and variables to the `ReactionSystem`.
12581257
@set! rs.ps = union(get_ps(rs), ns_ps)
12591258
sps_new = union(get_species(rs), ns_sps)

src/reactionsystem_conversions.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -472,8 +472,8 @@ Keyword args and default values:
472472
function Base.convert(::Type{<:ODESystem}, rs::ReactionSystem; name = nameof(rs),
473473
combinatoric_ratelaws = get_combinatoric_ratelaws(rs),
474474
include_zero_odes = true, remove_conserved = false, checks = false,
475-
default_u0 = Dict(), default_p = Dict(), defaults = _merge(
476-
Dict(default_u0), Dict(default_p)),
475+
default_u0 = Dict(), default_p = Dict(),
476+
defaults = _merge(Dict(default_u0), Dict(default_p)),
477477
kwargs...)
478478
iscomplete(rs) || error(COMPLETENESS_ERROR)
479479
spatial_convert_err(rs::ReactionSystem, ODESystem)
@@ -514,8 +514,8 @@ Keyword args and default values:
514514
function Base.convert(::Type{<:NonlinearSystem}, rs::ReactionSystem; name = nameof(rs),
515515
combinatoric_ratelaws = get_combinatoric_ratelaws(rs),
516516
include_zero_odes = true, remove_conserved = false, checks = false,
517-
default_u0 = Dict(), default_p = Dict(), defaults = _merge(
518-
Dict(default_u0), Dict(default_p)),
517+
default_u0 = Dict(), default_p = Dict(),
518+
defaults = _merge(Dict(default_u0), Dict(default_p)),
519519
all_differentials_permitted = false, kwargs...)
520520
# Error checks.
521521
iscomplete(rs) || error(COMPLETENESS_ERROR)
@@ -596,8 +596,8 @@ Notes:
596596
function Base.convert(::Type{<:SDESystem}, rs::ReactionSystem;
597597
name = nameof(rs), combinatoric_ratelaws = get_combinatoric_ratelaws(rs),
598598
include_zero_odes = true, checks = false, remove_conserved = false,
599-
default_u0 = Dict(), default_p = Dict(), defaults = _merge(
600-
Dict(default_u0), Dict(default_p)),
599+
default_u0 = Dict(), default_p = Dict(),
600+
defaults = _merge(Dict(default_u0), Dict(default_p)),
601601
kwargs...)
602602
iscomplete(rs) || error(COMPLETENESS_ERROR)
603603
spatial_convert_err(rs::ReactionSystem, SDESystem)
@@ -647,8 +647,8 @@ Notes:
647647
function Base.convert(::Type{<:JumpSystem}, rs::ReactionSystem; name = nameof(rs),
648648
combinatoric_ratelaws = get_combinatoric_ratelaws(rs),
649649
remove_conserved = nothing, checks = false,
650-
default_u0 = Dict(), default_p = Dict(), defaults = _merge(
651-
Dict(default_u0), Dict(default_p)),
650+
default_u0 = Dict(), default_p = Dict(),
651+
defaults = _merge(Dict(default_u0), Dict(default_p)),
652652
kwargs...)
653653
iscomplete(rs) || error(COMPLETENESS_ERROR)
654654
spatial_convert_err(rs::ReactionSystem, JumpSystem)

0 commit comments

Comments
 (0)