Skip to content

Commit 62bea6e

Browse files
authored
Merge pull request #86 from mayer79/update-code-cov
Update code coverage version
2 parents 5171ba7 + a1b7641 commit 62bea6e

File tree

6 files changed

+47
-26
lines changed

6 files changed

+47
-26
lines changed

.github/workflows/test-coverage.yaml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ on:
44
push:
55
branches: [main, master]
66
pull_request:
7-
branches: [main, master]
87

9-
name: test-coverage
8+
name: test-coverage.yaml
9+
10+
permissions: read-all
1011

1112
jobs:
1213
test-coverage:
@@ -15,36 +16,47 @@ jobs:
1516
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1617

1718
steps:
18-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
1920

2021
- uses: r-lib/actions/setup-r@v2
2122
with:
2223
use-public-rspm: true
2324

2425
- uses: r-lib/actions/setup-r-dependencies@v2
2526
with:
26-
extra-packages: any::covr
27+
extra-packages: any::covr, any::xml2
2728
needs: coverage
2829

2930
- name: Test coverage
3031
run: |
31-
covr::codecov(
32+
cov <- covr::package_coverage(
3233
quiet = FALSE,
3334
clean = FALSE,
34-
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
35+
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
3536
)
37+
print(cov)
38+
covr::to_cobertura(cov)
3639
shell: Rscript {0}
3740

41+
- uses: codecov/codecov-action@v5
42+
with:
43+
# Fail if error if not on PR, or if on PR and token is given
44+
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
45+
files: ./cobertura.xml
46+
plugins: noop
47+
disable_search: true
48+
token: ${{ secrets.CODECOV_TOKEN }}
49+
3850
- name: Show testthat output
3951
if: always()
4052
run: |
4153
## --------------------------------------------------------------------
42-
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
54+
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
4355
shell: bash
4456

4557
- name: Upload test results
4658
if: failure()
47-
uses: actions/upload-artifact@v3
59+
uses: actions/upload-artifact@v4
4860
with:
4961
name: coverage-test-failures
5062
path: ${{ runner.temp }}/package

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: missRanger
22
Title: Fast Imputation of Missing Values
3-
Version: 2.6.1
3+
Version: 2.6.2
44
Authors@R:
55
person("Michael", "Mayer", , "mayermichael79@gmail.com", role = c("aut", "cre"))
66
Description: Alternative implementation of the beautiful 'MissForest'

NEWS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# missRanger 2.6.2
2+
3+
### Maintenance
4+
5+
- Update code coverage version [#86](https://github.com/mayer79/missRanger/pull/86).
6+
17
# missRanger 2.6.1
28

39
### Improvement

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<!-- badges: start -->
44

55
[![R-CMD-check](https://github.com/mayer79/missRanger/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/mayer79/missRanger/actions/workflows/R-CMD-check.yaml)
6-
[![Codecov test coverage](https://codecov.io/gh/mayer79/missRanger/branch/main/graph/badge.svg)](https://app.codecov.io/gh/mayer79/missRanger?branch=main)
6+
[![Codecov test coverage](https://codecov.io/gh/mayer79/missRanger/graph/badge.svg)](https://app.codecov.io/gh/mayer79/missRanger)
77
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/missRanger)](https://cran.r-project.org/package=missRanger)
88

99
[![](https://cranlogs.r-pkg.org/badges/missRanger)](https://cran.r-project.org/package=missRanger)

missRanger.Rproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Version: 1.0
2+
ProjectId: dee62308-91e7-4f63-a78c-171191f0f386
23

34
RestoreWorkspace: Default
45
SaveWorkspace: Default

packaging.R

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#=============================================================================
1+
# =============================================================================
22
# Put together the package
3-
#=============================================================================
3+
# =============================================================================
44

55
# WORKFLOW: UPDATE EXISTING PACKAGE
66
# 1) Modify package content and documentation.
@@ -15,15 +15,15 @@ library(usethis)
1515
use_description(
1616
fields = list(
1717
Title = "Fast Imputation of Missing Values",
18-
Version = "2.6.1",
19-
Description = "Alternative implementation of the beautiful 'MissForest' algorithm used to impute
20-
mixed-type data sets by chaining random forests, introduced by Stekhoven, D.J. and
21-
Buehlmann, P. (2012) <doi:10.1093/bioinformatics/btr597>. Under the hood, it uses the
22-
lightning fast random forest package 'ranger'. Between the iterative model fitting,
23-
we offer the option of using predictive mean matching. This firstly avoids imputation
24-
with values not already present in the original data (like a value 0.3334 in 0-1 coded variable).
25-
Secondly, predictive mean matching tries to raise the variance in the resulting conditional
26-
distributions to a realistic level. This would allow, e.g., to do multiple imputation when
18+
Version = "2.6.2",
19+
Description = "Alternative implementation of the beautiful 'MissForest' algorithm used to impute
20+
mixed-type data sets by chaining random forests, introduced by Stekhoven, D.J. and
21+
Buehlmann, P. (2012) <doi:10.1093/bioinformatics/btr597>. Under the hood, it uses the
22+
lightning fast random forest package 'ranger'. Between the iterative model fitting,
23+
we offer the option of using predictive mean matching. This firstly avoids imputation
24+
with values not already present in the original data (like a value 0.3334 in 0-1 coded variable).
25+
Secondly, predictive mean matching tries to raise the variance in the resulting conditional
26+
distributions to a realistic level. This would allow, e.g., to do multiple imputation when
2727
repeating the call to missRanger(). Out-of-sample application is supported as well.",
2828
`Authors@R` = "person('Michael', 'Mayer', email = 'mayermichael79@gmail.com', role = c('aut', 'cre'))",
2929
Depends = "R (>= 3.5.0)",
@@ -42,8 +42,10 @@ use_gpl_license(2)
4242
use_github_links() # use this if this project is on github
4343

4444
# Your files that do not belong to the package itself (others are added by "use_* function")
45-
use_build_ignore(c("^packaging.R$", "[.]Rproj$", "^backlog$",
46-
"^cran-comments.md$", "^logo.png$"), escape = FALSE)
45+
use_build_ignore(c(
46+
"^packaging.R$", "[.]Rproj$", "^backlog$",
47+
"^cran-comments.md$", "^logo.png$"
48+
), escape = FALSE)
4749

4850
# If your code uses the pipe operator %>%
4951
# use_pipe()
@@ -81,9 +83,9 @@ use_github_action("pkgdown")
8183

8284
use_revdep()
8385

84-
#=============================================================================
86+
# =============================================================================
8587
# Finish package building (can use fresh session)
86-
#=============================================================================
88+
# =============================================================================
8789

8890
library(devtools)
8991

@@ -98,7 +100,7 @@ install()
98100
if (FALSE) {
99101
check_win_devel()
100102
check_rhub()
101-
103+
102104
# Takes long # devtools::install_github("r-lib/revdepcheck")
103105
revdepcheck::revdep_check(num_workers = 4L, bioc = FALSE)
104106

0 commit comments

Comments
 (0)