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
13 changes: 1 addition & 12 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,5 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
tests:
name: "Tests"
strategy:
fail-fast: false
matrix:
group:
- Core
version:
- '1'
uses: "SciML/.github/.github/workflows/tests.yml@v1"
with:
group: "${{ matrix.group }}"
julia-version: "${{ matrix.version }}"
uses: "SciML/.github/.github/workflows/grouped-tests.yml@v1"
secrets: "inherit"
7 changes: 6 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,25 @@ Polyhedra = "0.7.8, 0.8"
PolynomialRoots = "1.0.0"
PrecompileTools = "1.2.1"
ReactionNetworkImporters = "0.15.1, 1.3"
SBMLImporter = "4"
SBMLToolkit = "0.1.29"
SafeTestsets = "0.1.0"
Satisfiability = "0.2"
SparseArrays = "1"
StableRNGs = "1"
StaticArrays = "1.9.8"
SymbolicUtils = "3.7.2, 4"
Test = "1"
UnPack = "1"
julia = "1.10"

[extras]
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
SBMLImporter = "210efffb-c3c8-456d-a807-6f55560b12fe"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed"

[targets]
test = ["Test", "SBMLImporter", "SafeTestsets", "StableRNGs", "UnPack"]
test = ["Test", "SBMLImporter", "SafeTestsets", "StableRNGs", "UnPack", "Pkg"]
16 changes: 16 additions & 0 deletions test/qa/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[deps]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
CatalystNetworkAnalysis = "5fe4a9df-d2e2-44a6-8bda-0abe10269b5a"
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[sources]
CatalystNetworkAnalysis = {path = "../.."}

[compat]
Aqua = "0.8"
JET = "0.9, 0.10, 0.11"
Pkg = "1"
Test = "1"
julia = "1.10"
26 changes: 26 additions & 0 deletions test/qa/qa.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using CatalystNetworkAnalysis, Aqua, JET
using Test

@testset "Aqua" begin
# undefined_exports, stale_deps and the deps_compat extras check disabled:
# genuine findings tracked in https://github.com/SciML/CatalystNetworkAnalysis.jl/issues/70
# (marked @test_broken below). All other Aqua sub-checks still run and pass.
Aqua.test_all(
CatalystNetworkAnalysis;
undefined_exports = false,
stale_deps = false,
deps_compat = (check_extras = false,),
)
@test_broken false # Aqua undefined_exports: symbolic_steady_states — tracked in https://github.com/SciML/CatalystNetworkAnalysis.jl/issues/70
@test_broken false # Aqua stale_deps: ReactionNetworkImporters, PolynomialRoots, ModelingToolkit, SBMLToolkit — tracked in https://github.com/SciML/CatalystNetworkAnalysis.jl/issues/70
@test_broken false # Aqua deps_compat extras: Pkg missing [compat] — tracked in https://github.com/SciML/CatalystNetworkAnalysis.jl/issues/70
end

@testset "JET" begin
# JET reports genuine errors (Nemo.ZZMatrix no-matching-method, undefined
# bindings) tracked in https://github.com/SciML/CatalystNetworkAnalysis.jl/issues/70 —
# run in report mode and @test_broken the assertion so QA stays green and
# auto-flags once fixed.
rep = JET.report_package(CatalystNetworkAnalysis; target_defined_modules = true)
@test_broken isempty(JET.get_reports(rep)) # JET: 12 possible errors — tracked in https://github.com/SciML/CatalystNetworkAnalysis.jl/issues/70
end
71 changes: 46 additions & 25 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,32 +1,53 @@
using CatalystNetworkAnalysis
using Pkg
using SafeTestsets, Test
using CatalystNetworkAnalysis
using UnPack, SBMLImporter, SBMLToolkit

@testset "CatalystNetworkAnalysis.jl" begin
# Write your tests here.
const GROUP = get(ENV, "GROUP", "All")

@time @safetestset "Concentration Robustness" begin
include("ACR.jl")
end
@time @safetestset "Concordance Helpers" begin
include("concordancehelpers.jl")
end
@time @safetestset "Siphons" begin
include("siphons.jl")
end
@time @safetestset "Persistence" begin
include("persistence.jl")
end
@time @safetestset "Deficiency One Algorithm" begin
include("deficiencyone.jl")
end
@time @safetestset "Specific Stoichiometric Compatibility Class Functionality" begin
include("specificscc.jl")
end
@time @safetestset "Linear programming utilities" begin
include("lp_utils.jl")
# QA (Aqua + JET) runs in an isolated environment (test/qa) so its tooling deps
# never enter the main test target's resolve. On Julia < 1.11 the [sources] table
# is ignored, so develop the package by path to test the PR branch code.
function activate_qa_env()
Pkg.activate(joinpath(@__DIR__, "qa"))
if VERSION < v"1.11.0-DEV.0"
Pkg.develop(PackageSpec(path = dirname(@__DIR__)))
end
return Pkg.instantiate()
end

if GROUP == "All" || GROUP == "Core"
@testset "CatalystNetworkAnalysis.jl" begin
@time @safetestset "Concentration Robustness" begin
include("ACR.jl")
end
@time @safetestset "Concordance Helpers" begin
include("concordancehelpers.jl")
end
@time @safetestset "Siphons" begin
include("siphons.jl")
end
@time @safetestset "Persistence" begin
include("persistence.jl")
end
@time @safetestset "Deficiency One Algorithm" begin
include("deficiencyone.jl")
end
@time @safetestset "Specific Stoichiometric Compatibility Class Functionality" begin
include("specificscc.jl")
end
@time @safetestset "Linear programming utilities" begin
include("lp_utils.jl")
end
@time @safetestset "Network Translation" begin
include("network_translation.jl")
end
end
@time @safetestset "Network Translation" begin
include("network_translation.jl")
end

if GROUP == "QA"
activate_qa_env()
@time @safetestset "Quality Assurance" begin
include("qa/qa.jl")
end
end
5 changes: 5 additions & 0 deletions test/test_groups.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[Core]
versions = ["lts", "1", "pre"]

[QA]
versions = ["lts", "1"]
Loading