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
54 changes: 54 additions & 0 deletions .github/workflows/R-CMD-dev_check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
on:
push:
branches: [dev]
paths:
- '**.Rmd'
- '**.Rd'
- '**.R'
pull_request:
branches: [dev]

name: Dev Branch

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

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release', rtools: ''}
- {os: windows-latest, r: 'release', rtools: '42'}
- {os: ubuntu-latest, r: 'devel', rtools: '', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release', rtools: ''}
- {os: ubuntu-latest, r: 'oldrel-1', rtools: ''}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v3

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

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
rtools-version: ${{ matrix.config.rtools }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 3
extra-packages: |
any::rcmdcheck
upgrade: 'TRUE'
needs: check
- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
36 changes: 36 additions & 0 deletions .github/workflows/codecov.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# For more configuration details:
# https://docs.codecov.com/docs/codecov-yaml

# Check if this file is valid by running in bash:
# curl -X POST --data-binary @.codecov.yml https://codecov.io/validate

# Settings related to codecov job
codecov:
require_ci_to_pass: yes # Only report if CI runs successfully
notify:
wait_for_ci: yes # Wait for other jobs to finish
manual_trigger: true # Notify when manually triggered

# Settings related to code coverage analysis
coverage:
status:
# Checks how the PR changes overall coverage.
project:
default:
# For each PR, auto compare coverage to previous commit.
target: auto # Desired coverage
base: auto # Compares against the base branch
threshold: 2% # Allows slight drops before failing
# Checks the relative coverage of the new PR code only.
patch:
default:
target: auto
base: auto
threshold: 2%

# Settings related to the comment that Codecov posts on the PR
comment:
layout: "diff, flags, files"
behavior: default # Uses default commenting behavior
require_changes: false # Always post the comment, even if coverage did not change
hide_project_coverage: false # Always show coverage for both project and patch
61 changes: 61 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master,dev]
pull_request:

name: test-coverage.yaml

permissions: read-all

jobs:
test-coverage:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v4

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

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr, any::xml2
needs: coverage

- name: Test coverage
run: |
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
covr::to_cobertura(cov)
shell: Rscript {0}

- uses: codecov/codecov-action@v4
with:
# Fail if error if not on PR, or if on PR and token is given
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
file: ./cobertura.xml
plugin: noop
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ Package: discord
Type: Package
Title: Functions for Discordant Kinship Modeling
Version: 1.2.4
Date: 2025-04-29
Authors@R: c(person("S. Mason", "Garrison", email = "garrissm@wfu.edu",
role = c("aut", "cre", "cph"),
comment = c(ORCID = "0000-0002-4804-6003")),
Expand All @@ -29,6 +28,7 @@ Suggests:
dplyr,
grid,
gridExtra,
ggplot2,
janitor,
kableExtra,
knitr,
Expand Down
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Generated by roxygen2: do not edit by hand

export(discord_between_model)
export(discord_data)
export(discord_regression)
export(discord_within_model)
export(kinsim)
importFrom(stats,formula)
importFrom(stats,lm)
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@


# discord 1.2.4
* Added a new vignette demonstrating ways to visualize discordant kinship data using the `ggplot2` package.
* Added a new vignette demonstrating how to conduct a power analysis.
* Vectorizing `discord_data()` to improve performance.
* Adding tests to ensure comparability between optimized and non-optimized versions of `discord_data()`.
* Adding `discord_between_model()` to get the between-family model

# discord 1.2.3.1
* More mild improvements to documentation
Expand Down
Loading