From e59030604f22b10d651c942de90d95d6614fb697 Mon Sep 17 00:00:00 2001 From: Mahmoud Bentriou <mahmoud.bentriou@centralesupelec.fr> Date: Wed, 11 May 2022 17:35:12 +0200 Subject: [PATCH] Change core => src directory for Julia's convention of packages --- Project.toml | 4 ++++ bench/array_memory_order/access_trajectory.jl | 2 +- bench/array_memory_order/multiple_dist_lp_view.jl | 2 +- bench/array_memory_order/multiple_sim.jl | 2 +- bench/array_memory_order/multiple_sim_view.jl | 2 +- bench/array_memory_order/read_random_state_trajectory.jl | 2 +- bench/array_memory_order/read_trajectory.jl | 2 +- bench/array_memory_order/sim.jl | 2 +- {core => src}/MarkovProcesses.jl | 0 {core => src}/_tests_simulate.jl | 0 {core => src}/common.jl | 0 {core => src}/lha.jl | 0 {core => src}/model.jl | 0 {core => src}/network_model.jl | 0 {core => src}/plots.jl | 0 {core => src}/trajectory.jl | 0 {core => src}/utils.jl | 2 +- test/automaton_abc/distributed_R1.jl | 2 +- .../distributed_abc_euclidean_distance_automaton.jl | 2 +- test/simulation/sim_er_row_buffer_bounded.jl | 2 +- test/simulation/sim_sir_col_buffer_bounded.jl | 2 +- test/simulation/sim_sir_row_buffer_bounded.jl | 2 +- test/unit/distributed_simulation.jl | 2 +- 23 files changed, 18 insertions(+), 14 deletions(-) create mode 100644 Project.toml rename {core => src}/MarkovProcesses.jl (100%) rename {core => src}/_tests_simulate.jl (100%) rename {core => src}/common.jl (100%) rename {core => src}/lha.jl (100%) rename {core => src}/model.jl (100%) rename {core => src}/network_model.jl (100%) rename {core => src}/plots.jl (100%) rename {core => src}/trajectory.jl (100%) rename {core => src}/utils.jl (92%) diff --git a/Project.toml b/Project.toml new file mode 100644 index 0000000..b059707 --- /dev/null +++ b/Project.toml @@ -0,0 +1,4 @@ +name = "MarkovProcesses" +uuid = "c0b3d30c-0dcf-40cf-8981-542ba9d93cb6" +authors = ["Mahmoud Bentriou <mahmoud.bentriou@centralesupelec.fr>"] +version = "0.1.0" diff --git a/bench/array_memory_order/access_trajectory.jl b/bench/array_memory_order/access_trajectory.jl index 4936299..2138bbd 100644 --- a/bench/array_memory_order/access_trajectory.jl +++ b/bench/array_memory_order/access_trajectory.jl @@ -2,7 +2,7 @@ using BenchmarkTools import BenchmarkTools: mean using MarkovProcesses -include(get_module_path() * "/core/_tests_simulate.jl") +include(get_module_path() * "/src/_tests_simulate.jl") BenchmarkTools.DEFAULT_PARAMETERS.samples = 20000 if ARGS[1] == "SIR" diff --git a/bench/array_memory_order/multiple_dist_lp_view.jl b/bench/array_memory_order/multiple_dist_lp_view.jl index 49972a4..167a78f 100644 --- a/bench/array_memory_order/multiple_dist_lp_view.jl +++ b/bench/array_memory_order/multiple_dist_lp_view.jl @@ -2,7 +2,7 @@ using BenchmarkTools import BenchmarkTools: mean using MarkovProcesses -include(get_module_path() * "/core/_tests_simulate.jl") +include(get_module_path() * "/src/_tests_simulate.jl") str_model = ARGS[1] load_model(str_model) diff --git a/bench/array_memory_order/multiple_sim.jl b/bench/array_memory_order/multiple_sim.jl index 32c75e7..fd4ec42 100644 --- a/bench/array_memory_order/multiple_sim.jl +++ b/bench/array_memory_order/multiple_sim.jl @@ -3,7 +3,7 @@ using BenchmarkTools import BenchmarkTools: mean BenchmarkTools.DEFAULT_PARAMETERS.samples = 20000 using MarkovProcesses -include(get_module_path() * "/core/_tests_simulate.jl") +include(get_module_path() * "/src/_tests_simulate.jl") if ARGS[1] == "SIR" l_var = [:S, :I, :R] diff --git a/bench/array_memory_order/multiple_sim_view.jl b/bench/array_memory_order/multiple_sim_view.jl index 6b1af30..0c853d5 100644 --- a/bench/array_memory_order/multiple_sim_view.jl +++ b/bench/array_memory_order/multiple_sim_view.jl @@ -2,7 +2,7 @@ using BenchmarkTools import BenchmarkTools: mean using MarkovProcesses -include(get_module_path() * "/core/_tests_simulate.jl") +include(get_module_path() * "/src/_tests_simulate.jl") str_model = ARGS[1] load_model(str_model) diff --git a/bench/array_memory_order/read_random_state_trajectory.jl b/bench/array_memory_order/read_random_state_trajectory.jl index 5fe0da5..f714132 100644 --- a/bench/array_memory_order/read_random_state_trajectory.jl +++ b/bench/array_memory_order/read_random_state_trajectory.jl @@ -2,7 +2,7 @@ using BenchmarkTools import BenchmarkTools: mean using MarkovProcesses -include(get_module_path() * "/core/_tests_simulate.jl") +include(get_module_path() * "/src/_tests_simulate.jl") BenchmarkTools.DEFAULT_PARAMETERS.samples = 20000 if ARGS[1] == "SIR" diff --git a/bench/array_memory_order/read_trajectory.jl b/bench/array_memory_order/read_trajectory.jl index c1af4e5..3d8d288 100644 --- a/bench/array_memory_order/read_trajectory.jl +++ b/bench/array_memory_order/read_trajectory.jl @@ -2,7 +2,7 @@ using BenchmarkTools import BenchmarkTools: mean using MarkovProcesses -include(get_module_path() * "/core/_tests_simulate.jl") +include(get_module_path() * "/src/_tests_simulate.jl") BenchmarkTools.DEFAULT_PARAMETERS.samples = 20000 if ARGS[1] == "SIR" diff --git a/bench/array_memory_order/sim.jl b/bench/array_memory_order/sim.jl index 7df223e..4e11475 100644 --- a/bench/array_memory_order/sim.jl +++ b/bench/array_memory_order/sim.jl @@ -3,7 +3,7 @@ using BenchmarkTools import BenchmarkTools: mean BenchmarkTools.DEFAULT_PARAMETERS.samples = 20000 using MarkovProcesses -include(get_module_path() * "/core/_tests_simulate.jl") +include(get_module_path() * "/src/_tests_simulate.jl") if ARGS[1] == "SIR" l_var = [:S, :I, :R] diff --git a/core/MarkovProcesses.jl b/src/MarkovProcesses.jl similarity index 100% rename from core/MarkovProcesses.jl rename to src/MarkovProcesses.jl diff --git a/core/_tests_simulate.jl b/src/_tests_simulate.jl similarity index 100% rename from core/_tests_simulate.jl rename to src/_tests_simulate.jl diff --git a/core/common.jl b/src/common.jl similarity index 100% rename from core/common.jl rename to src/common.jl diff --git a/core/lha.jl b/src/lha.jl similarity index 100% rename from core/lha.jl rename to src/lha.jl diff --git a/core/model.jl b/src/model.jl similarity index 100% rename from core/model.jl rename to src/model.jl diff --git a/core/network_model.jl b/src/network_model.jl similarity index 100% rename from core/network_model.jl rename to src/network_model.jl diff --git a/core/plots.jl b/src/plots.jl similarity index 100% rename from core/plots.jl rename to src/plots.jl diff --git a/core/trajectory.jl b/src/trajectory.jl similarity index 100% rename from core/trajectory.jl rename to src/trajectory.jl diff --git a/core/utils.jl b/src/utils.jl similarity index 92% rename from core/utils.jl rename to src/utils.jl index 4abde85..d333f36 100644 --- a/core/utils.jl +++ b/src/utils.jl @@ -25,7 +25,7 @@ end load_model(name_model::String) = Base.MainInclude.include("$(get_module_path())/models/$(name_model).jl") load_automaton(automaton::String) = Base.MainInclude.include("$(get_module_path())/automata/$(automaton).jl") -load_plots() = Base.MainInclude.include(get_module_path() * "/core/plots.jl") +load_plots() = Base.MainInclude.include(get_module_path() * "/src/plots.jl") newid() = Dates.format(Dates.now(), "YmHMs") diff --git a/test/automaton_abc/distributed_R1.jl b/test/automaton_abc/distributed_R1.jl index 18e0ad0..e88621a 100644 --- a/test/automaton_abc/distributed_R1.jl +++ b/test/automaton_abc/distributed_R1.jl @@ -4,7 +4,7 @@ using Distributed addprocs(2) module_path = get_module_path() @everywhere module_path = $module_path -@everywhere push!(LOAD_PATH, "$(module_path)/core") +@everywhere push!(LOAD_PATH, "$(module_path)/src") @everywhere using MarkovProcesses #= @everywhere begin diff --git a/test/automaton_abc/distributed_abc_euclidean_distance_automaton.jl b/test/automaton_abc/distributed_abc_euclidean_distance_automaton.jl index fc653e7..d3263cb 100644 --- a/test/automaton_abc/distributed_abc_euclidean_distance_automaton.jl +++ b/test/automaton_abc/distributed_abc_euclidean_distance_automaton.jl @@ -4,7 +4,7 @@ using Distributed addprocs(2) module_path = get_module_path() @everywhere module_path = $module_path -@everywhere push!(LOAD_PATH, "$(module_path)/core") +@everywhere push!(LOAD_PATH, "$(module_path)/src") @everywhere using MarkovProcesses import LinearAlgebra: dot diff --git a/test/simulation/sim_er_row_buffer_bounded.jl b/test/simulation/sim_er_row_buffer_bounded.jl index c92dd9e..c359a4f 100644 --- a/test/simulation/sim_er_row_buffer_bounded.jl +++ b/test/simulation/sim_er_row_buffer_bounded.jl @@ -1,6 +1,6 @@ using MarkovProcesses -include(get_module_path() * "/core/_tests_simulate.jl") +include(get_module_path() * "/src/_tests_simulate.jl") using PyPlot load_model("_bench_perf_test/ER_row_buffer") diff --git a/test/simulation/sim_sir_col_buffer_bounded.jl b/test/simulation/sim_sir_col_buffer_bounded.jl index d68f990..eb16829 100644 --- a/test/simulation/sim_sir_col_buffer_bounded.jl +++ b/test/simulation/sim_sir_col_buffer_bounded.jl @@ -1,6 +1,6 @@ using MarkovProcesses -include(get_module_path() * "/core/_tests_simulate.jl") +include(get_module_path() * "/src/_tests_simulate.jl") using PyPlot load_model("_bench_perf_test/SIR_col_buffer") diff --git a/test/simulation/sim_sir_row_buffer_bounded.jl b/test/simulation/sim_sir_row_buffer_bounded.jl index d10633d..50f6b59 100644 --- a/test/simulation/sim_sir_row_buffer_bounded.jl +++ b/test/simulation/sim_sir_row_buffer_bounded.jl @@ -1,6 +1,6 @@ using MarkovProcesses -include(get_module_path() * "/core/_tests_simulate.jl") +include(get_module_path() * "/src/_tests_simulate.jl") using PyPlot load_model("_bench_perf_test/SIR_row_buffer") diff --git a/test/unit/distributed_simulation.jl b/test/unit/distributed_simulation.jl index 06db472..e3504ac 100644 --- a/test/unit/distributed_simulation.jl +++ b/test/unit/distributed_simulation.jl @@ -6,7 +6,7 @@ using MarkovProcesses addprocs(2) module_path = get_module_path() @everywhere module_path = $module_path -@everywhere push!(LOAD_PATH, "$(module_path)/core") +@everywhere push!(LOAD_PATH, "$(module_path)/src") @everywhere using MarkovProcesses test_all = true -- GitLab