From 413750e9162f2d1ddcb79ba9b045d29c1f1bfa92 Mon Sep 17 00:00:00 2001
From: Mahmoud Bentriou <mahmoud.bentriou@centralesupelec.fr>
Date: Wed, 11 May 2022 18:21:30 +0200
Subject: [PATCH] Change tests to test directory in files

---
 README.md                                           | 8 ++++----
 bench/pkg/bench1_cosmos.jl                          | 2 +-
 bench/pkg/bench2_cosmos.jl                          | 2 +-
 test/cosmos/distance_F/ER_1D.jl                     | 2 +-
 test/cosmos/distance_G/ER_R5.jl                     | 2 +-
 test/cosmos/distance_G_F/ER_R6.jl                   | 2 +-
 test/run_simulation.jl                              | 2 +-
 test/simulation/plot_sync_doping_3way_oscillator.jl | 2 +-
 test/simulation/plot_sync_repressilator.jl          | 2 +-
 test/simulation/sim_er.jl                           | 2 +-
 test/simulation/sim_er_row_buffer_bounded.jl        | 2 +-
 test/simulation/sim_pm_er.jl                        | 2 +-
 test/simulation/sim_pm_sync_er.jl                   | 2 +-
 test/simulation/sim_poisson.jl                      | 4 ++--
 test/simulation/sim_sir.jl                          | 2 +-
 test/simulation/sim_sir_bounded.jl                  | 2 +-
 test/simulation/sim_sir_col_buffer_bounded.jl       | 2 +-
 test/simulation/sim_sir_row_buffer_bounded.jl       | 2 +-
 test/simulation/sim_sir_tauleap.jl                  | 2 +-
 19 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/README.md b/README.md
index 7b878da..8b4b01a 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 16f2b1e..d973e01 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 d735dd1..d74a049 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 7eaac2d..1c3b586 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 ce300bf..db83ea0 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 3d411b9..fb851ec 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 b79d69e..6ce755f 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 389b079..abe43d1 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 de4e56a..b1c05d2 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 96857f4..09f7698 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 c359a4f..b4c3e02 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 42efe94..e739d60 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 19b6122..39c1d83 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 93a55c9..75f0818 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 fe2740a..c0e8da5 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 fe3dcc7..1e9ab1f 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 eb16829..d3f6887 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 50f6b59..329aea5 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 841953a..805b2a5 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
 
-- 
GitLab