Skip to content

Commit 103cc61

Browse files
authored
Merge pull request #168 from ModelOriented/update-code-cov
Update code coverage version
2 parents 052c9f8 + 8a29de2 commit 103cc61

File tree

5 files changed

+34
-16
lines changed

5 files changed

+34
-16
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,23 +16,23 @@ 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
function_exclusions = c(
3637
"shapviz\\.lgb.Booster",
3738
"shapviz\\.explain",
@@ -44,18 +45,29 @@ jobs:
4445
"\\.onLoad"
4546
)
4647
)
48+
print(cov)
49+
covr::to_cobertura(cov)
4750
shell: Rscript {0}
4851

52+
- uses: codecov/codecov-action@v5
53+
with:
54+
# Fail if error if not on PR, or if on PR and token is given
55+
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
56+
files: ./cobertura.xml
57+
plugins: noop
58+
disable_search: true
59+
token: ${{ secrets.CODECOV_TOKEN }}
60+
4961
- name: Show testthat output
5062
if: always()
5163
run: |
5264
## --------------------------------------------------------------------
53-
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
65+
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
5466
shell: bash
5567

5668
- name: Upload test results
5769
if: failure()
58-
uses: actions/upload-artifact@v3
70+
uses: actions/upload-artifact@v4
5971
with:
6072
name: coverage-test-failures
6173
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: shapviz
22
Title: SHAP Visualizations
3-
Version: 0.9.7
3+
Version: 0.9.8
44
Authors@R: c(
55
person("Michael", "Mayer", , "[email protected]", role = c("aut", "cre")),
66
person("Adrian", "Stando", , "[email protected]", role = "ctb")

NEWS.md

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

39
### Documentation

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/ModelOriented/shapviz/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ModelOriented/shapviz/actions/workflows/R-CMD-check.yaml)
6-
[![Codecov test coverage](https://codecov.io/gh/ModelOriented/shapviz/graph/badge.svg)](https://app.codecov.io/gh/ModelOriented/shapviz?branch=main)
6+
[![Codecov test coverage](https://codecov.io/gh/ModelOriented/shapviz/graph/badge.svg)](https://app.codecov.io/gh/ModelOriented/shapviz)
77
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/shapviz)](https://cran.r-project.org/package=shapviz)
88

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

packaging.R

Lines changed: 6 additions & 6 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,7 +15,7 @@ library(usethis)
1515
use_description(
1616
fields = list(
1717
Title = "SHAP Visualizations",
18-
Version = "0.9.7",
18+
Version = "0.9.8",
1919
Description = "Visualizations for SHAP (SHapley Additive exPlanations),
2020
such as waterfall plots, force plots, various types of importance plots,
2121
dependence plots, and interaction plots.
@@ -28,7 +28,7 @@ use_description(
2828
that requires numerical features. The plots are inspired by those provided by
2929
the 'shap' package in Python, but there is no dependency on it.",
3030
`Authors@R` =
31-
"c(person('Michael', family = 'Mayer', role = c('aut', 'cre'), email = '[email protected]'),
31+
"c(person('Michael', family = 'Mayer', role = c('aut', 'cre'), email = '[email protected]'),
3232
person('Adrian', family = 'Stando', role = 'ctb', email = '[email protected]'))",
3333
Depends = "R (>= 3.6.0)"
3434
),
@@ -92,9 +92,9 @@ use_github_links(overwrite = TRUE) # use this if this project is on github
9292
# Revdep
9393
use_revdep()
9494

95-
#=============================================================================
95+
# =============================================================================
9696
# Finish package building (can use fresh session)
97-
#=============================================================================
97+
# =============================================================================
9898

9999
library(devtools)
100100

0 commit comments

Comments
 (0)