Skip to content

Commit e96df2f

Browse files
committed
merge fixes
1 parent b23b6ad commit e96df2f

File tree

4 files changed

+25
-19
lines changed

4 files changed

+25
-19
lines changed

docs/make.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ makedocs(sitename = "Catalyst.jl",
4141
clean = true,
4242
pages = pages,
4343
pagesonly = true,
44-
warnonly = true)
45-
warnonly = [:missing_docs])
44+
warnonly = [:missing_docs])
4645

4746
deploydocs(repo = "github.com/SciML/Catalyst.jl.git";
4847
push_preview = true)

docs/pages.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pages = Any[
2626
"model_simulation/simulation_plotting.md",
2727
"model_simulation/simulation_structure_interfacing.md",
2828
"model_simulation/ensemble_simulations.md",
29-
"model_simulation/ode_simulation_performance.md",
29+
"model_simulation/ode_simulation_performance.md"
3030
],
3131
"Steady state analysis" => Any[
3232
"steady_state_functionality/homotopy_continuation.md",

src/reactionsystem_serialisation/serialise_fields.jl

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ SIVS_FS = (seri_has_sivs, get_sivs_string, get_sivs_annotation)
4343

4444
# Function which handles the addition of species, variable, and parameter declarations to the file
4545
# text. These must be handled as a unity in case there are default value dependencies between these.
46-
function handle_us_n_ps(file_text::String, rn::ReactionSystem, annotate::Bool, top_level::Bool)
46+
function handle_us_n_ps(file_text::String, rn::ReactionSystem, annotate::Bool,
47+
top_level::Bool)
4748
# Fetches the system's parameters, species, and variables. Computes the `has_` `Bool`s.
4849
ps_all = get_ps(rn)
4950
sps_all = get_species(rn)
@@ -408,7 +409,8 @@ function get_continuous_events_annotation(rn::ReactionSystem)
408409
end
409410

410411
# Combines the 3 -related functions in a constant tuple.
411-
CONTINUOUS_EVENTS_FS = (seri_has_continuous_events, get_continuous_events_string, get_continuous_events_annotation)
412+
CONTINUOUS_EVENTS_FS = (seri_has_continuous_events, get_continuous_events_string,
413+
get_continuous_events_annotation)
412414

413415
### Handles Discrete Events ###
414416

@@ -464,17 +466,19 @@ function get_discrete_events_annotation(rn::ReactionSystem)
464466
end
465467

466468
# Combines the 3 -related functions in a constant tuple.
467-
DISCRETE_EVENTS_FS = (seri_has_discrete_events, get_discrete_events_string, get_discrete_events_annotation)
469+
DISCRETE_EVENTS_FS = (seri_has_discrete_events, get_discrete_events_string,
470+
get_discrete_events_annotation)
468471

469472
### Handles Systems ###
470473

471474
# Specific `push_field` function, which is used for the system field (where the annotation option
472475
# must be passed to the `get_component_string` function). Since non-ReactionSystem systems cannot be
473476
# written to file, this function throws an error if any such systems are encountered.
474-
function push_systems_field(file_text::String, rn::ReactionSystem, annotate::Bool, top_level::Bool)
477+
function push_systems_field(file_text::String, rn::ReactionSystem, annotate::Bool,
478+
top_level::Bool)
475479
# Checks whether there are any subsystems, and if these are ReactionSystems.
476480
seri_has_systems(rn) || (return (file_text, false))
477-
if any(!(system isa ReactionSystem) for system in MT.get_systems(rn))
481+
if any(!(system isa ReactionSystem) for system in MT.get_systems(rn))
478482
error("Tries to write a ReactionSystem to file which have non-ReactionSystem subs-systems. This is currently not possible.")
479483
end
480484

@@ -538,4 +542,5 @@ function get_connection_type_annotation(rn::ReactionSystem)
538542
end
539543

540544
# Combines the 3 connection types-related functions in a constant tuple.
541-
CONNECTION_TYPE_FS = (seri_has_connection_type, get_connection_type_string, get_connection_type_annotation)
545+
CONNECTION_TYPE_FS = (
546+
seri_has_connection_type, get_connection_type_string, get_connection_type_annotation)

src/reactionsystem_serialisation/serialise_reactionsystem.jl

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,23 +75,25 @@ function get_full_system_string(rn::ReactionSystem, annotate::Bool, top_level::B
7575

7676
# Finalise the system. Creates the final `ReactionSystem` call.
7777
# Enclose everything in a `let ... end` block.
78-
rs_creation_code = make_reaction_system_call(rn, annotate, top_level, has_sivs, has_species,
79-
has_variables, has_parameters, has_reactions,
80-
has_equations, has_observed, has_continuous_events,
81-
has_discrete_events, has_systems, has_connection_type)
82-
annotate || (@string_prepend! "\n" file_text)
83-
@string_prepend! "let" file_text
78+
rs_creation_code = make_reaction_system_call(
79+
rn, annotate, top_level, has_sivs, has_species,
80+
has_variables, has_parameters, has_reactions,
81+
has_equations, has_observed, has_continuous_events,
82+
has_discrete_events, has_systems, has_connection_type)
83+
annotate || (@string_prepend! "\n" file_text)
84+
@string_prepend! "let" file_text
8485
@string_append! file_text "\n\n" rs_creation_code "\n\nend"
8586

8687
return file_text
8788
end
8889

8990
# Creates a ReactionSystem call for creating the model. Adds all the correct inputs to it. The input
9091
# `has_` `Bool`s described which inputs are used. If the model is `complete`, this is handled here.
91-
function make_reaction_system_call(rs::ReactionSystem, annotate, top_level, has_sivs, has_species,
92-
has_variables, has_parameters, has_reactions, has_equations,
93-
has_observed, has_continuous_events, has_discrete_events,
94-
has_systems, has_connection_type)
92+
function make_reaction_system_call(
93+
rs::ReactionSystem, annotate, top_level, has_sivs, has_species,
94+
has_variables, has_parameters, has_reactions, has_equations,
95+
has_observed, has_continuous_events, has_discrete_events,
96+
has_systems, has_connection_type)
9597

9698
# Gets the independent variable input.
9799
iv = x_2_string(get_iv(rs))

0 commit comments

Comments
 (0)