Unverified Commit 7d49a30a authored by Laurent Heirendt's avatar Laurent Heirendt Committed by GitHub
Browse files

Merge pull request #38 from LCSB-BioCore/mk-reformat

apply juliaformatter
parents b8863bb4 34194021
using Documenter, SBML
makedocs(modules = [SBML],
makedocs(
modules = [SBML],
clean = false,
format = Documenter.HTML(
prettyurls = !("local" in ARGS),
canonical = "https://lcsb-biocore.github.io/DistributedData.jl/stable/"),
canonical = "https://lcsb-biocore.github.io/DistributedData.jl/stable/",
),
sitename = "SBML.jl",
authors = "The developers of SBML.jl",
linkcheck = !("skiplinks" in ARGS),
pages = [
"Documentation" => "index.md",
],
pages = ["Documentation" => "index.md"],
)
deploydocs(
repo = "github.com/LCSB-BioCore/SBML.jl.git",
target = "build",
branch = "gh-pages",
push_preview = true
push_preview = true,
)
......@@ -2,7 +2,10 @@
sbmlfile = "Ec_core_flux1.xml"
if !isfile(sbmlfile)
download("http://systemsbiology.ucsd.edu/sites/systemsbiology.ucsd.edu/files/Attachments/Images/InSilicoOrganisms/Ecoli/Ecoli_SBML/Ec_core_flux1.xml", sbmlfile)
download(
"http://systemsbiology.ucsd.edu/sites/systemsbiology.ucsd.edu/files/Attachments/Images/InSilicoOrganisms/Ecoli/Ecoli_SBML/Ec_core_flux1.xml",
sbmlfile,
)
end
cksum = bytes2hex(sha256(open(sbmlfile)))
......@@ -23,12 +26,12 @@ end
mets, rxns, S = getS(mdl)
@test typeof(S) <: AbstractMatrix{Float64}
@test typeof(getS(mdl; zeros=spzeros)[3]) <: SparseMatrixCSC{Float64}
@test typeof(getS(mdl; zeros=zeros)[3]) == Matrix{Float64}
@test typeof(getS(mdl; zeros = spzeros)[3]) <: SparseMatrixCSC{Float64}
@test typeof(getS(mdl; zeros = zeros)[3]) == Matrix{Float64}
@test length(mets) == 77
@test length(rxns) == 77
@test size(S) == (length(mets),length(rxns))
@test size(S) == (length(mets), length(rxns))
# totally arbitrary value tests
@test isapprox(sum(S), 42.1479)
......@@ -47,10 +50,10 @@ end
@test length(getLBs(mdl)) == length(rxns)
@test length(getUBs(mdl)) == length(rxns)
getunit = (val,unit)::Tuple -> unit
getunit = (val, unit)::Tuple -> unit
@test all([broadcast(getunit, lbs) broadcast(getunit, ubs)] .== "mmol_per_gDW_per_hr")
getval = (val,unit)::Tuple -> val
getval = (val, unit)::Tuple -> val
lvals = broadcast(getval, lbs)
uvals = broadcast(getval, ubs)
@test isapprox(lvals[27], uvals[27])
......
sbmlfiles = [
# a test model from BIGG
("e_coli_core.xml",
"http://bigg.ucsd.edu/static/models/e_coli_core.xml",
"b4db506aeed0e434c1f5f1fdd35feda0dfe5d82badcfda0e9d1342335ab31116",
72,
95),
(
"e_coli_core.xml",
"http://bigg.ucsd.edu/static/models/e_coli_core.xml",
"b4db506aeed0e434c1f5f1fdd35feda0dfe5d82badcfda0e9d1342335ab31116",
72,
95,
),
# a relatively new non-curated model from biomodels
("T1M1133.xml",
"https://www.ebi.ac.uk/biomodels/model/download/MODEL1909260004.4?filename=T1M1133.xml",
"2b1e615558b6190c649d71052ac9e0dc1635e3ad281e541bc7d4fdf2892a5967",
2517,
3956),
(
"T1M1133.xml",
"https://www.ebi.ac.uk/biomodels/model/download/MODEL1909260004.4?filename=T1M1133.xml",
"2b1e615558b6190c649d71052ac9e0dc1635e3ad281e541bc7d4fdf2892a5967",
2517,
3956,
),
# a curated model from biomodels
("Dasgupta2020.xml",
"https://www.ebi.ac.uk/biomodels/model/download/BIOMD0000000973.3?filename=Dasgupta2020.xml",
"958b131d4df2f215dae68255433542f228601db0326d26a54efd08ddcf823489",
2, 6),
(
"Dasgupta2020.xml",
"https://www.ebi.ac.uk/biomodels/model/download/BIOMD0000000973.3?filename=Dasgupta2020.xml",
"958b131d4df2f215dae68255433542f228601db0326d26a54efd08ddcf823489",
2,
6,
),
]
@testset "Loading of models from various sources" begin
......
@testset "CCall to SBML works and SBML returns a version" begin
@test typeof(SBMLVersion())==Pkg.VersionNumber
@test typeof(SBMLVersion()) == Pkg.VersionNumber
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment