Skip to content

Commit 2640afc

Browse files
committed
Upkeep
1 parent 2f98531 commit 2640afc

File tree

6 files changed

+32
-29
lines changed

6 files changed

+32
-29
lines changed

.github/workflows/R-CMD-check.yaml

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

9-
name: R-CMD-check
8+
name: R-CMD-check.yaml
9+
10+
permissions: read-all
1011

1112
jobs:
1213
R-CMD-check:
@@ -49,3 +50,4 @@ jobs:
4950
- uses: r-lib/actions/check-r-package@v2
5051
with:
5152
upload-snapshots: true
53+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

.github/workflows/pkgdown.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ on:
44
push:
55
branches: [devel, main, master]
66
pull_request:
7-
branches: [devel, main, master]
87
release:
98
types: [published]
109
workflow_dispatch:
1110

12-
name: pkgdown
11+
name: pkgdown.yaml
12+
13+
permissions: read-all
1314

1415
jobs:
1516
pkgdown:
@@ -19,6 +20,8 @@ jobs:
1920
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
2021
env:
2122
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
23+
permissions:
24+
contents: write
2225
steps:
2326
- uses: actions/checkout@v4
2427
with:
@@ -41,7 +44,7 @@ jobs:
4144

4245
- name: Deploy to GitHub pages 🚀
4346
if: github.event_name != 'pull_request'
44-
uses: JamesIves/github-pages-deploy-action@v4.4.1
47+
uses: JamesIves/github-pages-deploy-action@v4.5.0
4548
with:
4649
clean: false
4750
branch: gh-pages

.github/workflows/test-coverage.yaml

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

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

1112
jobs:
1213
test-coverage:
@@ -25,23 +26,34 @@ jobs:
2526

2627
- uses: r-lib/actions/setup-r-dependencies@v2
2728
with:
28-
extra-packages: any::covr
29+
extra-packages: any::covr, any::xml2
2930
needs: coverage
3031

3132
- name: Test coverage
3233
run: |
33-
covr::codecov(
34+
cov <- covr::package_coverage(
3435
quiet = FALSE,
3536
clean = FALSE,
36-
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
37+
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
3738
)
39+
print(cov)
40+
covr::to_cobertura(cov)
3841
shell: Rscript {0}
3942

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

4759
- name: Upload test results

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Description: Distributes samples in batches while making batches
1414
number of variables, both numeric and categorical. For quality control
1515
it provides functions to subset a representative sample.
1616
License: MIT + file LICENSE
17-
URL: https://experdesign.llrs.dev, https://github.com/llrs/experDesign/, https://github.com/llrs/experDesign
17+
URL: https://experdesign.llrs.dev, https://github.com/llrs/experDesign/
1818
BugReports: https://github.com/llrs/experDesign/issues
1919
Depends:
2020
R (>= 3.5.0)

README.Rmd

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,11 @@ knitr::opts_chunk$set(
1818
[![CRAN status](https://www.r-pkg.org/badges/version/experDesign)](https://CRAN.R-project.org/package=experDesign)
1919
[![CRAN checks](https://badges.cranchecks.info/worst/experDesign.svg)](https://cran.r-project.org/web/checks/check_results_experDesign.html)
2020
[![R-CMD-check](https://github.com/llrs/experDesign/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/llrs/experDesign/actions/workflows/R-CMD-check.yaml)
21-
[![Coverage status](https://codecov.io/gh/llrs/experDesign/branch/devel/graph/badge.svg)](https://app.codecov.io/github/llrs/experDesign)
21+
[![Codecov test coverage](https://codecov.io/gh/llrs/experDesign/graph/badge.svg)](https://app.codecov.io/gh/llrs/experDesign)
2222
[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
2323
[![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
2424
[![JOSS](https://joss.theoj.org/papers/10.21105/joss.03358/status.svg)](https://doi.org/10.21105/joss.03358)
2525
[![DOI](https://zenodo.org/badge/142569201.svg)](https://zenodo.org/badge/latestdoi/142569201)
26-
2726
<!-- badges: end -->
2827

2928
The goal of experDesign is to help you distribute your samples before an experiment but after they are collected.

README.md

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,15 @@ status](https://www.r-pkg.org/badges/version/experDesign)](https://CRAN.R-projec
1010
[![CRAN
1111
checks](https://badges.cranchecks.info/worst/experDesign.svg)](https://cran.r-project.org/web/checks/check_results_experDesign.html)
1212
[![R-CMD-check](https://github.com/llrs/experDesign/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/llrs/experDesign/actions/workflows/R-CMD-check.yaml)
13-
[![Coverage
14-
status](https://codecov.io/gh/llrs/experDesign/branch/master/graph/badge.svg)](https://app.codecov.io/github/llrs/experDesign)
13+
[![Codecov test
14+
coverage](https://codecov.io/gh/llrs/experDesign/graph/badge.svg)](https://app.codecov.io/gh/llrs/experDesign)
1515
[![Lifecycle:
1616
stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable)
1717
[![Project Status: Active - The project has reached a stable, usable
1818
state and is being actively
1919
developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
2020
[![JOSS](https://joss.theoj.org/papers/10.21105/joss.03358/status.svg)](https://doi.org/10.21105/joss.03358)
2121
[![DOI](https://zenodo.org/badge/142569201.svg)](https://zenodo.org/badge/latestdoi/142569201)
22-
2322
<!-- badges: end -->
2423

2524
The goal of experDesign is to help you distribute your samples before an
@@ -120,9 +119,6 @@ combination with the original according to multiple statistics.
120119
omit <- c("Wr.Hnd", "NW.Hnd", "Fold", "Pulse", "Clap", "Exer", "Height", "M.I")
121120
(keep <- colnames(survey)[!colnames(survey) %in% omit])
122121
#> [1] "Sex" "W.Hnd" "Smoke" "Age"
123-
```
124-
125-
``` r
126122
head(survey[, keep])
127123
#> Sex W.Hnd Smoke Age
128124
#> 1 Female Right Never 18.250
@@ -131,18 +127,12 @@ head(survey[, keep])
131127
#> 4 Male Right Never 20.333
132128
#> 5 Male Right Never 23.667
133129
#> 6 Female Right Never 21.000
134-
```
135-
136-
``` r
137130

138131
# Set a seed for reproducibility
139132
set.seed(87732135)
140133
# Looking for groups at most of 70 samples.
141134
index <- design(pheno = survey, size_subset = 70, omit = omit, iterations = 100)
142135
#> Warning: There might be some problems with the data use check_data().
143-
```
144-
145-
``` r
146136
index
147137
#> $SubSet1
148138
#> [1] 3 9 10 14 16 21 23 24 25 30 44 46 56 57 59 62 63 68 69
@@ -175,9 +165,6 @@ a colleague with:
175165
``` r
176166
head(batch_names(index))
177167
#> [1] "SubSet3" "SubSet3" "SubSet1" "SubSet4" "SubSet2" "SubSet2"
178-
```
179-
180-
``` r
181168
# Or via inspect() to keep it in a matrix format:
182169
head(inspect(index, survey[, keep]))
183170
#> Sex W.Hnd Smoke Age batch

0 commit comments

Comments
 (0)