Skip to content

Commit 20ab36f

Browse files
author
Matt Secrest
committed
pkgdown
1 parent 0e349a8 commit 20ab36f

7 files changed

Lines changed: 232 additions & 2 deletions

File tree

.Rbuildignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
^NOTES\.md$
55
^\.github$
66
^\.lintr$
7+
^_pkgdown\.yml$
8+
^docs$

.github/workflows/pkgdown.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
on:
3+
push:
4+
branches: [main, master]
5+
release:
6+
types: [published]
7+
workflow_dispatch:
8+
9+
name: pkgdown.yaml
10+
11+
permissions: read-all
12+
13+
jobs:
14+
pkgdown:
15+
runs-on: ubuntu-latest
16+
concurrency:
17+
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
18+
permissions:
19+
contents: write
20+
env:
21+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- uses: r-lib/actions/setup-pandoc@v2
26+
27+
- uses: r-lib/actions/setup-r@v2
28+
with:
29+
use-public-rspm: true
30+
31+
- uses: r-lib/actions/setup-r-dependencies@v2
32+
with:
33+
extra-packages: any::pkgdown, local::.
34+
needs: website
35+
36+
- name: Build site
37+
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
38+
shell: Rscript {0}
39+
40+
- name: Deploy to GitHub pages
41+
if: github.event_name != 'pull_request'
42+
uses: JamesIves/github-pages-deploy-action@v4.7.3
43+
with:
44+
clean: false
45+
branch: gh-pages
46+
folder: docs
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
on:
3+
push:
4+
branches: [main, master]
5+
pull_request:
6+
7+
name: test-coverage.yaml
8+
9+
permissions: read-all
10+
11+
jobs:
12+
test-coverage:
13+
runs-on: ubuntu-latest
14+
env:
15+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- uses: r-lib/actions/setup-r@v2
21+
with:
22+
use-public-rspm: true
23+
24+
- uses: r-lib/actions/setup-r-dependencies@v2
25+
with:
26+
extra-packages: any::covr, any::xml2
27+
needs: coverage
28+
29+
- name: Test coverage
30+
run: |
31+
cov <- covr::package_coverage(
32+
quiet = FALSE,
33+
clean = FALSE,
34+
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
35+
)
36+
covr::to_cobertura(cov)
37+
shell: Rscript {0}
38+
39+
- uses: codecov/codecov-action@v5
40+
with:
41+
fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }}
42+
file: ./cobertura.xml
43+
plugin: noop
44+
token: ${{ secrets.CODECOV_TOKEN }}
45+
46+
- name: Show testthat output
47+
if: always()
48+
run: |
49+
## --------------------------------------------------------------------
50+
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
51+
shell: bash
52+
53+
- name: Upload test results
54+
if: failure()
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: coverage-test-failures
58+
path: ${{ runner.temp }}/package

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ Study
99
Xover_original
1010
mimic_true_data.Rmd
1111
user-design.Rmd
12-
inst/vignetteRMD/old_analysis_files
12+
inst/vignetteRMD/old_analysis_files
13+
docs

DESCRIPTION

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@ Imports:
6161
utils,
6262
methods
6363
Suggests:
64+
covr,
6465
ECOSolveR,
6566
knitr,
67+
pkgdown,
6668
rmarkdown,
6769
lintr,
6870
spelling,
@@ -104,7 +106,7 @@ Collate:
104106
'simulate_trt_assign.R'
105107
'simulation_class.R'
106108
'simulation_report_class.R'
107-
URL: https://github.com/Genentech/rdborrow
109+
URL: https://genentech.github.io/rdborrow/, https://github.com/Genentech/rdborrow
108110
BugReports: https://github.com/Genentech/rdborrow/issues
109111
VignetteBuilder: knitr
110112
LazyData: true

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<!-- badges: start -->
44
[![R-CMD-check](https://github.com/Genentech/rdborrow/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/Genentech/rdborrow/actions/workflows/R-CMD-check.yaml)
5+
[![Codecov test coverage](https://codecov.io/gh/Genentech/rdborrow/graph/badge.svg)](https://app.codecov.io/gh/Genentech/rdborrow)
56
<!-- badges: end -->
67

78
## How to cite the manuscript

_pkgdown.yml

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
url: https://genentech.github.io/rdborrow/
2+
3+
home:
4+
sidebar:
5+
structure: [links, license, community, citation, authors, dev]
6+
7+
template:
8+
bootstrap: 5
9+
10+
navbar:
11+
structure:
12+
left: [intro, reference, articles]
13+
right: [search, github]
14+
components:
15+
github:
16+
icon: fa-github
17+
href: https://github.com/Genentech/rdborrow
18+
aria-label: GitHub
19+
20+
articles:
21+
- title: Primary Analysis
22+
contents:
23+
- primary_analysis_workflow
24+
- primary_simulation_workflow
25+
- title: Open-Label Extension (OLE)
26+
contents:
27+
- OLE_analysis_workflow
28+
- OLE_simulation_workflow
29+
- title: Data Generation Examples
30+
contents:
31+
- simulate_func_test/simulate_covariates
32+
- simulate_func_test/simulate_outcome
33+
34+
reference:
35+
- title: Package Overview
36+
contents:
37+
- rdborrow-package
38+
39+
- title: Analysis
40+
desc: Set up and run analyses
41+
contents:
42+
- setup_analysis
43+
- setup_analysis_primary
44+
- setup_analysis_OLE
45+
- run_analysis
46+
47+
- title: Simulation
48+
desc: Set up and run simulations
49+
contents:
50+
- setup_simulation
51+
- setup_simulation_primary
52+
- setup_simulation_OLE
53+
- run_simulation
54+
- setup_simulation_report
55+
56+
- title: Method Configuration
57+
desc: Configure estimation methods
58+
contents:
59+
- setup_method
60+
- setup_method_weighting
61+
- setup_method_DID
62+
- setup_method_SCM
63+
- setup_bootstrap
64+
65+
- title: Weighting Estimators
66+
desc: IPW and AIPW methods for primary analysis
67+
contents:
68+
- EC_IPW_OPT
69+
- EC_IPW_OPT_bootstrap
70+
- EC_AIPW_OPT
71+
- EC_AIPW_OPT_bootstrap
72+
73+
- title: Difference-in-Differences Estimators
74+
desc: DID methods for OLE analysis
75+
contents:
76+
- DID_EC_IPW
77+
- DID_EC_IPW_bootstrap
78+
- DID_EC_AIPW
79+
- DID_EC_AIPW_bootstrap
80+
- DID_EC_OR
81+
- DID_EC_OR_bootstrap
82+
83+
- title: Synthetic Control Method
84+
desc: SCM estimator and helpers
85+
contents:
86+
- SCM
87+
- subject_SC
88+
- lambdacv
89+
90+
- title: Data Generation
91+
desc: Simulate trial data
92+
contents:
93+
- simulate_trial
94+
- simulate_X_copula
95+
- simulate_X_dct_mvnorm
96+
- simulate_X_mixture
97+
- simulate_trt_assign
98+
- simulate_trial_status
99+
- simulate_outcome_from_model
100+
101+
- title: Classes
102+
desc: S4 class documentation
103+
contents:
104+
- analysis_obj-class
105+
- analysis_primary_obj-class
106+
- analysis_OLE_obj-class
107+
- bootstrap_obj-class
108+
- method_obj-class
109+
- method_weighting_obj-class
110+
- method_DID_obj-class
111+
- method_SCM_obj-class
112+
- simulation_obj-class
113+
- simulation_primary_obj-class
114+
- simulation_OLE_obj-class
115+
- simulation_report_obj-class
116+
117+
- title: Data
118+
desc: Example datasets
119+
contents:
120+
- SyntheticData

0 commit comments

Comments
 (0)