Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
5cc49df
ci: update GHA workflow
maelle Feb 17, 2025
2a976e1
chore: remove {git2r}
maelle Feb 17, 2025
925d56c
chore: get errors from gh
maelle Feb 17, 2025
3ba2b0a
feat: use usethis::git_sitrep()
maelle Feb 17, 2025
74ea2ba
chore: get readme from api
maelle Feb 17, 2025
9279559
docs: use usethis
maelle Feb 17, 2025
13834fb
fix: fix clone
maelle Feb 17, 2025
2a8ec61
chore: rm rstudio check
maelle Feb 17, 2025
2db00ca
refactor: simplify
maelle Feb 17, 2025
9b6bb0e
test: refactor test
maelle Feb 17, 2025
1522328
test: simplify
maelle Feb 17, 2025
e968b8c
ci: rm tic
maelle Feb 17, 2025
6652a74
test: simplify
maelle Feb 17, 2025
1daf4dc
chore: r cmd check
maelle Feb 17, 2025
6da1f38
chore: change roles, add more metadata
maelle Feb 18, 2025
acf7d33
docs: add pkgdown URL
maelle Feb 18, 2025
38f2dae
ci: add covr workflow, fix badge
maelle Feb 18, 2025
7aeeec1
docs: README improvements
maelle Feb 18, 2025
745b43e
chore: fix meta
maelle Feb 18, 2025
c03b567
docs: make README Rmd
maelle Feb 18, 2025
16ca3ce
docs: small tweaks to main vignette
maelle Feb 18, 2025
220580f
docs: simplify publishing vignette
maelle Feb 18, 2025
18e73c6
chore: rm magrittr from templates
maelle Feb 18, 2025
c2450a3
chore: TRUE not T
maelle Feb 18, 2025
164b958
chore: run {styler}
maelle Feb 18, 2025
777f59e
chore: refactoring aided by lintr
maelle Feb 18, 2025
4bd5a7a
chore: more refactoring
maelle Feb 18, 2025
592e146
chore: buildignore .lintr
maelle Feb 18, 2025
e4fb5d2
chore: refactoring
maelle Feb 18, 2025
49d7424
chore: slight refactoring
maelle Feb 18, 2025
179ec69
feat!: rm function that prints the source, I wouldn't recommend readi…
maelle Feb 18, 2025
7bc57ef
chore: rm dplyr (switch() instead), use fs more
maelle Feb 18, 2025
9eb54ed
test: refactoring
maelle Feb 18, 2025
7847944
ci: add lintr GHA workflow
maelle Feb 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
^dev$
^docs$
^\.github$
^\.lintr$
88 changes: 23 additions & 65 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches:
- main
- master
branches: [main, master]
pull_request:
branches:
- main
- master
schedule:
- cron: '0 0 * * *'

name: R-CMD-check
name: R-CMD-check.yaml

permissions: read-all

jobs:
R-CMD-check:
Expand All @@ -24,70 +19,33 @@ jobs:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: macOS-latest, r: 'release'}
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-pandoc@v1

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Restore R package cache
if: runner.os != 'Windows'
uses: actions/cache@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install system dependencies
if: runner.os == 'Linux'
run: |
while read -r cmd
do
eval sudo $cmd
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')

- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}

- name: Configure Git user
run: |
git config --global user.email "ghau@example.com"
git config --global user.name "GitHub Actions User"

- name: Check
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: |
options(crayon.enabled = TRUE)
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}
extra-packages: any::rcmdcheck
needs: check

- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
- uses: r-lib/actions/check-r-package@v2
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
upload-snapshots: true
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
45 changes: 45 additions & 0 deletions .github/workflows/lint-changed-files.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
pull_request:

name: lint-changed-files.yaml

permissions: read-all

jobs:
lint-changed-files:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
any::gh
any::lintr
any::purrr
needs: check

- name: Add lintr options
run: |
cat('\noptions(lintr.linter_file = ".lintr")\n', file = "~/.Rprofile", append = TRUE)
shell: Rscript {0}

