Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Nemo = "2edaba10-b0f1-5616-af89-8c11ac63239a"
Oscar = "f1435218-dba5-11e9-1e4d-f1a5fab5fc13"
Polyhedra = "67491407-f73d-577b-9b50-8179a7c68029"
PolynomialRoots = "3a141323-8675-5d76-9d11-e1df1406c778"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
ReactionNetworkImporters = "b4db0fb7-de2a-5028-82bf-5021f5cfa881"
SBMLToolkit = "86080e66-c8ac-44c2-a1a0-9adaadfe4a4e"
Satisfiability = "160ab843-0bc6-4ba4-9585-b7478b70f443"
Expand All @@ -46,6 +47,7 @@ Nemo = "0.47, 0.54, 0.56"
Oscar = "1.1.1, 1.7"
Polyhedra = "0.7.8, 0.8"
PolynomialRoots = "1.0.0"
PrecompileTools = "1"
ReactionNetworkImporters = "1.3"
SBMLImporter = "4"
SBMLToolkit = "0.1.29"
Expand Down
12 changes: 12 additions & 0 deletions src/CatalystNetworkAnalysis.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module CatalystNetworkAnalysis

using Catalyst
using PrecompileTools: @compile_workload, @setup_workload
using Satisfiability # For siphon detection

# Algebraic functionality
Expand Down Expand Up @@ -42,4 +43,15 @@ export elementary_flux_modes
include("translated.jl")
export WRDZ_translation

@setup_workload begin
@compile_workload begin
rn = @reaction_network begin
k₁, A --> B
k₂, B --> A
end
isconservative(rn)
isconsistent(rn)
end
end

end
11 changes: 11 additions & 0 deletions test/precompile_workload.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using Catalyst, CatalystNetworkAnalysis, Test

@testset "Precompile workload" begin
rn = @reaction_network begin
k₁, A --> B
k₂, B --> A
end

@test isconservative(rn)
@test isconsistent(rn)
end
Loading