From eb1b01e72a8b1aae85f9736e30ea14c1d3e78ca9 Mon Sep 17 00:00:00 2001 From: Doug Kelkhoff Date: Tue, 28 Nov 2023 11:12:56 -0500 Subject: [PATCH 1/5] initial addition of gh actions --- .github/workflows/build-test-coverage.yml | 59 +++++++++++++++++++++++ .github/workflows/docs.yml | 20 ++++++++ docs/.gitignore | 8 +++ docs/Project.toml | 2 + docs/make.jl | 15 ++++++ docs/src/index.md | 3 ++ 6 files changed, 107 insertions(+) create mode 100644 .github/workflows/build-test-coverage.yml create mode 100644 .github/workflows/docs.yml create mode 100644 docs/.gitignore create mode 100644 docs/Project.toml create mode 100644 docs/make.jl create mode 100644 docs/src/index.md diff --git a/.github/workflows/build-test-coverage.yml b/.github/workflows/build-test-coverage.yml new file mode 100644 index 0000000..3e387a5 --- /dev/null +++ b/.github/workflows/build-test-coverage.yml @@ -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 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..7eefd6a --- /dev/null +++ b/.github/workflows/docs.yml @@ -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 }} diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..1692e5a --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,8 @@ +*.jl.cov +*.jl.*.cov +*.jl.mem +docs/build/ +docs/site/ +Manifest.toml +.DS_Store +.vscode diff --git a/docs/Project.toml b/docs/Project.toml new file mode 100644 index 0000000..dfa65cd --- /dev/null +++ b/docs/Project.toml @@ -0,0 +1,2 @@ +[deps] +Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" diff --git a/docs/make.jl b/docs/make.jl new file mode 100644 index 0000000..c8f29ae --- /dev/null +++ b/docs/make.jl @@ -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" +) diff --git a/docs/src/index.md b/docs/src/index.md new file mode 100644 index 0000000..a9297f8 --- /dev/null +++ b/docs/src/index.md @@ -0,0 +1,3 @@ +# SafetySignalDetection.jl + +Documentation for SafetySignalDetection.jl From 0fe4a4721ee6d10ec6cf8583b67f9dec2fdaa3ad Mon Sep 17 00:00:00 2001 From: Doug Kelkhoff Date: Tue, 28 Nov 2023 11:17:10 -0500 Subject: [PATCH 2/5] adding test stub --- test/Project.toml | 2 ++ test/runtests.jl | 5 +++++ 2 files changed, 7 insertions(+) create mode 100644 test/Project.toml create mode 100644 test/runtests.jl diff --git a/test/Project.toml b/test/Project.toml new file mode 100644 index 0000000..0c36332 --- /dev/null +++ b/test/Project.toml @@ -0,0 +1,2 @@ +[deps] +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/test/runtests.jl b/test/runtests.jl new file mode 100644 index 0000000..cff8d3f --- /dev/null +++ b/test/runtests.jl @@ -0,0 +1,5 @@ +using Test + +@testset "Example test" begin + @test true +end From ba449338514014947cbbc78583b19e61b31509d2 Mon Sep 17 00:00:00 2001 From: Daniel Sabanes Bove Date: Fri, 8 Dec 2023 16:34:42 +0100 Subject: [PATCH 3/5] add deps to test's toml, and rm from project's toml --- Project.toml | 2 -- test/Project.toml | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 23e6fa0..5c4b503 100644 --- a/Project.toml +++ b/Project.toml @@ -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" diff --git a/test/Project.toml b/test/Project.toml index 0c36332..8e949d1 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -1,2 +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" \ No newline at end of file From d5e0b4fb796d65f953d002b4e7db170b031efe45 Mon Sep 17 00:00:00 2001 From: Daniel Sabanes Bove Date: Fri, 8 Dec 2023 17:21:14 +0100 Subject: [PATCH 4/5] try to add required (?) arg list in docstring (?) --- src/meta_analytic.jl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/meta_analytic.jl b/src/meta_analytic.jl index 4662efa..6844ca2 100644 --- a/src/meta_analytic.jl +++ b/src/meta_analytic.jl @@ -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}, From dac47e075db3c66ff0e2dd64999c0a7e9ee1ea9c Mon Sep 17 00:00:00 2001 From: Daniel Sabanes Bove Date: Tue, 2 Jan 2024 22:03:34 +0100 Subject: [PATCH 5/5] Update docs/src/index.md Co-authored-by: dgkf-roche <91694157+dgkf-roche@users.noreply.github.com> --- docs/src/index.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/src/index.md b/docs/src/index.md index a9297f8..0fbde96 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -1,3 +1,7 @@ # SafetySignalDetection.jl Documentation for SafetySignalDetection.jl + +```@autodocs +Modules = [SafetySignalDetection] +```