Skip to content

Commit 4c63c43

Browse files
Merge pull request #20 from PennChopMicrobiomeProgram/use-native-pipe
Use native pipe, fix linting errors, update workflows
2 parents 5d1d5d6 + 59578ac commit 4c63c43

21 files changed

Lines changed: 629 additions & 325 deletions

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

Lines changed: 51 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,51 @@
1-
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
2-
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3-
on:
4-
push:
5-
branches: [main, master]
6-
pull_request:
7-
branches: [main, master]
8-
9-
name: R-CMD-check
10-
11-
jobs:
12-
R-CMD-check:
13-
runs-on: ${{ matrix.config.os }}
14-
15-
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
16-
17-
strategy:
18-
fail-fast: false
19-
matrix:
20-
config:
21-
- {os: macOS-latest, r: 'release'}
22-
- {os: windows-latest, r: 'release'}
23-
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
24-
- {os: ubuntu-latest, r: 'release'}
25-
- {os: ubuntu-latest, r: 'oldrel-1'}
26-
27-
env:
28-
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
29-
R_KEEP_PKG_SOURCE: yes
30-
31-
steps:
32-
- uses: actions/checkout@v4
33-
34-
- uses: r-lib/actions/setup-pandoc@v2
35-
36-
- uses: r-lib/actions/setup-r@v2
37-
with:
38-
r-version: ${{ matrix.config.r }}
39-
http-user-agent: ${{ matrix.config.http-user-agent }}
40-
use-public-rspm: true
41-
42-
- uses: r-lib/actions/setup-r-dependencies@v2
43-
with:
44-
extra-packages: rcmdcheck
45-
46-
- uses: r-lib/actions/check-r-package@v2
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
8+
name: R-CMD-check.yaml
9+
10+
permissions: read-all
11+
12+
jobs:
13+
R-CMD-check:
14+
runs-on: ${{ matrix.config.os }}
15+
16+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
config:
22+
- {os: macos-latest, r: 'release'}
23+
- {os: windows-latest, r: 'release'}
24+
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
25+
- {os: ubuntu-latest, r: 'release'}
26+
- {os: ubuntu-latest, r: 'oldrel-1'}
27+
28+
env:
29+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
30+
R_KEEP_PKG_SOURCE: yes
31+
32+
steps:
33+
- uses: actions/checkout@v4
34+
35+
- uses: r-lib/actions/setup-pandoc@v2
36+
37+
- uses: r-lib/actions/setup-r@v2
38+
with:
39+
r-version: ${{ matrix.config.r }}
40+
http-user-agent: ${{ matrix.config.http-user-agent }}
41+
use-public-rspm: true
42+
43+
- uses: r-lib/actions/setup-r-dependencies@v2
44+
with:
45+
extra-packages: any::rcmdcheck
46+
needs: check
47+
48+
- uses: r-lib/actions/check-r-package@v2
49+
with:
50+
upload-snapshots: true
51+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

.github/workflows/linter.yaml

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,30 @@
1-
name: Super-Linter
2-
3-
on:
4-
pull_request:
5-
branches: [ master, main ]
6-
push:
7-
branches: [ master, main ]
8-
9-
jobs:
10-
lint:
11-
name: Lint Code Base
12-
runs-on: ubuntu-latest
13-
14-
steps:
15-
- name: Checkout Code
16-
uses: actions/checkout@v3
17-
18-
- name: Lint Code Base
19-
uses: github/super-linter@v4
20-
env:
21-
VALIDATE_ALL_CODEBASE: true
22-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23-
24-
VALIDATE_R_LINTR: true
25-
26-
FILTER_REGEX_INCLUDE: R/.*|tests/.*\.R
1+
name: Lint Code Base
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
run-lint:
11+
name: Lint Code Base
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout Code
15+
uses: actions/checkout@v4
16+
with:
17+
# Full git history is needed for Super-Linter to detect changed files
18+
fetch-depth: 0
19+
20+
- name: Super-Linter
21+
uses: super-linter/super-linter@v7
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
# Enable only R linting (optional; defaults to all languages if omitted)
25+
VALIDATE_R: true
26+
# Lint the entire codebase (true) or just changed files (false)
27+
VALIDATE_ALL_CODEBASE: false
28+
# Set the default branch (required for diff-based linting)
29+
DEFAULT_BRANCH: main
30+
FILTER_REGEX_INCLUDE: R/.*|tests/.*\.R
Lines changed: 62 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,62 @@
1-
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
2-
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3-
on:
4-
push:
5-
branches: [main, master]
6-
pull_request:
7-
branches: [main, master]
8-
9-
name: test-coverage
10-
11-
jobs:
12-
test-coverage:
13-
runs-on: ubuntu-latest
14-
env:
15-
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
16-
17-
steps:
18-
- uses: actions/checkout@v4
19-
20-
- uses: r-lib/actions/setup-r@v2
21-
with:
22-
use-public-rspm: true
23-
24-
- uses: r-lib/actions/setup-r-dependencies@v2
25-
with:
26-
extra-packages: covr
27-
28-
- name: Test coverage
29-
run: covr::codecov()
30-
shell: Rscript {0}
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
8+
name: test-coverage.yaml
9+
10+
permissions: read-all
11+
12+
jobs:
13+
test-coverage:
14+
runs-on: ubuntu-latest
15+
env:
16+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- uses: r-lib/actions/setup-r@v2
22+
with:
23+
use-public-rspm: true
24+
25+
- uses: r-lib/actions/setup-r-dependencies@v2
26+
with:
27+
extra-packages: any::covr, any::xml2
28+
needs: coverage
29+
30+
- name: Test coverage
31+
run: |
32+
cov <- covr::package_coverage(
33+
quiet = FALSE,
34+
clean = FALSE,
35+
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
36+
)
37+
print(cov)
38+
covr::to_cobertura(cov)
39+
shell: Rscript {0}
40+
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+
50+
- name: Show testthat output
51+
if: always()
52+
run: |
53+
## --------------------------------------------------------------------
54+
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
55+
shell: bash
56+
57+
- name: Upload test results
58+
if: failure()
59+
uses: actions/upload-artifact@v4
60+
with:
61+
name: coverage-test-failures
62+
path: ${{ runner.temp }}/package

DESCRIPTION

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Description: Contains a tidy method for adonis results, custom permutation
1616
License: GPL-3 + file LICENSE
1717
Encoding: UTF-8
1818
LazyData: true
19-
RoxygenNote: 7.3.1
19+
RoxygenNote: 7.3.3
2020
Imports:
2121
generics (>= 0.0.2),
2222
rlang,
@@ -25,11 +25,10 @@ Imports:
2525
dplyr (>= 1.0.0),
2626
tibble (>= 3.0.0),
2727
ape,
28-
magrittr,
2928
ggplot2,
3029
stringr
3130
Depends:
32-
R (>= 2.10)
31+
R (>= 4.1.0)
3332
Suggests:
3433
covr,
3534
testthat

NAMESPACE

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ S3method(plot,nmdsplus)
44
S3method(plot,pcoaplus)
55
S3method(tidy,adonis)
66
S3method(tidy,anova.cca)
7-
export("%>%")
87
export(adonisplus)
98
export(adonispost)
109
export(nmdsplus)
@@ -13,4 +12,3 @@ export(shuffle_between_groups)
1312
export(shuffle_within_groups)
1413
export(tidy)
1514
importFrom(generics,tidy)
16-
importFrom(magrittr,"%>%")

0 commit comments

Comments
 (0)