From 0109c2371f4d19d6c9782d377a095aeae3004bd1 Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 1 Jul 2024 12:22:13 +0100 Subject: [PATCH] clean up API exposure --- EpiAware/docs/pages.jl | 12 +++++-- EpiAware/docs/src/lib/EpiAwareBase/index.md | 9 +++++ .../docs/src/lib/EpiAwareBase/internals.md | 23 +++++++++++++ EpiAware/docs/src/lib/EpiAwareBase/public.md | 25 ++++++++++++++ EpiAware/docs/src/lib/EpiAwareUtils/index.md | 9 +++++ .../docs/src/lib/EpiAwareUtils/internals.md | 23 +++++++++++++ EpiAware/docs/src/lib/EpiAwareUtils/public.md | 25 ++++++++++++++ EpiAware/docs/src/lib/EpiInfModels/index.md | 9 +++++ .../docs/src/lib/EpiInfModels/internals.md | 23 +++++++++++++ EpiAware/docs/src/lib/EpiInfModels/public.md | 25 ++++++++++++++ EpiAware/docs/src/lib/EpiInference/index.md | 9 +++++ .../docs/src/lib/EpiInference/internals.md | 23 +++++++++++++ EpiAware/docs/src/lib/EpiInference/public.md | 25 ++++++++++++++ .../docs/src/lib/EpiLatentModels/index.md | 9 +++++ .../docs/src/lib/EpiLatentModels/internals.md | 23 +++++++++++++ .../docs/src/lib/EpiLatentModels/public.md | 25 ++++++++++++++ EpiAware/docs/src/lib/EpiObsModels/index.md | 9 +++++ .../docs/src/lib/EpiObsModels/internals.md | 23 +++++++++++++ EpiAware/docs/src/lib/EpiObsModels/public.md | 25 ++++++++++++++ .../{internals/EpiAware.md => internals.md} | 2 +- .../src/lib/{public/EpiAware.md => public.md} | 0 EpiAware/src/EpiAware.jl | 33 ------------------- 22 files changed, 353 insertions(+), 36 deletions(-) create mode 100644 EpiAware/docs/src/lib/EpiAwareBase/index.md create mode 100644 EpiAware/docs/src/lib/EpiAwareBase/internals.md create mode 100644 EpiAware/docs/src/lib/EpiAwareBase/public.md create mode 100644 EpiAware/docs/src/lib/EpiAwareUtils/index.md create mode 100644 EpiAware/docs/src/lib/EpiAwareUtils/internals.md create mode 100644 EpiAware/docs/src/lib/EpiAwareUtils/public.md create mode 100644 EpiAware/docs/src/lib/EpiInfModels/index.md create mode 100644 EpiAware/docs/src/lib/EpiInfModels/internals.md create mode 100644 EpiAware/docs/src/lib/EpiInfModels/public.md create mode 100644 EpiAware/docs/src/lib/EpiInference/index.md create mode 100644 EpiAware/docs/src/lib/EpiInference/internals.md create mode 100644 EpiAware/docs/src/lib/EpiInference/public.md create mode 100644 EpiAware/docs/src/lib/EpiLatentModels/index.md create mode 100644 EpiAware/docs/src/lib/EpiLatentModels/internals.md create mode 100644 EpiAware/docs/src/lib/EpiLatentModels/public.md create mode 100644 EpiAware/docs/src/lib/EpiObsModels/index.md create mode 100644 EpiAware/docs/src/lib/EpiObsModels/internals.md create mode 100644 EpiAware/docs/src/lib/EpiObsModels/public.md rename EpiAware/docs/src/lib/{internals/EpiAware.md => internals.md} (90%) rename EpiAware/docs/src/lib/{public/EpiAware.md => public.md} (100%) diff --git a/EpiAware/docs/pages.jl b/EpiAware/docs/pages.jl index 848ac79eb..53cdfbdb0 100644 --- a/EpiAware/docs/pages.jl +++ b/EpiAware/docs/pages.jl @@ -6,9 +6,17 @@ pages = [ "Getting started" => "examples/getting_started.md" ] ], - "Reference" => Any[ - "Public API" => "lib/public.md" + "Modules" => [ + "EpiAware" => "lib/EpiAwareBase/index.md", + "EpiAwareUtils" => "lib/EpiAwareUtils/index.md", + "EpiInference" => "lib/EpiInference/index.md", + "EpiInfModels" => "lib/EpiInfModels/index.md", + "EpiLatentModels" => "lib/EpiLatentModels/index.md", + "EpiObsModels" => "lib/EpiObsModels/index.md" ], + "Reference" => Any[ + "Public API" => "lib/public.md", + "Internal API" => "lib/internals.md"], "Developers" => [ "Contributing" => "man/contributing.md", "Release checklist" => "checklist.md", diff --git a/EpiAware/docs/src/lib/EpiAwareBase/index.md b/EpiAware/docs/src/lib/EpiAwareBase/index.md new file mode 100644 index 000000000..38647b4c4 --- /dev/null +++ b/EpiAware/docs/src/lib/EpiAwareBase/index.md @@ -0,0 +1,9 @@ +# EpiAwareBase.jl + +This package provides the core functionality for the EpiAware ecosystem. It is a dependency of all other EpiAware packages. + +## API + +```@contents +Pages = ["lib/EpiAwareBase/public.md", "lib/EpiAwareBase/internals.md"] +``` diff --git a/EpiAware/docs/src/lib/EpiAwareBase/internals.md b/EpiAware/docs/src/lib/EpiAwareBase/internals.md new file mode 100644 index 000000000..f3e6bbb0e --- /dev/null +++ b/EpiAware/docs/src/lib/EpiAwareBase/internals.md @@ -0,0 +1,23 @@ +# Internal Documentation + +Documentation for `EpiAwareBase.jl`'s internal interface. + +## Contents + +```@contents +Pages = ["internals.md"] +Depth = 2:2 +``` + +## Index + +```@index +Pages = ["internals.md"] +``` + +## Internal API + +```@autodocs +Modules = [EpiAware.EpiAwareBase] +Public = false +``` diff --git a/EpiAware/docs/src/lib/EpiAwareBase/public.md b/EpiAware/docs/src/lib/EpiAwareBase/public.md new file mode 100644 index 000000000..133e9f3e5 --- /dev/null +++ b/EpiAware/docs/src/lib/EpiAwareBase/public.md @@ -0,0 +1,25 @@ +# Public Documentation + +Documentation for `EpiAwareBae.jl`'s public interface. + +See the Internals section of the manual for internal package docs covering all submodules. + +## Contents + +```@contents +Pages = ["public.md"] +Depth = 2:2 +``` + +## Index + +```@index +Pages = ["public.md"] +``` + +## Public API + +```@autodocs +Modules = [EpiAware.EpiAwareBase] +Private = false +``` diff --git a/EpiAware/docs/src/lib/EpiAwareUtils/index.md b/EpiAware/docs/src/lib/EpiAwareUtils/index.md new file mode 100644 index 000000000..2adea5919 --- /dev/null +++ b/EpiAware/docs/src/lib/EpiAwareUtils/index.md @@ -0,0 +1,9 @@ +# EpiAwareUtils.jl + +This package provides utility functions for the EpiAware ecosystem. + +## API + +```@contents +Pages = ["lib/EpiAwareUtils/public.md", "lib/EpiAwareUtils/internals.md"] +``` diff --git a/EpiAware/docs/src/lib/EpiAwareUtils/internals.md b/EpiAware/docs/src/lib/EpiAwareUtils/internals.md new file mode 100644 index 000000000..560d13f1e --- /dev/null +++ b/EpiAware/docs/src/lib/EpiAwareUtils/internals.md @@ -0,0 +1,23 @@ +# Internal Documentation + +Documentation for `EpiAwareUtils.jl`'s internal interface. + +## Contents + +```@contents +Pages = ["internals.md"] +Depth = 2:2 +``` + +## Index + +```@index +Pages = ["internals.md"] +``` + +## Internal API + +```@autodocs +Modules = [EpiAware.EpiAwareUtils] +Public = false +``` diff --git a/EpiAware/docs/src/lib/EpiAwareUtils/public.md b/EpiAware/docs/src/lib/EpiAwareUtils/public.md new file mode 100644 index 000000000..133e9f3e5 --- /dev/null +++ b/EpiAware/docs/src/lib/EpiAwareUtils/public.md @@ -0,0 +1,25 @@ +# Public Documentation + +Documentation for `EpiAwareBae.jl`'s public interface. + +See the Internals section of the manual for internal package docs covering all submodules. + +## Contents + +```@contents +Pages = ["public.md"] +Depth = 2:2 +``` + +## Index + +```@index +Pages = ["public.md"] +``` + +## Public API + +```@autodocs +Modules = [EpiAware.EpiAwareBase] +Private = false +``` diff --git a/EpiAware/docs/src/lib/EpiInfModels/index.md b/EpiAware/docs/src/lib/EpiInfModels/index.md new file mode 100644 index 000000000..3952628fd --- /dev/null +++ b/EpiAware/docs/src/lib/EpiInfModels/index.md @@ -0,0 +1,9 @@ +# EpiInfModels.jl + +This package provides infectious disease transmission models for the `EpiAware` ecosystem. + +## API + +```@contents +Pages = ["lib/EpiInfModels/public.md", "lib/EpiInfModels/internals.md"] +``` diff --git a/EpiAware/docs/src/lib/EpiInfModels/internals.md b/EpiAware/docs/src/lib/EpiInfModels/internals.md new file mode 100644 index 000000000..76d68a8db --- /dev/null +++ b/EpiAware/docs/src/lib/EpiInfModels/internals.md @@ -0,0 +1,23 @@ +# Internal Documentation + +Documentation for `EpiInfModels.jl`'s internal interface. + +## Contents + +```@contents +Pages = ["internals.md"] +Depth = 2:2 +``` + +## Index + +```@index +Pages = ["internals.md"] +``` + +## Internal API + +```@autodocs +Modules = [EpiAware.EpiInfModels] +Public = false +``` diff --git a/EpiAware/docs/src/lib/EpiInfModels/public.md b/EpiAware/docs/src/lib/EpiInfModels/public.md new file mode 100644 index 000000000..e6830d624 --- /dev/null +++ b/EpiAware/docs/src/lib/EpiInfModels/public.md @@ -0,0 +1,25 @@ +# Public Documentation + +Documentation for `EpiInfModels.jl`'s public interface. + +See the Internals section of the manual for internal package docs covering all submodules. + +## Contents + +```@contents +Pages = ["public.md"] +Depth = 2:2 +``` + +## Index + +```@index +Pages = ["public.md"] +``` + +## Public API + +```@autodocs +Modules = [EpiAware.EpiInfModels] +Private = false +``` diff --git a/EpiAware/docs/src/lib/EpiInference/index.md b/EpiAware/docs/src/lib/EpiInference/index.md new file mode 100644 index 000000000..ac3319ece --- /dev/null +++ b/EpiAware/docs/src/lib/EpiInference/index.md @@ -0,0 +1,9 @@ +# EpiInference.jl + +This package provides inference algorithms for the `EpiAware` ecosystem. + +## API + +```@contents +Pages = ["lib/EpiInference/public.md", "lib/EpiInference/internals.md"] +``` diff --git a/EpiAware/docs/src/lib/EpiInference/internals.md b/EpiAware/docs/src/lib/EpiInference/internals.md new file mode 100644 index 000000000..36ed48fc3 --- /dev/null +++ b/EpiAware/docs/src/lib/EpiInference/internals.md @@ -0,0 +1,23 @@ +# Internal Documentation + +Documentation for `EpInference.jl`'s internal interface. + +## Contents + +```@contents +Pages = ["internals.md"] +Depth = 2:2 +``` + +## Index + +```@index +Pages = ["internals.md"] +``` + +## Internal API + +```@autodocs +Modules = [EpiInference] +Public = false +``` diff --git a/EpiAware/docs/src/lib/EpiInference/public.md b/EpiAware/docs/src/lib/EpiInference/public.md new file mode 100644 index 000000000..7958efaa2 --- /dev/null +++ b/EpiAware/docs/src/lib/EpiInference/public.md @@ -0,0 +1,25 @@ +# Public Documentation + +Documentation for `EpiInference.jl`'s public interface. + +See the Internals section of the manual for internal package docs covering all submodules. + +## Contents + +```@contents +Pages = ["public.md"] +Depth = 2:2 +``` + +## Index + +```@index +Pages = ["public.md"] +``` + +## Public API + +```@autodocs +Modules = [EpiAware.EpiAwareInference] +Private = false +``` diff --git a/EpiAware/docs/src/lib/EpiLatentModels/index.md b/EpiAware/docs/src/lib/EpiLatentModels/index.md new file mode 100644 index 000000000..b5229462a --- /dev/null +++ b/EpiAware/docs/src/lib/EpiLatentModels/index.md @@ -0,0 +1,9 @@ +# EpiLatentModels.jl + +This package provides latent variable models for the `EpiAware` ecosystem. + +## API + +```@contents +Pages = ["lib/EpiLatentModels/public.md", "lib/EpiLatentModels/internals.md"] +``` diff --git a/EpiAware/docs/src/lib/EpiLatentModels/internals.md b/EpiAware/docs/src/lib/EpiLatentModels/internals.md new file mode 100644 index 000000000..89bc891a0 --- /dev/null +++ b/EpiAware/docs/src/lib/EpiLatentModels/internals.md @@ -0,0 +1,23 @@ +# Internal Documentation + +Documentation for `EpiLatentModels.jl`'s internal interface. + +## Contents + +```@contents +Pages = ["internals.md"] +Depth = 2:2 +``` + +## Index + +```@index +Pages = ["internals.md"] +``` + +## Internal API + +```@autodocs +Modules = [EpiAware.EpiLatentModels] +Public = false +``` diff --git a/EpiAware/docs/src/lib/EpiLatentModels/public.md b/EpiAware/docs/src/lib/EpiLatentModels/public.md new file mode 100644 index 000000000..2b50830a3 --- /dev/null +++ b/EpiAware/docs/src/lib/EpiLatentModels/public.md @@ -0,0 +1,25 @@ +# Public Documentation + +Documentation for `EpiLatentModels.jl`'s public interface. + +See the Internals section of the manual for internal package docs covering all submodules. + +## Contents + +```@contents +Pages = ["public.md"] +Depth = 2:2 +``` + +## Index + +```@index +Pages = ["public.md"] +``` + +## Public API + +```@autodocs +Modules = [EpiAware.EpiLatentModels] +Private = false +``` diff --git a/EpiAware/docs/src/lib/EpiObsModels/index.md b/EpiAware/docs/src/lib/EpiObsModels/index.md new file mode 100644 index 000000000..3d3cafe95 --- /dev/null +++ b/EpiAware/docs/src/lib/EpiObsModels/index.md @@ -0,0 +1,9 @@ +# EpiObsModels.jl + +This package provides observation models for the `EpiAware` ecosystem. + +## API + +```@contents +Pages = ["lib/EpiObsModels/public.md", "lib/EpiObsModels/internals.md"] +``` diff --git a/EpiAware/docs/src/lib/EpiObsModels/internals.md b/EpiAware/docs/src/lib/EpiObsModels/internals.md new file mode 100644 index 000000000..b9dcdd051 --- /dev/null +++ b/EpiAware/docs/src/lib/EpiObsModels/internals.md @@ -0,0 +1,23 @@ +# Internal Documentation + +Documentation for `EpiObsModels.jl`'s internal interface. + +## Contents + +```@contents +Pages = ["internals.md"] +Depth = 2:2 +``` + +## Index + +```@index +Pages = ["internals.md"] +``` + +## Internal API + +```@autodocs +Modules = [EpiAware.EpiObsModels] +Public = false +``` diff --git a/EpiAware/docs/src/lib/EpiObsModels/public.md b/EpiAware/docs/src/lib/EpiObsModels/public.md new file mode 100644 index 000000000..ee9109914 --- /dev/null +++ b/EpiAware/docs/src/lib/EpiObsModels/public.md @@ -0,0 +1,25 @@ +# Public Documentation + +Documentation for `EpiObsModels.jl`'s public interface. + +See the Internals section of the manual for internal package docs covering all submodules. + +## Contents + +```@contents +Pages = ["public.md"] +Depth = 2:2 +``` + +## Index + +```@index +Pages = ["public.md"] +``` + +## Public API + +```@autodocs +Modules = [EpiAware.EpiObsModels] +Private = false +``` diff --git a/EpiAware/docs/src/lib/internals/EpiAware.md b/EpiAware/docs/src/lib/internals.md similarity index 90% rename from EpiAware/docs/src/lib/internals/EpiAware.md rename to EpiAware/docs/src/lib/internals.md index 57ae28f36..2b391d797 100644 --- a/EpiAware/docs/src/lib/internals/EpiAware.md +++ b/EpiAware/docs/src/lib/internals.md @@ -1,4 +1,4 @@ -# internal Documentation +# Internal Documentation Documentation for `EpiAware.jl`'s internal interface. diff --git a/EpiAware/docs/src/lib/public/EpiAware.md b/EpiAware/docs/src/lib/public.md similarity index 100% rename from EpiAware/docs/src/lib/public/EpiAware.md rename to EpiAware/docs/src/lib/public.md diff --git a/EpiAware/src/EpiAware.jl b/EpiAware/src/EpiAware.jl index fcd55bd3f..558ac0539 100644 --- a/EpiAware/src/EpiAware.jl +++ b/EpiAware/src/EpiAware.jl @@ -1,36 +1,3 @@ -""" - module EpiAware - -`EpiAware` provides functionality for fitting epidemiological models to data. It is built on - top of the `Turing` probabilistic programming language, and provides a set of utilities - for constructing and fitting models to data. - -## Core model structure - -An epidemiological model in `EpiAware` consists of composable structs with core abstract - types. The core types are: -1. `AbstractModel`: This overarching type is used to abstract `Turing` models and is - inherited by the other abstract types we use. -2. `AbstractTuringEpiModel`: Subtypes of this abstract type represent different models for the - spread of an infectious disease. Each model type has a corresponding - `make_epi_aware` function that constructs a `Turing` model for fitting the - model to data. Implemented concrete subtypes: - - `Renewal`: A renewal process model for the spread of an infectious disease. - - `ExpGrowthRate`: An exponential growth rate model for the spread of an infectious - disease. - - `DirectInfections`: A model for the spread of an infectious disease based on modelling - direct infections. -3. `AbstractLatentModel`: Subtypes of this abstract type represent different latent - processes that can be used in an epidemiological model. Implemented concrete subtype: - - `RandomWalk`: A random walk latent process. -4. `AbstractObservationModel`: Subtypes of this abstract type represent different - observation models that can be used in an epidemiological model. - Implemented concrete subtypes: - - `DelayObservation`: An observation process that models the delay between the time - of infection and the time of observation as a convolution, followed by a negative - binomial distributed sample. - -""" module EpiAware # Non-submodule imports