Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Moelf committed Oct 24, 2024
1 parent 169756d commit ab50514
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 8 deletions.
18 changes: 18 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,21 @@ SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
Unrolled = "9602ed7d-8fef-5bc8-8597-8f21381861e8"
ValueShapes = "136a8f8c-c49b-4edb-8b98-f3d64d48be8f"

[sources]
LiteHF = {url = "https://github.com/JuliaHEP/LiteHF.jl/"}

[compat]
BAT = "3"
CSV = "0.10"
LiteHF = "0.1.0"
julia = "1.11"

[extras]
LiteHF = "87f02e12-f6bc-4038-9bdd-797fa8455fab"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Pkg", "Random", "Test", "LiteHF"]
4 changes: 0 additions & 4 deletions test/Project.toml

This file was deleted.

4 changes: 2 additions & 2 deletions test/test_PyHF.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ using Test
using LiteHF, BAT
using DensityInterface
#@testset "LiteHF" begin
LiteHF_pydict = load_pyhfjson("./test/sample_staterror_shapesys_LiteHF.json");
LiteHF_pydict = load_pyhfjson(joinpath(@__DIR__, "sample_staterror_shapesys_LiteHF.json"));
LiteHF_pyhfmodel = build_pyhf(LiteHF_pydict);
LiteHF_LL = pyhf_logjointof(LiteHF_pyhfmodel)
LiteHF_likelihood(αs) = PosteriorMeasure(LL(αs))
LiteHF_posterior = PosteriorDensity(LiteHF_LL, LiteHF_pyhfmodel.priors)
LiteHF_LL([1., 1., 1., 1., 1.])
HS3_dict = file_to_dict("./test/sample_staterror_shapesys_HS3.json")
HS3_dict = file_to_dict(joinpath(@__DIR__, "sample_staterror_shapesys_HS3.json"))
HS3_specs = HS3.generate_specs(HS3_dict)
#likelihood = HS3.make_likelihood(HS3_specs.likelihoods[1], HS3_specs.distributions, HS3_specs.data)
analysis = HS3.make_analyses(HS3_specs.analyses[1], HS3_specs)
Expand Down
3 changes: 1 addition & 2 deletions test/test_histfactll.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# This file is a part of HS3.jl, licensed under the MIT License (MIT).
using HS3
using Test
using LiteHF
using DensityInterface
using LiteHF

Expand All @@ -21,4 +20,4 @@ mu_1 = logdensityof(analysis.likelihood, (mu=1., syst3 = 0., syst1 = 0., syst2


303/19
185.1122/16.529
185.1122/16.529

0 comments on commit ab50514

Please sign in to comment.