Skip to content

Dev main#141

Merged
smasongarrison merged 34 commits intomainfrom
dev_main
Mar 27, 2026
Merged

Dev main#141
smasongarrison merged 34 commits intomainfrom
dev_main

Conversation

@smasongarrison
Copy link
Copy Markdown
Member

@smasongarrison smasongarrison commented Mar 25, 2026

  • Fix non-ASCII character warning in R/buildComponent.R (em dash replaced with \u2014 Unicode escape)

📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

Copilot AI review requested due to automatic review settings March 25, 2026 19:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances BGmisc’s pedigree-to-relatedness matrix pipeline by extending ped2com() with chunked transpose support, improved checkpoint/resume behavior, and optional ID subsetting, alongside CI/release automation and associated documentation/test updates.

Changes:

  • Extended ped2com() with transpose_method = "chunked", chunk_size, keep_ids, force_symmetric, and improved checkpoint/resume logic (including RAM/tcrossprod checkpoint fixes).
  • Added/expanded test coverage for chunked tcrossprod, checkpoint resumability, and keep_ids behavior.
  • Added GitHub Actions workflows (multi-OS R CMD check, branch/main checks, releases) plus Codecov/pkgdown/config/metadata updates.

Reviewed changes

Copilot reviewed 26 out of 29 changed files in this pull request and generated 16 comments.

Show a summary per file
File Description
R/buildComponent.R Core implementation updates for chunked transpose, keep-id subsetting, checkpointing/resume, and transpose helper changes.
R/buildComponentWrappers.R Moves ped2com wrappers into a dedicated file and updates wrapper signatures.
tests/testthat/test-convertPedigree.R Updates checkpoint file list to include tcrossprod_ids.
tests/testthat/test-buildComponent.R Adds tests for ram_checkpoint resume and keep_ids subsetting behavior.
tests/testthat/test-buildComponent_chunks.R New tests covering chunked tcrossprod correctness and per-chunk checkpoint/resume behavior.
man/ped2com.Rd Documents new ped2com() arguments/options (generated from roxygen).
man/dot-computeTranspose.Rd Documents updated .computeTranspose() interface (generated from roxygen).
man/ped2add.Rd Updates wrapper documentation for new args (generated).
man/ped2mit.Rd Updates wrapper documentation for new args (generated).
man/ped2cn.Rd Updates wrapper documentation for new args (generated).
man/ped2gen.Rd Updates wrapper documentation for new args (generated).
man/ped2ce.Rd Updates ped2ce() usage to include personID (generated).
.github/workflows/check_on_different_r_os.yml Adds multi-OS/R-version R CMD check workflow.
.github/workflows/check_on_main.yml Adds main-branch checklist-based package check workflow.
.github/workflows/check_on_branch.yml Adds non-main branch checklist-based package check workflow.
.github/workflows/release.yml Adds GitHub release automation on tag pushes / workflow completion.
codecov.yml Adds Codecov configuration (one of two configs added).
codecov.yaml Adds an additional Codecov configuration file (overlaps with codecov.yml).
_pkgdown.yml Updates pkgdown site URL/template settings.
DESCRIPTION Reflows/updates package description and dependency ordering.
NEWS.md Adds a “Development version” section summarizing recent changes.
.Rbuildignore Expands ignored build artifacts/config files (CI/docs/dev files).
.gitignore Expands ignored artifacts (R outputs, docs build outputs, local tooling).
data-raw/optimizing_transpose.R Adds benchmarking script for transpose methods.
data-raw/ped2com_benchmark_summary.csv Updates benchmark summary output.
data-raw/ped2com_benchmark_results.csv Updates benchmark results output.
data-raw/ped2com_benchmark_design_com.csv Adds benchmark design table output.
data-raw/ped2com_benchmark_start_time.txt Updates benchmark run start timestamp.
data-raw/ped2com_benchmark_end_time.txt Updates benchmark run end timestamp.
Comments suppressed due to low confidence (1)

.github/workflows/check_on_main.yml:20

  • The workflow uses inbo/actions/check_pkg@main, which is a moving branch and can change without notice (affecting reproducibility and supply-chain safety). Prefer pinning to a tagged release or a commit SHA.
    steps:
      - uses: inbo/actions/check_pkg@main

smasongarrison and others added 2 commits March 25, 2026 17:36
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@smasongarrison
Copy link
Copy Markdown
Member Author

can you fix this? @copilot ❯ checking code files for non-ASCII characters ... WARNING
Found the following file with non-ASCII characters:
R/buildComponent.R
Portable packages must use only ASCII characters in their R code and
NAMESPACE directives, except perhaps in comments.
Use \uxxxx escapes for other characters.
Function 'tools::showNonASCIIfile' can help in finding non-ASCII
characters in files.

…014 escape

Co-authored-by: smasongarrison <6001608+smasongarrison@users.noreply.github.com>
Agent-Logs-Url: https://github.com/R-Computing-Lab/BGmisc/sessions/1f51ade1-dbed-4745-9e6b-e3b18880f36c
Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 25, 2026

can you fix this? @copilot ❯ checking code files for non-ASCII characters ... WARNING
Found the following file with non-ASCII characters:
R/buildComponent.R
...

Fixed in d596f0f. Replaced the em dash () on line 395 of R/buildComponent.R with its Unicode escape sequence \u2014, which is the portable R way to include non-ASCII characters in code files.

smasongarrison and others added 2 commits March 25, 2026 17:59
Update tests/testthat/test-buildComponent_chunks.R

Update tests/testthat/test-buildComponent_chunks.R

Co-Authored-By: Copilot <175728472+Copilot@users.noreply.github.com>
@smasongarrison
Copy link
Copy Markdown
Member Author

The big change is that we can now create a subsetted pedigree for the additive genetic matrix.

if (mz_method %in% c("merging") && mz_twins == TRUE && !is.null(mz_row_pairs) && length(mz_row_pairs) > 0 &&
config$component %in% c("additive")) {
if (config$mz_method %in% c("merging") && config$mz_twins == TRUE && !is.null(mz_row_pairs) && length(mz_row_pairs) > 0 &&
config$component %in% c("additive")) {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
config$component %in% c("additive")) {
config$component %in% c("additive")) {

mtSum <- 0
count <- 0
} else if (config$resume == TRUE && file.exists(checkpoint_files$r_checkpoint) &&
file.exists(checkpoint_files$gen_checkpoint) &&
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
file.exists(checkpoint_files$gen_checkpoint) &&
file.exists(checkpoint_files$gen_checkpoint) &&

@smasongarrison smasongarrison merged commit 053eace into main Mar 27, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants