Skip to content

Commit

Permalink
2024-07-27 update : paged tutorials and rmv compat and tagbot.
Browse files Browse the repository at this point in the history
  • Loading branch information
cbernalz committed Jul 27, 2024
1 parent 14d5b8b commit 269a55b
Show file tree
Hide file tree
Showing 13 changed files with 124 additions and 153 deletions.
19 changes: 5 additions & 14 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ name: CI
on:
push:
branches:
- master
- main
tags: ['*']
pull_request:
workflow_dispatch:
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
Expand All @@ -15,31 +14,23 @@ jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
permissions: # needed to allow julia-actions/cache to proactively delete old caches that it has created
actions: write
contents: read
strategy:
fail-fast: false
matrix:
version:
- '1.0'
- '1.9'
- 'nightly'
- '1.10'
- '~1.11.0-0'
os:
- ubuntu-latest
arch:
- x64
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v3
with:
files: lcov.info
- uses: julia-actions/julia-runtest@v1
16 changes: 0 additions & 16 deletions .github/workflows/CompatHelper.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/TagBot.yml

This file was deleted.

1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ version = "1.0.0-DEV"
[deps]
AxisArrays = "39de3d68-74b9-583c-8d2d-e117c070f3a9"
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Expand Down
10 changes: 9 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,18 @@ makedocs(;
format = Documenter.HTML(;
prettyurls = get(ENV, "CI", "false") == "true",
repolink = "https://cbernalz.github.io/UCIWWEIHR.jl",
size_threshold_warn = nothing,
size_threshold = nothing # Increase this value
),
pages = [
"HOME" => "index.md",
"TUTORIAL" => "tutorial.md",
"TUTORIALS" => [
"TUTORIAL CONTENTS" => "tutorial_index.md",
"GETTING STARTED" => "tutorials/getting_started.md",
"UCIWWEIHR SIMULATION DATA" => "tutorials/uciwweihr_simulation_data.md",
"AGENT-BASED SIMULATION DATA" => "tutorials/agent_based_simulation_data.md",
]
,
"NEWS" => "news.md",
"PACKAGE DEVELOPMENT" => "package_development.md",
"REFERENCE" => "reference.md",
Expand Down
85 changes: 0 additions & 85 deletions docs/src/tutorial.md

This file was deleted.

11 changes: 11 additions & 0 deletions docs/src/tutorial_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# [Tutorial Contents](@id tutorial_home)

Future Description.

## Contents

- [Getting Started](@ref getting_started)
- [Generating simulated data with UCIWWEIHR ODE compartmental based model.](@ref uciwweihr_simulation_data)
- [Generating simulated data with an agent based model.](@ref agent_based_simulation_data)


32 changes: 32 additions & 0 deletions docs/src/tutorials/agent_based_simulation_data.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# [Generating simulated data with an agent based model.](@id agent_based_simulation_data)

This package provides a way to also simulate data using the agent based model in the future paper. The function called `generate_simulation_data_agent.jl` can be used to generate synthetic data for a given population size and features. Here we provide a demonstration using the default settings of `generate_simulation_data_agent.jl` :


## 1. Functionality.

``` @example tutorial
using UCIWWEIHR
using Plots
# Running simulation function with defaults
df = generate_simulation_data_agent()
first(df, 5)
```

## 2. Visualizing SEIHR compartments.

We can also use the [TidierPlots](https://tidierorg.github.io/TidierPlots.jl/stable/) package to visualize the data generated.

```@example tutorial
plot(df.Time, df.S, label = "Suseptible",
xlabel = "Time",
ylabel = "Number of Individuals",
title = "Agent Based Model Simulation Results")
plot!(df.Time, df.E, label = "Exposed")
plot!(df.Time, df.I, label = "Infected")
plot!(df.Time, df.H, label = "Hospitalized")
plot!(df.Time, df.R, label = "Recovered")
```


### [Tutorial Contents](@ref tutorial_home)
15 changes: 15 additions & 0 deletions docs/src/tutorials/getting_started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# [Getting Started](@id getting_started)

Welcome to the Tutorials page for the UCIWWEIHR.jl project. This section provides step-by-step guides and examples to help you get started with using the package and understanding its features.

## 1. Installation.

To install the UCIWWEIHR.jl package, open the Julia REPL and run the following command:

``` julia
using Pkg
Pkg.add("UCIWWEIHR")
```


### [Tutorial Contents](@ref tutorial_home)
47 changes: 47 additions & 0 deletions docs/src/tutorials/uciwweihr_simulation_data.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# [Generating simulated data with UCIWWEIHR ODE compartmental based model.](@id uciwweihr_simulation_data)

This package provides a way to also simulate data using the UCIWWEIHR ODE compartmental based model specified in the future paper. The function called `generate_simulation_data_uciwweihr.jl` can be used to generate synthetic data for a given number of samples and features. Here we provide a demonstration using the default settings of `generate_simulation_data_uciwweihr.jl` :

## 1. Functionality.

``` @example tutorial
using UCIWWEIHR
using Plots
# Running simulation function with defaults
df = generate_simulation_data_uciwweihr()
first(df, 5)
```

## 2. Visualizing UCIWWEIHR model results.

Here we can make simple plots to visualize the data generated using the [TidierPlots](https://tidierorg.github.io/TidierPlots.jl/stable/) package.

### 2.1. Concentration of pathogen genome in wastewater(WW).
```@example tutorial
plot(df.obstimes, df.log_ww_conc,
label=nothing,
xlabel="Obstimes",
ylabel="Conc. of Pathogen Genome in WW",
title="Plot of Conc. of Pathogen Genome in WW Over Time")
```

### 2.2. Hospitalizations.
```@example tutorial
plot(df.obstimes, df.hosp,
label=nothing,
xlabel="Obstimes",
ylabel="Hosp",
title="Plot of Hosp Over Time")
```

### 2.3. Reproductive number.
```@example tutorial
plot(df.obstimes, df.rt,
label=nothing,
xlabel="Obstimes",
ylabel="Rt",
title="Plot of Rt Over Time")
```


### [Tutorial Contents](@ref tutorial_home)
3 changes: 2 additions & 1 deletion src/UCIWWEIHR.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ using Logging
using CSV
using DataFrames
using DifferentialEquations
using Plots
using Tidier
using TidierPlots
using StatsBase

include("generate_simulation_data_uciwweihr.jl")
Expand Down
4 changes: 2 additions & 2 deletions src/generate_simulation_data_agent.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ NOT FINISHED, STILL NEEDS WW AND RT
- pop_size::Int64: Size of the population. Default value is 1000.
- I_init::Int64: Initial number of infected individuals. Default value is 200.
- H_init::Int64: Initial number of hospitalized individuals. Default value is 20.
- beta::Float64: Transmission rate. Default value is 0.2.
- beta::Float64: Transmission rate. Default value is 0.001.
- gamma::Float64: Rate of exposed individuals becoming infectious. Default value is 1/4.
- nu::Float64: Rate of infected individuals recovering or getting hospitalized. Default value is 1/7.
- epsilon::Float64: Rate of hospitalized individuals recovering. Default value is 1/5.
Expand All @@ -23,7 +23,7 @@ NOT FINISHED, STILL NEEDS WW AND RT
function generate_simulation_data_agent(
seed::Int64=1, pop_size::Int64=1000,
I_init::Int64=200, H_init::Int64=20,
beta::Float64=0.2, gamma::Float64=1/4,
beta::Float64=0.001, gamma::Float64=1/4,
nu::Float64=1/7, epsilon::Float64=1/5,
w_init::Float64=0.35
)
Expand Down
3 changes: 0 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,5 @@ using Test

@testset "UCIWWEIHR.jl" begin
# Write your tests here.
x = 2
y = 2
@test UCIWWEIHR.sum_values(x,y) == 4

end

0 comments on commit 269a55b

Please sign in to comment.