diff --git a/README.md b/README.md index 7b878da646fe38e895f74f023ec62b9014b2d04d..8b4b01ad5911c9386b5d3ee101b82dd484bb1a67 100644 --- a/README.md +++ b/README.md @@ -17,11 +17,11 @@ It implements: This package is not yet accessible via the Julia package manager. For the install of the package: 1. Clone this git repository on your computer. -2. Add the "core" directory of this repository to your `LOAD_PATH`. This can be done by two different ways: +2. Add the "src" directory of this repository to your `LOAD_PATH`. This can be done by two different ways: * Add the Julia line code ```julia import Distributed: @everywhere - @everywhere push!(LOAD_PATH, /path/to/markovprocesses.jl/core") + @everywhere push!(LOAD_PATH, /path/to/markovprocesses.jl/src") ``` on your Julia startup file which is often located in `~/.julia/config/startup.jl` in Unix systems. @@ -35,9 +35,9 @@ A few notebooks are available in examples/notebooks for a quick presentation of Execution tests and statistical tests are available. It can be run by: -`julia tests/run_all.jl` +`julia test/run_all.jl` -> :warning: The statistical tests run by `tests/run_cosmos.jl` needs [Cosmos](http://cosmos.lacl.fr/) in your PATH environment variable. +> :warning: The statistical tests run by `test/run_cosmos.jl` needs [Cosmos](http://cosmos.lacl.fr/) in your PATH environment variable. ## Benchmarks diff --git a/bench/pkg/bench1_cosmos.jl b/bench/pkg/bench1_cosmos.jl index 16f2b1e8e097b9cfaa7bfa7675df9185ff027f98..d973e01656767403a40aabce7d740d6e9b9b64d1 100644 --- a/bench/pkg/bench1_cosmos.jl +++ b/bench/pkg/bench1_cosmos.jl @@ -4,7 +4,7 @@ using Statistics using DelimitedFiles import Distributed: nworkers -absolute_path = get_module_path() * "/tests/cosmos/" +absolute_path = get_module_path() * "/test/cosmos/" path_latex = "./" dict_automata_lha = Dict("A_G" => (absolute_path * "distance_G/dist_G_ER.lha")) diff --git a/bench/pkg/bench2_cosmos.jl b/bench/pkg/bench2_cosmos.jl index d735dd1376c00ad2b7cf30895533062672e75f47..d74a049b332af7564667f0087c98932e59d9d431 100644 --- a/bench/pkg/bench2_cosmos.jl +++ b/bench/pkg/bench2_cosmos.jl @@ -4,7 +4,7 @@ using Statistics using DelimitedFiles import Distributed: nworkers -absolute_path = get_module_path() * "/tests/cosmos/" +absolute_path = get_module_path() * "/test/cosmos/" path_latex = haskey(ENV, "BENTRIOU_THESIS") ? ENV["BENTRIOU_THESIS"] * "/appendices/bench_cosmos/" : "./" dict_automata_lha = Dict("A_G" => (absolute_path * "distance_G/dist_G_ER.lha")) diff --git a/test/cosmos/distance_F/ER_1D.jl b/test/cosmos/distance_F/ER_1D.jl index 7eaac2dfb429deffe05974cf0a50072a923bb864..1c3b586a79b609e6428fc50b85996ebf985402bd 100644 --- a/test/cosmos/distance_F/ER_1D.jl +++ b/test/cosmos/distance_F/ER_1D.jl @@ -2,7 +2,7 @@ @everywhere begin using MarkovProcesses import Distributed: nworkers - absolute_path = get_module_path() * "/tests/cosmos/" + absolute_path = get_module_path() * "/test/cosmos/" # Values x1, x2 t1, t2 dict_exp = Dict( :R1 => [50, 75, 0.025, 0.05], diff --git a/test/cosmos/distance_G/ER_R5.jl b/test/cosmos/distance_G/ER_R5.jl index ce300bf12947640e8c419f65951989bb5c8713c4..db83ea09a1ca51d969df6f3b34b069d2597bb577 100644 --- a/test/cosmos/distance_G/ER_R5.jl +++ b/test/cosmos/distance_G/ER_R5.jl @@ -2,7 +2,7 @@ @everywhere begin using MarkovProcesses import Distributed: nworkers - absolute_path = get_module_path() * "/tests/cosmos/" + absolute_path = get_module_path() * "/test/cosmos/" # Values x1, x2 t1, t2 str_model = "ER" load_model(str_model) diff --git a/test/cosmos/distance_G_F/ER_R6.jl b/test/cosmos/distance_G_F/ER_R6.jl index 3d411b983bf9eafe23fa41a193ae2c9c04eda6d9..fb851eccbe3039edbe382a3080239f1ec653417e 100644 --- a/test/cosmos/distance_G_F/ER_R6.jl +++ b/test/cosmos/distance_G_F/ER_R6.jl @@ -2,7 +2,7 @@ @everywhere begin using MarkovProcesses import Distributed: nworkers - absolute_path = get_module_path() * "/tests/cosmos/" + absolute_path = get_module_path() * "/test/cosmos/" # Values x1, x2 t1, t2 str_model = "ER" load_model(str_model) diff --git a/test/run_simulation.jl b/test/run_simulation.jl index b79d69e178929268486d921aac87a7d945e2062a..6ce755fb3b6383021c9fee59ad0befdfd97fec95 100644 --- a/test/run_simulation.jl +++ b/test/run_simulation.jl @@ -2,7 +2,7 @@ using Test import MarkovProcesses: get_module_path -str_dir_pics = get_module_path() * "/tests/simulation/res_pics" +str_dir_pics = get_module_path() * "/test/simulation/res_pics" if !isdir(str_dir_pics) mkdir(str_dir_pics) end @testset "Simulation tests" begin diff --git a/test/simulation/plot_sync_doping_3way_oscillator.jl b/test/simulation/plot_sync_doping_3way_oscillator.jl index 389b07998a6ae5b03df9ae19afe2f7a52be925fa..abe43d1b741cf9b8b20a0065e5dc5ef148ec8da0 100644 --- a/test/simulation/plot_sync_doping_3way_oscillator.jl +++ b/test/simulation/plot_sync_doping_3way_oscillator.jl @@ -1,7 +1,7 @@ using MarkovProcesses load_plots() -path_pics = get_module_path() * "/tests/simulation/res_pics/" +path_pics = get_module_path() * "/test/simulation/res_pics/" load_model("doping_3way_oscillator") observe_all!(doping_3way_oscillator) diff --git a/test/simulation/plot_sync_repressilator.jl b/test/simulation/plot_sync_repressilator.jl index de4e56a03e5bec5c4bb5acf9dea447724ad68a12..b1c05d2533e6b338bf4f47ae8fb77ef6b1f282af 100644 --- a/test/simulation/plot_sync_repressilator.jl +++ b/test/simulation/plot_sync_repressilator.jl @@ -1,7 +1,7 @@ using MarkovProcesses load_plots() -path_pics = get_module_path() * "/tests/simulation/res_pics/" +path_pics = get_module_path() * "/test/simulation/res_pics/" load_model("repressilator") observe_all!(repressilator) diff --git a/test/simulation/sim_er.jl b/test/simulation/sim_er.jl index 96857f4db14fa2e2a5a0305e95e1010aa9a18912..09f7698309578450ccdbd4fd9b5565a2a364c0e0 100644 --- a/test/simulation/sim_er.jl +++ b/test/simulation/sim_er.jl @@ -7,7 +7,7 @@ load_model("ER") σ = simulate(ER) plt.figure() plt.step(times(σ), σ[:P], "ro--", marker="x", where="post", linewidth=1.0) -plt.savefig(get_module_path() * "/tests/simulation/res_pics/sim_er.png", dpi=480) +plt.savefig(get_module_path() * "/test/simulation/res_pics/sim_er.png", dpi=480) plt.close() return true diff --git a/test/simulation/sim_er_row_buffer_bounded.jl b/test/simulation/sim_er_row_buffer_bounded.jl index c359a4fd6a208187263995bdd0691a6552861821..b4c3e022a7e60ba7ba3070127343c790fb52d65a 100644 --- a/test/simulation/sim_er_row_buffer_bounded.jl +++ b/test/simulation/sim_er_row_buffer_bounded.jl @@ -9,7 +9,7 @@ ER_row_buffer.time_bound = 10.0 σ = _simulate_row_buffer(ER_row_buffer) plt.figure() plt.step(times(σ), _get_values_row(σ,:P), "ro--", marker="x", where="post", linewidth=1.0) -plt.savefig(get_module_path() * "/tests/simulation/res_pics/sim_er_row_buffer_bounded.svg") +plt.savefig(get_module_path() * "/test/simulation/res_pics/sim_er_row_buffer_bounded.svg") plt.close() return true diff --git a/test/simulation/sim_pm_er.jl b/test/simulation/sim_pm_er.jl index 42efe9410471ad05e7f245eec272de9ec60a1204..e739d607ddbb7e03fdf451012adb4decd567cea9 100644 --- a/test/simulation/sim_pm_er.jl +++ b/test/simulation/sim_pm_er.jl @@ -9,7 +9,7 @@ pm_ER = ParametricModel(ER, (:k1, Uniform(0.0,100.0)), (:k2, Uniform(0.0,100.0)) prior_p = [0.2, 40.0] σ = simulate(pm_ER, prior_p) -plot(σ; filename = get_module_path() * "/tests/simulation/res_pics/sim_pm_er_long.svg") +plot(σ; filename = get_module_path() * "/test/simulation/res_pics/sim_pm_er_long.svg") return true diff --git a/test/simulation/sim_pm_sync_er.jl b/test/simulation/sim_pm_sync_er.jl index 19b612224bea9470eecd81273a5d8b3d3de2da98..39c1d83791d5681638399b73a3b87d3a8b74eed2 100644 --- a/test/simulation/sim_pm_sync_er.jl +++ b/test/simulation/sim_pm_sync_er.jl @@ -11,7 +11,7 @@ pm_sync_ER = ParametricModel(ER*A_F, (:k1, Uniform(0.0,100.0)), (:k2, Uniform(0. prior_p = [0.2, 40.0] σ = simulate(pm_sync_ER, prior_p) -plot(σ; filename = get_module_path() * "/tests/simulation/res_pics/sim_pm_sync_er_long.svg") +plot(σ; filename = get_module_path() * "/test/simulation/res_pics/sim_pm_sync_er_long.svg") return true diff --git a/test/simulation/sim_poisson.jl b/test/simulation/sim_poisson.jl index 93a55c9f004842b44ec242039badf9257bc7cee9..75f0818f56b6898c47bb391cbf093357ea894c29 100644 --- a/test/simulation/sim_poisson.jl +++ b/test/simulation/sim_poisson.jl @@ -4,8 +4,8 @@ load_plots() load_model("poisson") σ = simulate(poisson) -#plot(σ; filename = get_module_path() * "/tests/simulation/res_pics/sim_poisson.svg") -plot(σ; filename = get_module_path() * "/tests/simulation/res_pics/sim_poisson.svg") +#plot(σ; filename = get_module_path() * "/test/simulation/res_pics/sim_poisson.svg") +plot(σ; filename = get_module_path() * "/test/simulation/res_pics/sim_poisson.svg") return true diff --git a/test/simulation/sim_sir.jl b/test/simulation/sim_sir.jl index fe2740a63c5a057d7f832dc8c2aac027cbd2a6fe..c0e8da5ff98a7a76a4b6f61fc144cec758f1a9da 100644 --- a/test/simulation/sim_sir.jl +++ b/test/simulation/sim_sir.jl @@ -7,7 +7,7 @@ load_model("SIR") σ = simulate(SIR) plt.figure() plt.step(times(σ), σ[:I], "ro--", marker="x", where="post", linewidth=1.0) -plt.savefig(get_module_path() * "/tests/simulation/res_pics/sim_sir.svg") +plt.savefig(get_module_path() * "/test/simulation/res_pics/sim_sir.svg") plt.close() return true diff --git a/test/simulation/sim_sir_bounded.jl b/test/simulation/sim_sir_bounded.jl index fe3dcc76264b74fcce2b83bc51b11ed7610508fc..1e9ab1ff5d569734bdcdb4a21c35e84d070542a3 100644 --- a/test/simulation/sim_sir_bounded.jl +++ b/test/simulation/sim_sir_bounded.jl @@ -8,7 +8,7 @@ SIR.time_bound = 100.0 σ = simulate(SIR) plt.figure() plt.step(times(σ), σ[:I], "ro--", marker="x", where="post", linewidth=1.0) -plt.savefig(get_module_path() * "/tests/simulation/res_pics/sim_sir_bounded.svg") +plt.savefig(get_module_path() * "/test/simulation/res_pics/sim_sir_bounded.svg") plt.close() return true diff --git a/test/simulation/sim_sir_col_buffer_bounded.jl b/test/simulation/sim_sir_col_buffer_bounded.jl index eb168298038f82d704a0f996987deeb0ec298b8f..d3f6887a52618b8e07bece852aa2d8d3e3cc8a01 100644 --- a/test/simulation/sim_sir_col_buffer_bounded.jl +++ b/test/simulation/sim_sir_col_buffer_bounded.jl @@ -9,7 +9,7 @@ SIR_col_buffer.time_bound = 100.0 σ = _simulate_col_buffer(SIR_col_buffer) plt.figure() plt.step(times(σ), _get_values_col(σ,:I), "ro--", marker="x", where="post", linewidth=1.0) -plt.savefig(get_module_path() * "/tests/simulation/res_pics/sim_sir_col_buffer_bounded.svg") +plt.savefig(get_module_path() * "/test/simulation/res_pics/sim_sir_col_buffer_bounded.svg") plt.close() return true diff --git a/test/simulation/sim_sir_row_buffer_bounded.jl b/test/simulation/sim_sir_row_buffer_bounded.jl index 50f6b594b2895f96b1b2c6f9b5e0625f576c7007..329aea537f5557d955a73f9ca202b76db6c1b132 100644 --- a/test/simulation/sim_sir_row_buffer_bounded.jl +++ b/test/simulation/sim_sir_row_buffer_bounded.jl @@ -9,7 +9,7 @@ SIR_row_buffer.time_bound = 100.0 σ = _simulate_row_buffer(SIR_row_buffer) plt.figure() plt.step(times(σ), _get_values_row(σ,:I), "ro--", marker="x", where="post", linewidth=1.0) -plt.savefig(get_module_path() * "/tests/simulation/res_pics/sim_sir_row_buffer_bounded.svg") +plt.savefig(get_module_path() * "/test/simulation/res_pics/sim_sir_row_buffer_bounded.svg") plt.close() return true diff --git a/test/simulation/sim_sir_tauleap.jl b/test/simulation/sim_sir_tauleap.jl index 841953a96d160a5248ce8b78c577b87a73b7f1d6..805b2a567048d20a457e5f88613c5ca441eb80b4 100644 --- a/test/simulation/sim_sir_tauleap.jl +++ b/test/simulation/sim_sir_tauleap.jl @@ -4,7 +4,7 @@ load_plots() load_model("SIR_tauleap") σ = simulate(SIR_tauleap) -plot(σ; filename = get_module_path() * "/tests/simulation/res_pics/sim_sir_tauleap.svg") +plot(σ; filename = get_module_path() * "/test/simulation/res_pics/sim_sir_tauleap.svg") return true