From 249e4cb8bd58c86c4ca9e8d2ffb762f78d10c1bf Mon Sep 17 00:00:00 2001 From: Romain Simon <93144534+romainljsimon@users.noreply.github.com> Date: Fri, 7 Nov 2025 17:58:58 +0100 Subject: [PATCH 1/9] Test to check if particlesmc is in path --- test/runtests.jl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index deb94b6..4d20a33 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -6,6 +6,12 @@ using Distributions using ComponentArrays using DelimitedFiles +@testset "Running from CLI" begin + @test success(`bash -c "command -v particlesmc"`) + @test success(`particlesMC params.toml`) +end + + @testset "Potential energy test" begin # Test inital configuration chains_el = load_chains("config_0.exyz", args=Dict("temperature" => [0.231], "model" => ["JBB"], "list_type" => "EmptyList")) @@ -165,4 +171,6 @@ end energy_ll = readdlm(path_energy_ll)[:, 2] @test isapprox(energy_el, energy_ll, atol=1e-6) -end \ No newline at end of file +end + + From f8cd74ffd531b8f89064b9af1ee45d67a340b10f Mon Sep 17 00:00:00 2001 From: Romain Simon <93144534+romainljsimon@users.noreply.github.com> Date: Fri, 7 Nov 2025 18:14:05 +0100 Subject: [PATCH 2/9] build package --- test/runtests.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/test/runtests.jl b/test/runtests.jl index 4d20a33..714a20a 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -7,6 +7,7 @@ using ComponentArrays using DelimitedFiles @testset "Running from CLI" begin + ParticlesMC.comonicon_install(); @test success(`bash -c "command -v particlesmc"`) @test success(`particlesMC params.toml`) end From fdbfbee2b4d6bd0e475798ae214c6a795182ce90 Mon Sep 17 00:00:00 2001 From: Romain Simon <93144534+romainljsimon@users.noreply.github.com> Date: Fri, 7 Nov 2025 19:08:49 +0100 Subject: [PATCH 3/9] Add julia/bin/ to PATH --- test/runtests.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index 714a20a..9e42139 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -7,7 +7,7 @@ using ComponentArrays using DelimitedFiles @testset "Running from CLI" begin - ParticlesMC.comonicon_install(); + ENV["PATH"] = "~/.julia/bin:" * ENV["PATH"] @test success(`bash -c "command -v particlesmc"`) @test success(`particlesMC params.toml`) end From e772bee0fa5cab612d5a41d3e8f12f4b234b1b42 Mon Sep 17 00:00:00 2001 From: Romain Simon <93144534+romainljsimon@users.noreply.github.com> Date: Fri, 7 Nov 2025 20:05:46 +0100 Subject: [PATCH 4/9] Add julia/local/ to PATH --- test/runtests.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/test/runtests.jl b/test/runtests.jl index 9e42139..9386bf4 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -8,6 +8,7 @@ using DelimitedFiles @testset "Running from CLI" begin ENV["PATH"] = "~/.julia/bin:" * ENV["PATH"] + ENV["PATH"] = "~/.julia/local:" * ENV["PATH"] @test success(`bash -c "command -v particlesmc"`) @test success(`particlesMC params.toml`) end From 5b11bf837ec1d0157edb9204d8842c2ea035913c Mon Sep 17 00:00:00 2001 From: Romain Simon <93144534+romainljsimon@users.noreply.github.com> Date: Mon, 10 Nov 2025 10:45:17 +0100 Subject: [PATCH 5/9] Understand hub PATH --- test/runtests.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/test/runtests.jl b/test/runtests.jl index 9386bf4..16db5f5 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -7,6 +7,7 @@ using ComponentArrays using DelimitedFiles @testset "Running from CLI" begin + println(ENV["PATH"]) ENV["PATH"] = "~/.julia/bin:" * ENV["PATH"] ENV["PATH"] = "~/.julia/local:" * ENV["PATH"] @test success(`bash -c "command -v particlesmc"`) From e3cc4b7fdd78b850a6d0bcc358915924f31e3e35 Mon Sep 17 00:00:00 2001 From: Romain Simon <93144534+romainljsimon@users.noreply.github.com> Date: Mon, 10 Nov 2025 10:50:00 +0100 Subject: [PATCH 6/9] Add /home/runner --- test/runtests.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index 16db5f5..cc593e0 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -7,9 +7,11 @@ using ComponentArrays using DelimitedFiles @testset "Running from CLI" begin - println(ENV["PATH"]) ENV["PATH"] = "~/.julia/bin:" * ENV["PATH"] ENV["PATH"] = "~/.julia/local:" * ENV["PATH"] + #For GitHub actions + ENV["PATH"] = "/home/runner/.julia/bin:" * ENV["PATH"] + ENV["PATH"] = "/home/runner/.julia/local:" * ENV["PATH"] @test success(`bash -c "command -v particlesmc"`) @test success(`particlesMC params.toml`) end From 2c084d1dcea94b725a4de3039bf89e77a5a5a3e7 Mon Sep 17 00:00:00 2001 From: Romain Simon <93144534+romainljsimon@users.noreply.github.com> Date: Mon, 10 Nov 2025 10:57:03 +0100 Subject: [PATCH 7/9] Use expanduser --- test/runtests.jl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index cc593e0..7ea0642 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -7,11 +7,11 @@ using ComponentArrays using DelimitedFiles @testset "Running from CLI" begin - ENV["PATH"] = "~/.julia/bin:" * ENV["PATH"] - ENV["PATH"] = "~/.julia/local:" * ENV["PATH"] - #For GitHub actions - ENV["PATH"] = "/home/runner/.julia/bin:" * ENV["PATH"] - ENV["PATH"] = "/home/runner/.julia/local:" * ENV["PATH"] + path_sep = Sys.iswindows() ? ";" : ":" + julia_bin = expanduser("~/.julia/bin") + julia_local = expanduser("~/.julia/local") + ENV["PATH"] = ENV["PATH"] * path_sep * julia_bin + ENV["PATH"] = ENV["PATH"] * path_sep * julia_local @test success(`bash -c "command -v particlesmc"`) @test success(`particlesMC params.toml`) end From 3e2c5b4a95749c5a0fb9bd9373b970b69ba1c8fb Mon Sep 17 00:00:00 2001 From: Romain Simon <93144534+romainljsimon@users.noreply.github.com> Date: Mon, 10 Nov 2025 11:15:54 +0100 Subject: [PATCH 8/9] =?UTF-8?q?Building=20the=20package=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Project.toml | 4 +++- test/runtests.jl | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index b5160e5..88b33a7 100644 --- a/Project.toml +++ b/Project.toml @@ -32,11 +32,13 @@ Statistics = "1.9" TOML = "1" Test = "1.9" julia = "1.9" +Pkg = "1.9" [extras] Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" +Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" [targets] -test = ["Test", "DelimitedFiles", "Aqua"] +test = ["Test", "DelimitedFiles", "Aqua", "Pkg"] diff --git a/test/runtests.jl b/test/runtests.jl index 7ea0642..4c80c4e 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -5,13 +5,13 @@ using StaticArrays using Distributions using ComponentArrays using DelimitedFiles +using Pkg @testset "Running from CLI" begin + Pkg.build("ParticlesMC") path_sep = Sys.iswindows() ? ";" : ":" julia_bin = expanduser("~/.julia/bin") - julia_local = expanduser("~/.julia/local") ENV["PATH"] = ENV["PATH"] * path_sep * julia_bin - ENV["PATH"] = ENV["PATH"] * path_sep * julia_local @test success(`bash -c "command -v particlesmc"`) @test success(`particlesMC params.toml`) end From b8991b7fd934c8097b32136bd73ac386381ec380 Mon Sep 17 00:00:00 2001 From: Romain Simon <93144534+romainljsimon@users.noreply.github.com> Date: Mon, 10 Nov 2025 11:21:54 +0100 Subject: [PATCH 9/9] Typo --- test/runtests.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index 4c80c4e..2b0f915 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -13,7 +13,7 @@ using Pkg julia_bin = expanduser("~/.julia/bin") ENV["PATH"] = ENV["PATH"] * path_sep * julia_bin @test success(`bash -c "command -v particlesmc"`) - @test success(`particlesMC params.toml`) + @test success(`particlesmc params.toml`) end