Skip to content

Commit

Permalink
rename pipeline package to EpiAwarePipeline (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelBrand1 authored May 21, 2024
1 parent 6151772 commit 2d3b4c8
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion pipeline/Project.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name = "AnalysisPipeline"
name = "EpiAwarePipeline"
uuid = "66314692-3678-4cbb-b3ac-6fcb54505317"
authors = ["Sam Abbott", "Sam Brand", "Zach Susswein"]

Expand Down
2 changes: 1 addition & 1 deletion pipeline/scripts/run_pipeline.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ using Dagger
using Distributed
pids = addprocs(; exeflags = ["--project=$(Base.active_project())"])

@everywhere using AnalysisPipeline
@everywhere using EpiAwarePipeline

# Create an instance of the pipeline behaviour
pipeline = RtwithoutRenewalPipeline()
Expand Down
2 changes: 1 addition & 1 deletion pipeline/scripts/run_priorpred_pipeline.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ using Dagger
using Distributed
pids = addprocs(; exeflags = ["--project=$(Base.active_project())"])

@everywhere using AnalysisPipeline
@everywhere using EpiAwarePipeline

# Create an instance of the pipeline behaviour
pipeline = RtwithoutRenewalPriorPipeline()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ In this module the meaning of a _pipeline component_ is a directed-acylic-graph
sub-type from a function with prefix `do_`. A full pipeline is a sequence of DAGs,
with execution determined by available computational resources.
"""
module AnalysisPipeline
module EpiAwarePipeline

using CSV, Dagger, DataFramesMeta, Dates, Distributions, DocStringExtensions, DrWatson,
EpiAware, Plots, Statistics, ADTypes, AbstractMCMC, Plots, JLD2
Expand Down
20 changes: 10 additions & 10 deletions pipeline/test/constructors/test_constructors.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@testset "make_gi_params: returns a dictionary with correct keys" begin
using AnalysisPipeline
using EpiAwarePipeline
pipeline = RtwithoutRenewalPipeline()
params = make_gi_params(pipeline)

Expand All @@ -9,30 +9,30 @@
end

@testset "make_inf_generating_processes" begin
using AnalysisPipeline, EpiAware
using EpiAwarePipeline, EpiAware
pipeline = RtwithoutRenewalPipeline()
igps = make_inf_generating_processes(pipeline)
@test igps == [DirectInfections, ExpGrowthRate, Renewal]
end

@testset "make_Rt: returns an array" begin
using AnalysisPipeline
using EpiAwarePipeline
pipeline = RtwithoutRenewalPipeline()

Rt = make_Rt(pipeline)
@test Rt isa Array
end

@testset "default_tspan: returns an Tuple{Integer, Integer}" begin
using AnalysisPipeline
using EpiAwarePipeline
pipeline = RtwithoutRenewalPipeline()

tspan = make_tspan(pipeline)
@test tspan isa Tuple{Integer, Integer}
end

@testset "make_latent_model_priors: generates a dict with correct keys and distributions" begin
using AnalysisPipeline, Distributions
using EpiAwarePipeline, Distributions
pipeline = RtwithoutRenewalPipeline()

priors_dict = make_latent_model_priors(pipeline)
Expand All @@ -47,7 +47,7 @@ end
end

@testset "make_epiaware_name_model_pairs: generates a vector of Pairs with correct keys and latent models" begin
using AnalysisPipeline, EpiAware
using EpiAwarePipeline, EpiAware
pipeline = RtwithoutRenewalPipeline()

namemodel_vect = make_epiaware_name_model_pairs(pipeline)
Expand All @@ -57,7 +57,7 @@ end
end

@testset "make_inference_method: constructor and defaults" begin
using AnalysisPipeline, EpiAware, ADTypes, AbstractMCMC
using EpiAwarePipeline, EpiAware, ADTypes, AbstractMCMC
pipeline = RtwithoutRenewalPipeline()

method = make_inference_method(pipeline)
Expand All @@ -74,7 +74,7 @@ end
end

@testset "make_inference_method: for prior predictive checking" begin
using AnalysisPipeline, EpiAware, ADTypes, AbstractMCMC
using EpiAwarePipeline, EpiAware, ADTypes, AbstractMCMC
pipeline = RtwithoutRenewalPriorPipeline()

method = make_inference_method(pipeline)
Expand All @@ -84,7 +84,7 @@ end
end

@testset "make_truth_data_configs" begin
using AnalysisPipeline
using EpiAwarePipeline
pipeline = RtwithoutRenewalPipeline()
@testset "make_truth_data_configs should return a dictionary" begin
config_dicts = make_truth_data_configs(pipeline)
Expand All @@ -99,7 +99,7 @@ end
end

@testset "default inference configurations" begin
using AnalysisPipeline
using EpiAwarePipeline
pipeline = RtwithoutRenewalPipeline()

inference_configs = make_inference_configs(pipeline)
Expand Down
2 changes: 1 addition & 1 deletion pipeline/test/infer/test_InferenceConfig.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# Test the InferenceConfig struct constructor
@testset "InferenceConfig" begin
using Distributions, AnalysisPipeline, EpiAware
using Distributions, EpiAwarePipeline, EpiAware

struct TestLatentModel <: AbstractLatentModel
end
Expand Down
2 changes: 1 addition & 1 deletion pipeline/test/pipeline/test_pipelinetypes.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@testset "EpiAwarePipeline Tests" begin
using AnalysisPipeline
using EpiAwarePipeline
@testset "AbstractEpiAwarePipeline" begin
@test_throws MethodError AbstractEpiAwarePipeline()
end
Expand Down
2 changes: 1 addition & 1 deletion pipeline/test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using DrWatson, Test
quickactivate(@__DIR__(), "AnalysisPipeline")
quickactivate(@__DIR__(), "EpiAwarePipeline")

# Run tests
include("pipeline/test_pipelinetypes.jl");
Expand Down
2 changes: 1 addition & 1 deletion pipeline/test/simulate/test_SimulationConfig.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# Test the TruthSimulationConfig struct constructor
@testset "TruthSimulationConfig" begin
using Distributions, AnalysisPipeline, EpiAware
using Distributions, EpiAwarePipeline, EpiAware
gi = Gamma(2, 2)
config = TruthSimulationConfig(
truth_process = [0.5, 0.8, 1.2], gi_mean = 3.0, gi_std = 2.0)
Expand Down
4 changes: 2 additions & 2 deletions pipeline/test/simulate/test_TruthSimulationConfig.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@testset "simulate runs" begin
using Distributions, AnalysisPipeline, EpiAware
using Distributions, EpiAwarePipeline, EpiAware
# Define a mock TruthSimulationConfig object for testing
config = TruthSimulationConfig(
truth_process = fill(1.5, 10), gi_mean = 2.0, gi_std = 2.0)
Expand All @@ -19,7 +19,7 @@
end

@testset "generate_truthdata" begin
using AnalysisPipeline
using EpiAwarePipeline
pipeline = RtwithoutRenewalPipeline()
truth_data_config = Dict("gi_mean" => 0.5, "gi_std" => 0.1)
truthdata = generate_truthdata(truth_data_config, pipeline)
Expand Down
4 changes: 2 additions & 2 deletions pipeline/test/test_full_inference.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Test
@testset "run inference for random scenario with short toy data" begin
using DrWatson
quickactivate(@__DIR__(), "AnalysisPipeline")
quickactivate(@__DIR__(), "EpiAwarePipeline")

using AnalysisPipeline
using EpiAwarePipeline
pipeline = RtwithoutRenewalPipeline()

tspan = (1, 28)
Expand Down
4 changes: 2 additions & 2 deletions pipeline/test/test_prior_predictive.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ using Test
@testset "run prior predictive modelling for random scenario" begin
using DrWatson, EpiAware
quickactivate(@__DIR__(), "Analysis pipeline")
include(srcdir("AnalysisPipeline.jl"))
include(srcdir("EpiAwarePipeline.jl"))

using AnalysisPipeline
using EpiAwarePipeline
pipeline = RtwithoutRenewalPriorPipeline()

tspan = (1, 28)
Expand Down

0 comments on commit 2d3b4c8

Please sign in to comment.