diff --git a/README.adoc b/README.adoc index 2f9c5b4..629e432 100644 --- a/README.adoc +++ b/README.adoc @@ -38,8 +38,9 @@ If specified otherwise, an environment in a subdirectory has to be activated ins [source,julia] ---- +cd("SUBDIRECTORY") using Pkg -Pkg.activate("SUBDIRECTORY") +Pkg.activate(".") ---- === Install/update dependencies @@ -97,7 +98,7 @@ To generate an animation of a simulation, run the following: [source,julia] ---- -include("visualization/Animation.jl") +include("Animation.jl") using .Animation animate(sim_dir) ---- @@ -110,7 +111,7 @@ To plot only one snapshot of a simulation, run the following: [source,julia] ---- -include("visualization/SnapshotPlot.jl") +include("SnapshotPlot.jl") using .SnapshotPlot plot_snapshot(sim_dir) ---- @@ -152,7 +153,7 @@ To plot the rewards, activate the environment of the subdirectory `visualization [source,julia] ---- -include("visualization/RewardsPlot.jl") +include("RewardsPlot.jl") using .RewardsPlot plot_rewards(rl_dir) ---- @@ -165,7 +166,7 @@ To plot the mean of kappa as the ratio of the eigenvalues of the gyration tensor [source,julia] ---- -include("analysis/mean_kappa.jl") +include("mean_kappa.jl") plot_mean_κ(; rl_dir=rl_dir, n_last_episodes=N_LAST_EPISODES) ---- @@ -179,7 +180,7 @@ First, activate the environment of the subdirectory `analysis`. [source,julia] ---- -include("analysis/mean_squared_displacement.jl") +include("mean_squared_displacement.jl") run_msd_analysis() run_random_walk() ---- @@ -190,7 +191,7 @@ The output is `exports/graphics/mean_squared_displacement.pdf` and `exports/grap [source,julia] ---- -include("analysis/radial_distribution_function/radial_distribution_function.jl") +include("radial_distribution_function/radial_distribution_function.jl") run_radial_distribution_analysis() ---- @@ -200,7 +201,7 @@ The output is `exports/graphics/radial_distribution.pdf` and `exports/graphics/r [source,julia] ---- -include("analysis/reward_discount_analysis.jl") +include("reward_discount_analysis.jl") run_reward_discount_analysis() ---- diff --git a/analysis/Manifest.toml b/analysis/Manifest.toml index 3c4604d..5071f2e 100644 --- a/analysis/Manifest.toml +++ b/analysis/Manifest.toml @@ -1177,9 +1177,9 @@ version = "0.4.3" [[deps.ReCo]] deps = ["CellListMap", "Dates", "Distributions", "Flux", "Intervals", "JLD2", "LaTeXStrings", "LinearAlgebra", "ProgressMeter", "Random", "ReinforcementLearning", "StaticArrays", "UnicodePlots"] -git-tree-sha1 = "42e2dcd54bfde978a7652ad502e981533470aa85" +git-tree-sha1 = "ba8cf7e8c6968aedad9c097aa8559ed054803bde" repo-rev = "main" -repo-url = "https://gitlab.rlp.net/mobitar/ReCo.jl" +repo-url = ".." uuid = "b25f7548-fcc9-4c91-bc24-841b54f4dd54" version = "0.5.0" diff --git a/graphics/CairoMakie_graphics/Manifest.toml b/graphics/CairoMakie_graphics/Manifest.toml index adf07f5..00e8b5f 100644 --- a/graphics/CairoMakie_graphics/Manifest.toml +++ b/graphics/CairoMakie_graphics/Manifest.toml @@ -1136,9 +1136,9 @@ version = "0.4.3" [[deps.ReCo]] deps = ["CellListMap", "Dates", "Distributions", "Flux", "Intervals", "JLD2", "LaTeXStrings", "LinearAlgebra", "ProgressMeter", "Random", "ReinforcementLearning", "StaticArrays", "UnicodePlots"] -git-tree-sha1 = "42e2dcd54bfde978a7652ad502e981533470aa85" +git-tree-sha1 = "ba8cf7e8c6968aedad9c097aa8559ed054803bde" repo-rev = "main" -repo-url = "https://gitlab.rlp.net/mobitar/ReCo.jl" +repo-url = "../.." uuid = "b25f7548-fcc9-4c91-bc24-841b54f4dd54" version = "0.5.0" diff --git a/graphics/Luxor_graphics/Manifest.toml b/graphics/Luxor_graphics/Manifest.toml index bc97e2d..dcbf75a 100644 --- a/graphics/Luxor_graphics/Manifest.toml +++ b/graphics/Luxor_graphics/Manifest.toml @@ -931,9 +931,9 @@ version = "1.5.3" [[deps.ReCo]] deps = ["CellListMap", "Dates", "Distributions", "Flux", "Intervals", "JLD2", "LaTeXStrings", "LinearAlgebra", "ProgressMeter", "Random", "ReinforcementLearning", "StaticArrays", "UnicodePlots"] -git-tree-sha1 = "42e2dcd54bfde978a7652ad502e981533470aa85" +git-tree-sha1 = "ba8cf7e8c6968aedad9c097aa8559ed054803bde" repo-rev = "main" -repo-url = "https://gitlab.rlp.net/mobitar/ReCo.jl" +repo-url = "../.." uuid = "b25f7548-fcc9-4c91-bc24-841b54f4dd54" version = "0.5.0" diff --git a/graphics/Luxor_graphics/center_of_mass.jl b/graphics/Luxor_graphics/center_of_mass.jl index 9967b78..56f8dd6 100644 --- a/graphics/Luxor_graphics/center_of_mass.jl +++ b/graphics/Luxor_graphics/center_of_mass.jl @@ -33,7 +33,7 @@ function gen_COM_graphics() ## - graphics_export_dir = "exports/graphics/COM" + graphics_export_dir = "../../exports/graphics/COM" mkpath(graphics_export_dir) Drawing(box_length, box_height, "$graphics_export_dir/linear.pdf") diff --git a/graphics/Luxor_graphics/periodic_boundary_conditions.jl b/graphics/Luxor_graphics/periodic_boundary_conditions.jl index 34d489c..f8becdf 100644 --- a/graphics/Luxor_graphics/periodic_boundary_conditions.jl +++ b/graphics/Luxor_graphics/periodic_boundary_conditions.jl @@ -9,7 +9,7 @@ function gen_periodic_boundary_conditions_graphics() drawing_box_length = 300 - graphics_export_dir = "exports/graphics" + graphics_export_dir = "../../exports/graphics" mkpath(graphics_export_dir) Drawing( diff --git a/graphics/Luxor_graphics/radial_distribution.jl b/graphics/Luxor_graphics/radial_distribution.jl index e7a1648..5084fa2 100644 --- a/graphics/Luxor_graphics/radial_distribution.jl +++ b/graphics/Luxor_graphics/radial_distribution.jl @@ -9,7 +9,7 @@ function gen_rdf_graphics() box_length = 100 - graphics_export_dir = "exports/graphics" + graphics_export_dir = "../../exports/graphics" mkpath(graphics_export_dir) Drawing(box_length, box_length, "$graphics_export_dir/rdf_shells.pdf") diff --git a/graphics/Luxor_graphics/verlet_and_cell_lists.jl b/graphics/Luxor_graphics/verlet_and_cell_lists.jl index 1dbd019..36e429a 100644 --- a/graphics/Luxor_graphics/verlet_and_cell_lists.jl +++ b/graphics/Luxor_graphics/verlet_and_cell_lists.jl @@ -9,7 +9,7 @@ function gen_verlet_and_cell_lists_graphics() box_length = 100 - graphics_export_dir = "exports/graphics" + graphics_export_dir = "../../exports/graphics" mkpath(graphics_export_dir) Drawing(box_length, box_length, "$graphics_export_dir/verlet_and_cell_lists.pdf") diff --git a/performance/Benchmark.jl b/performance/Benchmark.jl index 8866335..8d8cade 100644 --- a/performance/Benchmark.jl +++ b/performance/Benchmark.jl @@ -26,7 +26,7 @@ function run_benchmarks( display(benchmark) - open("exports/benchmark.txt", "a+") do f + open("../exports/benchmark.txt", "a+") do f JSON3.pretty( f, Dict( diff --git a/performance/Manifest.toml b/performance/Manifest.toml index b4ae773..fefd833 100644 --- a/performance/Manifest.toml +++ b/performance/Manifest.toml @@ -965,9 +965,9 @@ version = "1.5.3" [[deps.ReCo]] deps = ["CellListMap", "Dates", "Distributions", "Flux", "Intervals", "JLD2", "LaTeXStrings", "LinearAlgebra", "ProgressMeter", "Random", "ReinforcementLearning", "StaticArrays", "UnicodePlots"] -git-tree-sha1 = "42e2dcd54bfde978a7652ad502e981533470aa85" +git-tree-sha1 = "ba8cf7e8c6968aedad9c097aa8559ed054803bde" repo-rev = "main" -repo-url = "https://gitlab.rlp.net/mobitar/ReCo.jl" +repo-url = ".." uuid = "b25f7548-fcc9-4c91-bc24-841b54f4dd54" version = "0.5.0" diff --git a/scripts/projects.txt b/scripts/projects.txt index 3a04ecf..dcd3697 100644 --- a/scripts/projects.txt +++ b/scripts/projects.txt @@ -1,7 +1,7 @@ . -test analysis graphics/CairoMakie_graphics graphics/Luxor_graphics performance +test visualization diff --git a/scripts/update.jl b/scripts/update.jl index 7c544e3..8a3dbe8 100644 --- a/scripts/update.jl +++ b/scripts/update.jl @@ -2,9 +2,11 @@ using Pkg: Pkg function update() projects = readlines("scripts/projects.txt") + base_dir = pwd() for project in projects - Pkg.activate(project) + cd(joinpath(base_dir, project)) + Pkg.activate(".") Pkg.update() end diff --git a/visualization/Animation.jl b/visualization/Animation.jl index ae63461..8bf0869 100644 --- a/visualization/Animation.jl +++ b/visualization/Animation.jl @@ -54,7 +54,6 @@ function animate_bundle!(args, sim_consts::ReCo.SimConsts) end if args.n_bundle == 1 && bundle_snapshot == 1 - println("OK") scatter!( args.ax, args.particle_xs, diff --git a/visualization/Manifest.toml b/visualization/Manifest.toml index a10ed7e..446c6a9 100644 --- a/visualization/Manifest.toml +++ b/visualization/Manifest.toml @@ -1172,9 +1172,9 @@ version = "0.4.3" [[deps.ReCo]] deps = ["CellListMap", "Dates", "Distributions", "Flux", "Intervals", "JLD2", "LaTeXStrings", "LinearAlgebra", "ProgressMeter", "Random", "ReinforcementLearning", "StaticArrays", "UnicodePlots"] -git-tree-sha1 = "42e2dcd54bfde978a7652ad502e981533470aa85" +git-tree-sha1 = "ba8cf7e8c6968aedad9c097aa8559ed054803bde" repo-rev = "main" -repo-url = "https://gitlab.rlp.net/mobitar/ReCo.jl" +repo-url = ".." uuid = "b25f7548-fcc9-4c91-bc24-841b54f4dd54" version = "0.5.0" diff --git a/visualization/common_CairoMakie.jl b/visualization/common_CairoMakie.jl index d183db6..7c447bc 100644 --- a/visualization/common_CairoMakie.jl +++ b/visualization/common_CairoMakie.jl @@ -22,7 +22,7 @@ function set_gaps!(fig::Figure) return nothing end -function save_fig(filename::String, fig::Figure; parent_dir="exports/graphics") +function save_fig(filename::String, fig::Figure; parent_dir="../exports/graphics") mkpath(parent_dir) save("$parent_dir/$filename", fig; pt_per_unit=1)