Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial addition of GitHub actions #10

Merged
merged 7 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/build-test-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Test

on:
push:
branches: [main, master]
tags: ["*"]
pull_request:

jobs:
Test:
name: Julia (v${{ matrix.version }}) on ${{ matrix.os }}-${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
### NOTE: Scope
### - for testing and early development, focusing on just latest
### version testing against linux

version:
- 1 # automatically expands to the latest stable 1.x release of Julia
# - 1.0
# - nightly
os:
- ubuntu-latest
arch:
- x64
# - x86
# include:
# # test macOS and Windows with latest Julia only
# - os: macOS-latest
# arch: x64
# version: 1
# - os: windows-latest
# arch: x64
# version: 1
# - os: windows-latest
# arch: x86
# version: 1

steps:
- uses: actions/checkout@v2

- uses: julia-actions/setup-julia@v1
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@v1
with:
file: lcov.info
20 changes: 20 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Documenter

on:
push:
branches: [main, master]
tags: [v*]
pull_request:

jobs:
Documenter:
permissions:
contents: write
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 0 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,5 @@ ExpectationMaximization = "e1fe09cc-5134-44c2-a941-50f4cd97986a"
FreqTables = "da1fdf0e-e0ff-5433-a45f-9bb5ff651cb1"
Pluto = "c3e4b0f8-55cb-11ea-2926-15256bba5781"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
StatsPlots = "f3b207a7-027a-5e70-b257-86293d7955fd"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Turing = "fce5fe82-541a-59a6-adf8-730c64b5f9a0"
8 changes: 8 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*.jl.cov
*.jl.*.cov
*.jl.mem
docs/build/
docs/site/
Manifest.toml
.DS_Store
.vscode
2 changes: 2 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
15 changes: 15 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using Documenter
using SafetySignalDetection

makedocs(
sitename = "SafetySignalDetection",
format = Documenter.HTML(),
modules = [SafetySignalDetection]
)

# Documenter can also automatically deploy documentation to gh-pages.
# See "Hosting Documentation" and deploydocs() in the Documenter manual
# for more information.
deploydocs(
repo = "https://github.com/openpharma/SafetySignalDetection.jl.git"
)
7 changes: 7 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# SafetySignalDetection.jl

Documentation for SafetySignalDetection.jl
danielinteractive marked this conversation as resolved.
Show resolved Hide resolved

```@autodocs
Modules = [SafetySignalDetection]
```
11 changes: 10 additions & 1 deletion src/meta_analytic.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
"""
Meta Analytic Prior Model

Meta Analytic Prior Model

This Turing model is used to generate posterior samples of the parameters `a` and `b`.

meta_analytic(
y::Vector{Bool},
time::Vector{Float64},
trialindex::Vector{Int64},
prior_a::Distribution,
prior_b::Distribution)

"""
@model function meta_analytic(
y::Vector{Bool},
Expand Down
7 changes: 7 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[deps]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Turing = "fce5fe82-541a-59a6-adf8-730c64b5f9a0"
Loading