From aca23b1f76c4bea6a2c5aa28edfea62f23fd54c2 Mon Sep 17 00:00:00 2001 From: Samuel Brand <48288458+SamuelBrand1@users.noreply.github.com> Date: Fri, 16 Aug 2024 14:39:58 +0100 Subject: [PATCH] Fix the truthdata output to be missing or Int (#429) --- pipeline/src/simulate/TruthSimulationConfig.jl | 2 +- pipeline/test/pipeline/test_pipelinefunctions.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pipeline/src/simulate/TruthSimulationConfig.jl b/pipeline/src/simulate/TruthSimulationConfig.jl index be336d3f1..09dc2203e 100644 --- a/pipeline/src/simulate/TruthSimulationConfig.jl +++ b/pipeline/src/simulate/TruthSimulationConfig.jl @@ -67,7 +67,7 @@ function simulate(config::TruthSimulationConfig) (std = 1.0, cluster_factor = config.cluster_factor, ϵ_t = config.logit_daily_ascertainment)) - y_t = obs_model() + y_t = obs_model() .|> y -> ismissing(y) ? missing : Int(y) #Return the sampled infections and observations diff --git a/pipeline/test/pipeline/test_pipelinefunctions.jl b/pipeline/test/pipeline/test_pipelinefunctions.jl index 76643496f..1a2b87d15 100644 --- a/pipeline/test/pipeline/test_pipelinefunctions.jl +++ b/pipeline/test/pipeline/test_pipelinefunctions.jl @@ -5,7 +5,7 @@ truthdata = fetch.(truthdata_dg_task) @test length(truthdata) == 1 - @test all([data["y_t"] isa Vector{Union{Missing, T}} where {T <: Real} + @test all([data["y_t"] isa Vector{Union{Missing, T}} where {T <: Integer} for data in truthdata]) end