- name: Install package
run: R CMD INSTALL .

- name: Extract and lint files changed by this PR
run: |
files <- gh::gh("GET https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files")
changed_files <- purrr::map_chr(files, "filename")
all_files <- list.files(recursive = TRUE)
exclusions_list <- as.list(setdiff(all_files, changed_files))
lintr::lint_package(exclusions = exclusions_list)
shell: Rscript {0}
env:
LINTR_ERROR_ON_LINT: true
61 changes: 61 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:

name: test-coverage.yaml

permissions: read-all

jobs:
test-coverage:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr, any::xml2
needs: coverage

- name: Test coverage
run: |
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
covr::to_cobertura(cov)
shell: Rscript {0}

- uses: codecov/codecov-action@v4
with:
# Fail if error if not on PR, or if on PR and token is given
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
file: ./cobertura.xml
plugin: noop
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
9 changes: 9 additions & 0 deletions .lintr
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
linters: lintr::linters_with_tags(tags = NULL)
encoding: "UTF-8"
exclusions: list(
# excluded from all lints:
"inst/examples/example-review-index.Rmd",
"tests/testthat.R",
"vignettes/editors.Rmd",
"vignettes/pkgreviewr.Rmd"
)
76 changes: 35 additions & 41 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,52 +1,46 @@
Package: pkgreviewr
Type: Package
Package: pkgreviewr
Title: rOpenSci package review project template
Version: 0.3.1
Authors@R: c(person("Anna", "Krystalli", email = "annakrystalli@googlemail.com",
role = c("aut", "cre")),
person("Maëlle", "Salmon", email = "maelle.salmon@yahoo.se", role = "aut"))
Description: Creates files and collects materials necessary to complete an rOpenSci package review.
Review files are prepopulated with review package specific metadata. Review package source code is
also cloned for local testing and inspection.
Version: 0.3.9999
Authors@R: c(
person("Anna", "Krystalli", , "annakrystalli@googlemail.com", role = c("aut"),
comment = c(ORCID = "0000-0002-2378-4915", "Created the package")),
person("Maëlle", "Salmon", , "maelle@ropensci.org", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-2815-0399"))
)
Description: Creates files and collects materials necessary to complete an
rOpenSci package review. Review files are prepopulated with review
package specific metadata. Review package source code is also cloned
for local testing and inspection.
License: GPL (>= 3)+ file LICENSE
URL: https://github.com/ropensci-org/pkgreviewr
URL: https://docs.ropensci.org/pkgreviewr/, https://github.com/ropensci-org/pkgreviewr
BugReports: https://github.com/ropensci-org/pkgreviewr/issues
Encoding: UTF-8
LazyData: true
Imports:
devtools,
git2r (>= 0.23.0),
usethis (>= 1.2.0),
here,
reprex,
gh,
base64enc,
magrittr,
covr,
goodpractice,
Imports:
assertthat,
httr,
rstudioapi,
clipr,
clisymbols,
crayon,
dplyr,
glue,
brio,
cli,
curl,
desc,
fs (>= 1.3.1),
shiny,
withr,
spelling,
emo
gert,
gh,
glue,
magrittr,
rlang,
usethis,
withr
Suggests:
testthat,
mockery,
knitr,
mockery,
mockthat,
rmarkdown,
mockthat
RoxygenNote: 7.1.2
testthat (>= 3.0.0)
VignetteBuilder:
knitr
Remotes:
hadley/emo,
mangoTheCat/goodpractice
VignetteBuilder: knitr
hadley/emo
Config/testthat/edition: 3
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
Date: 2021-08-12
RoxygenNote: 7.3.2.9000
3 changes: 1 addition & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ export(pkgreview_create)
export(pkgreview_getdata)
export(pkgreview_index_rmd)
export(pkgreview_init)
export(pkgreview_print_source)
export(pkgreview_readme_md)
export(pkgreview_request)
export(render_request)
export(try_whoami)
export(use_onboarding_tmpl)
importFrom(magrittr,"%>%")
importFrom(rlang,"%||%")
Loading
Loading