Skip to content

Commit

Permalink
tests shoudl start passing
Browse files Browse the repository at this point in the history
  • Loading branch information
TorkelE committed Mar 19, 2024
1 parent 48d1e91 commit a8ed387
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/reaction_network.jl
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ function make_reaction_system(ex::Expr; name = :(gensym(:ReactionSystem)))
# Reads options.
default_reaction_metadata = :([])
compound_expr, compound_species = read_compound_options(options)
iscomplete = !haskey(options, :incomplete)

# Parses reactions, species, and parameters.
reactions = get_reactions(reaction_lines; default_reaction_metadata)
Expand Down
10 changes: 4 additions & 6 deletions src/reactionsystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ struct ReactionSystem{V <: NetworkProperties} <:
function ReactionSystem(eqs, rxs, iv, sivs, unknowns, spcs, ps, var_to_name, observed,
name, systems, defaults, connection_type, nps, cls, cevs, devs,
metadata = nothing, complete::Bool = false; checks::Bool = true)
println("Complete 1: ", complete)
# unit checks are for ODEs and Reactions only currently
nonrx_eqs = Equation[eq for eq in eqs if eq isa Equation]
if checks && isempty(sivs)
Expand Down Expand Up @@ -610,8 +610,9 @@ function ReactionSystem(eqs, iv, unknowns, ps;
spatial_ivs = nothing,
continuous_events = nothing,
discrete_events = nothing,
metadata = nothing,
complete = true)
println("Complete 2: ", complete)
name === nothing &&
throw(ArgumentError("The `name` keyword must be provided. Please consider using the `@named` macro"))
sysnames = nameof.(systems)
Expand Down Expand Up @@ -680,11 +681,10 @@ function ReactionSystem(eqs, iv, unknowns, ps;

ReactionSystem(eqs′, rxs, iv′, sivs′, unknowns′, spcs, ps′, var_to_name, observed, name,
systems, defaults, connection_type, nps, combinatoric_ratelaws,
ccallbacks, dcallbacks, complete; checks = checks)
ccallbacks, dcallbacks, metadata, complete; checks = checks)
end

function ReactionSystem(rxs::Vector, iv = Catalyst.DEFAULT_IV; kwargs...)
println("Complete 3: ", complete)
make_ReactionSystem_internal(rxs, iv, Vector{Num}(), Vector{Num}(); kwargs...)
end

Expand Down Expand Up @@ -751,13 +751,11 @@ function make_ReactionSystem_internal(rxs_and_eqs::Vector, iv, sts_in, ps_in;
else
fulleqs = rxs
end
println("Complete 4: ", kwargs...)

ReactionSystem(fulleqs, t, stsv, psv; spatial_ivs, kwargs...)
end

function ReactionSystem(iv; kwargs...)
println("Complete 5: ", complete)
ReactionSystem(Reaction[], iv, [], []; kwargs...)
end

Expand Down

0 comments on commit a8ed387

Please sign in to comment.