Skip to content

Commit ec298ad

Browse files
Merge pull request #25 from R-Computing-Lab/dev
Add between-family and faster regressions
2 parents 9b4ad29 + 3f66090 commit ec298ad

26 files changed

Lines changed: 1466 additions & 272 deletions
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
on:
2+
push:
3+
branches: [dev]
4+
paths:
5+
- '**.Rmd'
6+
- '**.Rd'
7+
- '**.R'
8+
pull_request:
9+
branches: [dev]
10+
11+
name: Dev Branch
12+
13+
jobs:
14+
R-CMD-check:
15+
runs-on: ${{ matrix.config.os }}
16+
17+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
18+
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
config:
23+
- {os: macOS-latest, r: 'release', rtools: ''}
24+
- {os: windows-latest, r: 'release', rtools: '42'}
25+
- {os: ubuntu-latest, r: 'devel', rtools: '', http-user-agent: 'release'}
26+
- {os: ubuntu-latest, r: 'release', rtools: ''}
27+
- {os: ubuntu-latest, r: 'oldrel-1', rtools: ''}
28+
29+
env:
30+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
31+
R_KEEP_PKG_SOURCE: yes
32+
33+
steps:
34+
- uses: actions/checkout@v3
35+
36+
- uses: r-lib/actions/setup-pandoc@v2
37+
38+
- uses: r-lib/actions/setup-r@v2
39+
with:
40+
r-version: ${{ matrix.config.r }}
41+
rtools-version: ${{ matrix.config.rtools }}
42+
http-user-agent: ${{ matrix.config.http-user-agent }}
43+
use-public-rspm: true
44+
45+
- uses: r-lib/actions/setup-r-dependencies@v2
46+
with:
47+
cache-version: 3
48+
extra-packages: |
49+
any::rcmdcheck
50+
upgrade: 'TRUE'
51+
needs: check
52+
- uses: r-lib/actions/check-r-package@v2
53+
with:
54+
upload-snapshots: true

.github/workflows/codecov.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# For more configuration details:
2+
# https://docs.codecov.com/docs/codecov-yaml
3+
4+
# Check if this file is valid by running in bash:
5+
# curl -X POST --data-binary @.codecov.yml https://codecov.io/validate
6+
7+
# Settings related to codecov job
8+
codecov:
9+
require_ci_to_pass: yes # Only report if CI runs successfully
10+
notify:
11+
wait_for_ci: yes # Wait for other jobs to finish
12+
manual_trigger: true # Notify when manually triggered
13+
14+
# Settings related to code coverage analysis
15+
coverage:
16+
status:
17+
# Checks how the PR changes overall coverage.
18+
project:
19+
default:
20+
# For each PR, auto compare coverage to previous commit.
21+
target: auto # Desired coverage
22+
base: auto # Compares against the base branch
23+
threshold: 2% # Allows slight drops before failing
24+
# Checks the relative coverage of the new PR code only.
25+
patch:
26+
default:
27+
target: auto
28+
base: auto
29+
threshold: 2%
30+
31+
# Settings related to the comment that Codecov posts on the PR
32+
comment:
33+
layout: "diff, flags, files"
34+
behavior: default # Uses default commenting behavior
35+
require_changes: false # Always post the comment, even if coverage did not change
36+
hide_project_coverage: false # Always show coverage for both project and patch
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main, master,dev]
6+
pull_request:
7+
8+
name: test-coverage.yaml
9+
10+
permissions: read-all
11+
12+
jobs:
13+
test-coverage:
14+
runs-on: ubuntu-latest
15+
env:
16+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- uses: r-lib/actions/setup-r@v2
22+
with:
23+
use-public-rspm: true
24+
25+
- uses: r-lib/actions/setup-r-dependencies@v2
26+
with:
27+
extra-packages: any::covr, any::xml2
28+
needs: coverage
29+
30+
- name: Test coverage
31+
run: |
32+
cov <- covr::package_coverage(
33+
quiet = FALSE,
34+
clean = FALSE,
35+
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
36+
)
37+
covr::to_cobertura(cov)
38+
shell: Rscript {0}
39+
40+
- uses: codecov/codecov-action@v4
41+
with:
42+
# Fail if error if not on PR, or if on PR and token is given
43+
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
44+
file: ./cobertura.xml
45+
plugin: noop
46+
disable_search: true
47+
token: ${{ secrets.CODECOV_TOKEN }}
48+
49+
- name: Show testthat output
50+
if: always()
51+
run: |
52+
## --------------------------------------------------------------------
53+
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
54+
shell: bash
55+
56+
- name: Upload test results
57+
if: failure()
58+
uses: actions/upload-artifact@v4
59+
with:
60+
name: coverage-test-failures
61+
path: ${{ runner.temp }}/package

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ Package: discord
22
Type: Package
33
Title: Functions for Discordant Kinship Modeling
44
Version: 1.2.4
5-
Date: 2025-04-29
65
Authors@R: c(person("S. Mason", "Garrison", email = "garrissm@wfu.edu",
76
role = c("aut", "cre", "cph"),
87
comment = c(ORCID = "0000-0002-4804-6003")),
@@ -29,6 +28,7 @@ Suggests:
2928
dplyr,
3029
grid,
3130
gridExtra,
31+
ggplot2,
3232
janitor,
3333
kableExtra,
3434
knitr,

NAMESPACE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# Generated by roxygen2: do not edit by hand
22

3+
export(discord_between_model)
34
export(discord_data)
45
export(discord_regression)
6+
export(discord_within_model)
57
export(kinsim)
68
importFrom(stats,formula)
79
importFrom(stats,lm)

NEWS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1+
2+
13
# discord 1.2.4
24
* Added a new vignette demonstrating ways to visualize discordant kinship data using the `ggplot2` package.
35
* Added a new vignette demonstrating how to conduct a power analysis.
6+
* Vectorizing `discord_data()` to improve performance.
7+
* Adding tests to ensure comparability between optimized and non-optimized versions of `discord_data()`.
8+
* Adding `discord_between_model()` to get the between-family model
49

510
# discord 1.2.3.1
611
* More mild improvements to documentation

0 commit comments

Comments
 (0)