Skip to content

Refactor package structure and enhance spirometry analysis files#1

Open
ehrlinger wants to merge 8 commits into
mainfrom
docs/v2.0.0
Open

Refactor package structure and enhance spirometry analysis files#1
ehrlinger wants to merge 8 commits into
mainfrom
docs/v2.0.0

Conversation

@ehrlinger
Copy link
Copy Markdown
Owner

This pull request introduces a major update to the boostmtree package, marking the transition to version 2.0.0.9000. The update modernizes the package's infrastructure, improves documentation, enhances CI/CD workflows, and introduces new features and breaking changes. The most important changes are summarized below.

Breaking Changes and Maintenance:

  • Minimum required R version increased to 4.1.0, and package maintainership has transferred to John Ehrlinger, with original authors remaining as contributors. [1] [2]
  • The package version is now 2.0.0.9000, and the DESCRIPTION file has been updated with new metadata, including an updated maintainer, additional suggested packages for visualization, and a new BugReports URL.

Documentation and User Guidance:

  • Comprehensive rewrite of the README and introduction of NEWS.md for pkgdown changelog rendering. Two new vignettes added for user guidance.
  • The pkgdown site is restructured with a reference index, articles, and sidebar badges.

Continuous Integration and Workflow Improvements:

  • Major overhaul of GitHub Actions workflows:
    • Standard and release check workflows are updated for better CRAN alignment, multi-platform support, and improved artifact upload on failure. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]
    • Added new spell-check workflow and improved linting with artifact uploads on failure. [1] [2]
    • Workflow triggers expanded to include feature, fix, docs, and release branches. [1] [2] [3] [4]

Package Structure and Imports:

  • NAMESPACE is now generated by roxygen2, with all imports and exports explicitly listed and updated to reflect new and existing functions.
  • Additional suggested packages for enhanced ggplot2-based visualization workflows: ggRandomForests, hvtiPlotR, hvtiRutilities, and others.

Miscellaneous:

  • .Rbuildignore expanded to ignore additional development and cache files for cleaner package builds.
  • Minor code and documentation cleanups, including removal of unnecessary aliases and updates to package-level documentation. [1] [2] [3] [4]

These changes collectively modernize the package, improve its usability, and align it with current R package development best practices.

- Created new RData files for spirometry print and split analyses.
- Added corresponding RDB and RDX files for both print and split analyses.
- Introduced a new RData file for variable importance analysis (vimp) with associated RDB and RDX files.
Copilot AI review requested due to automatic review settings March 24, 2026 17:22

This comment was marked as resolved.

…itudinal analysis vignettes

- Deleted various binary files related to caching in the introduction_cache and longitudinal-analysis_cache directories.
- Removed package reference for 'boostmtree' from both vignettes.
…n and test coverage configurations, and include quarto support
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 24, 2026

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

…ons to 20; enhance error messaging in functions; adjust vignettes and examples for consistency with new parameters.
Copy link
Copy Markdown

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

Copilot reviewed 53 out of 54 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md

2. `predict.boostmtree` - Used for prediction. Predicted values are obtained by dropping the user supplied test data down the grow forest. The resulting object has class (`rfsrc`, `predict`).
fit_af <- boostmtree(
x = AF$features,
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

The AF dataset is referenced elsewhere in the repo as AF$feature (singular) (e.g., inst/extdata/precompute.R, vignettes/longitudinal-analysis.qmd, and examples in R/boostmtree.R). Using AF$features here will likely error for users running the README example. Please align the element name with the actual dataset structure.

Suggested change
x = AF$features,
x = AF$feature,

Copilot uses AI. Check for mistakes.
Comment on lines +35 to +40
- name: Upload lint results
if: failure()
uses: actions/upload-artifact@v5
with:
name: lint-results
path: lintr_results.json
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

lintr::lint_package() doesn’t create lintr_results.json by default, so this artifact upload step will likely fail (or upload nothing) when the job fails. Either write the lint output to a file explicitly (e.g., via lintr::sarif_output() / lintr::json_output()), or set if-no-files-found: ignore / upload an existing output format.

Copilot uses AI. Check for mistakes.
Comment on lines +82 to +83
cat("Training subjects:", sum(trn_idx), "\n")
cat("Test subjects: ", sum(!trn_idx), "\n")
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

In the train/test split, trn_idx is a per-observation logical, so sum(trn_idx) / sum(!trn_idx) reports number of rows (observations), not number of subjects. If you want subject counts, compute them from spirometry$id (e.g., length(unique(spirometry$id[trn_idx]))).

Copilot uses AI. Check for mistakes.
Comment on lines +221 to +222
cat("Training subjects:", sum(trn_af), "\n")
cat("Test subjects: ", sum(!trn_af), "\n")
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

Same issue as above: trn_af is a per-observation logical vector, so sum(trn_af) / sum(!trn_af) prints observation counts while the label says “subjects”. Consider counting unique IDs instead (e.g., length(unique(AF$id[trn_af]))).

Copilot uses AI. Check for mistakes.
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.

2 participants