Skip to content
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
2 changes: 1 addition & 1 deletion .devcontainer/Containerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rocker/tidyverse:4.5.1
FROM ghcr.io/rocker-org/devcontainer/tidyverse:4.5

# RUN \
# echo 'options(repos=c(CRAN="https://packagemanager.posit.co/cran/__linux__/bookworm/latest"))' >> ~/.Rprofile && \
Expand Down
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"reditorsupport.r",
"rdebugger.r-debugger",
"quarto.quarto",
"tianyishi.rmarkdown"
"tianyishi.rmarkdown",
"github.vscode-github-actions"
]
}
},
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "Copilot Setup Steps"

# Automatically run the setup steps when they are changed to allow for easy validation, and
# allow manual testing through the repository's "Actions" tab
on:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml

jobs:
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
copilot-setup-steps:
runs-on: ubuntu-latest

# Set the permissions to the lowest permissions possible needed for your steps.
# Copilot will be given its own token for its operations.
permissions:
# If you want to clone the repository as part of your setup steps, for example to install dependencies, you'll need the `contents: read` permission. If you don't clone the repository in your setup steps, Copilot will do this for you automatically after the steps complete.
contents: read

# You can define any steps you want, and they will run before the agent starts.
# If you do not check out your code, Copilot will do this for you.
steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'

- name: Install dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
any::rcmdcheck
any::tinytest
needs: check
35 changes: 35 additions & 0 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: Coverage

jobs:
coverage:
runs-on: ubuntu-latest
name: Coverage

steps:
- uses: actions/checkout@v5

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2.9.0

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
any::covr
needs: check

- name: Running coverage
run: |
# Run coverage
covr::codecov(
token = Sys.getenv("CODECOV_TOKEN")
)
shell: Rscript {0}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
62 changes: 51 additions & 11 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,27 @@ on:

name: pkgdown

# Sets permissions of the GITHUB_TOKEN
permissions:
contents: read
pages: write
id-token: write
pull-requests: write
actions: read

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
pkgdown:
build:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- uses: r-lib/actions/setup-pandoc@v2

Expand All @@ -39,10 +50,39 @@ jobs:
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.4.1
# Upload artifact for GitHub Pages deployment (only for pushes to main/master)
- name: Upload Pages artifact
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
uses: actions/upload-pages-artifact@v3
with:
clean: false
branch: gh-pages
folder: docs
path: docs

# Upload artifact for PR preview (only for pull requests)
- name: Upload PR artifact
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: pkgdown-site
path: docs

# Post comment with link to artifact on PRs
- name: Post artifact link to PR
if: github.event_name == 'pull_request'
uses: CDCgov/cfa-actions/post-artifact@v1.2.0
with:
artifact-name: pkgdown-site
gh-token: ${{ secrets.GITHUB_TOKEN }}
message: 'Thank you for your contribution @${{ github.actor }} :rocket:! The pkgdown site preview is ready for review :point_right: [Download here]({ artifact-url }) :point_left:!'

# Deployment job - only runs on pushes to main/master
deploy:
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
24 changes: 23 additions & 1 deletion .github/workflows/r.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,28 @@ on:
name: R-CMD-check

jobs:
R-binary:
runs-on: ubuntu-latest

name: R binary version
steps:
- uses: actions/checkout@v5

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2

- name: Build package
run: R CMD build .

- name: Upload artifact
uses: actions/upload-artifact@v6
with:
name: defm-ubuntu-tar-gz
path: defm_*.tar.gz

R-CMD-check:
runs-on: ${{ matrix.config.os }}

Expand All @@ -39,7 +61,7 @@ jobs:
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- uses: r-lib/actions/setup-pandoc@v2

Expand Down
8 changes: 5 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ Authors@R: c(
"Department of Veterans Affairs - Rehabilitation, Research, and Development Service",
role = "fnd",
comment = "Award/W81XWH-18-PH/TBIRP-LIMBIC under Award No. I01 RX003443"
))
),
person(
"U.S. Army Medical Research Acquisition Activity", role = "fnd",
comment = "ORION project, Award #W81XWH1910615")
)
Description: Multi-binary response models are a class of models that allow for the estimation of multiple binary outcomes simultaneously. This package provides functions to estimate and simulate these models using the Discrete Exponential-Family Models [DEFM] framework. In it, we implement the models described in Vega Yon, Valente, and Pugh (2023) <doi:10.48550/arXiv.2211.00627>. DEFMs include Exponential-Family Random Graph Models [ERGMs], which characterize graphs using sufficient statistics, which is also the core of DEFMs. Using sufficient statistics, we can describe the data through meaningful motifs, for example, transitions between different states, joint distribution of the outcomes, etc.
URL: https://github.com/UofUEpiBio/defm,
https://uofuepibio.github.io/defm/
Expand All @@ -28,5 +32,3 @@ Depends:
stats4
Suggests:
texreg, tinytest, barry
Remotes:
USCBiostats/barryr
11 changes: 3 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ help:
@echo " make debug Install package with debug flags"
@echo " make clean Clean up generated files"
@echo " make README.md Generate README.md from README.Rmd"
@echo " make inst/NEWS Generate inst/NEWS from NEWS.md"
@echo " make docker-run Run a docker container with R and barry installed"
@echo " make docker-check All checks inside a docker container"

Expand All @@ -33,15 +32,8 @@ clean:
Rscript --vanilla -e 'devtools::clean_dll()'; \
rm -rf *.Rcmdcheck

README.md: README.Rmd
Rscript --vanilla -e 'rmarkdown::render("README.Rmd")'

.PHONY: build update clean

inst/NEWS: NEWS.md
Rscript -e "rmarkdown::pandoc_convert('NEWS.md', 'plain', output='inst/NEWS')" && \
head -n 80 inst/NEWS


docker-run:
docker run --rm -ti -v $(PWD):/mnt -w/mnt gvegayon/defm:latest bash
Expand All @@ -59,3 +51,6 @@ docker-check-all:
RD CMD build . && \
DEFM_CONFIG="-DBARRY_DEBUG" _R_CHECK_FORCE_SUGGESTS_=false \
RD CMD check defm_*.tar.gz

README.md: README.qmd
quarto render README.qmd
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# defm 0.2.1.0

* Returning to CRAN.

* The `defm` now uses the same versioning as the [`barry`](https://github.com/USCbiostats/barry) library (first three numbers). The last number is the patch.


# defm 0.1-1

* Added a `NEWS.md` file to track changes to the package.
Expand Down
Loading
Loading