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/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/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..0fbde96 --- /dev/null +++ b/docs/src/index.md @@ -0,0 +1,7 @@ +# SafetySignalDetection.jl + +Documentation for SafetySignalDetection.jl + +```@autodocs +Modules = [SafetySignalDetection] +``` 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}, diff --git a/test/Project.toml b/test/Project.toml new file mode 100644 index 0000000..8e949d1 --- /dev/null +++ b/test/Project.toml @@ -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" \ No newline at end of file