Skip to content

Commit 497d895

Browse files
committed
Merge branch 'main' into improve-render
2 parents 193bc46 + 0fcb998 commit 497d895

32 files changed

+308
-101
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
^doc$
1010
^Meta$
1111

12+
^vignettes/.quarto$
1213
^vignettes/*_files$
1314
^revdep$
1415
^cran-comments\.md$

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@
55
# check-standard.yaml is likely a better choice.
66
# usethis::use_github_action("check-standard") will install it.
77
on:
8+
workflow_dispatch:
89
push:
910
branches: [main, master]
1011
pull_request:
1112
branches: [main, master]
1213

1314
name: R-CMD-check
1415

16+
permissions: read-all
17+
1518
jobs:
1619
R-CMD-check:
1720
runs-on: ${{ matrix.config.os }}
@@ -27,8 +30,6 @@ jobs:
2730

2831
- {os: windows-latest, r: 'release'}
2932
- {os: windows-latest, r: 'release', quarto: 'pre-release'}
30-
# Use 3.6 to trigger usage of RTools35
31-
- {os: windows-latest, r: '3.6'}
3233
# use 4.1 to check with rtools40's older compiler
3334
- {os: windows-latest, r: '4.1'}
3435

@@ -48,6 +49,8 @@ jobs:
4849
- uses: actions/checkout@v4
4950

5051
- uses: quarto-dev/quarto-actions/setup@v2
52+
env:
53+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5154
with:
5255
version: ${{ matrix.config.quarto || 'release' }}
5356
tinytex: true
@@ -71,3 +74,4 @@ jobs:
7174
- uses: r-lib/actions/check-r-package@v2
7275
with:
7376
upload-snapshots: true
77+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

.github/workflows/pkgdown.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ on:
1111

1212
name: pkgdown
1313

14+
permissions: read-all
15+
1416
jobs:
1517
pkgdown:
1618
runs-on: ubuntu-latest
@@ -24,6 +26,13 @@ jobs:
2426
steps:
2527
- uses: actions/checkout@v4
2628

29+
- uses: quarto-dev/quarto-actions/setup@v2
30+
env:
31+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
with:
33+
version: pre-release
34+
tinytex: true
35+
2736
- uses: r-lib/actions/setup-pandoc@v2
2837

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

.github/workflows/pr-commands.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66

77
name: Commands
88

9+
permissions: read-all
10+
911
jobs:
1012
document:
1113
if: ${{ github.event.issue.pull_request && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') && startsWith(github.event.comment.body, '/document') }}

.github/workflows/rhub.yaml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# R-hub's generic GitHub Actions workflow file. It's canonical location is at
2+
# https://github.com/r-hub/actions/blob/v1/workflows/rhub.yaml
3+
# You can update this file to a newer version using the rhub2 package:
4+
#
5+
# rhub::rhub_setup()
6+
#
7+
# It is unlikely that you need to modify this file manually.
8+
9+
name: R-hub
10+
run-name: "${{ github.event.inputs.id }}: ${{ github.event.inputs.name || format('Manually run by {0}', github.triggering_actor) }}"
11+
12+
on:
13+
workflow_dispatch:
14+
inputs:
15+
config:
16+
description: 'A comma separated list of R-hub platforms to use.'
17+
type: string
18+
default: 'linux,windows,macos'
19+
name:
20+
description: 'Run name. You can leave this empty now.'
21+
type: string
22+
id:
23+
description: 'Unique ID. You can leave this empty now.'
24+
type: string
25+
26+
jobs:
27+
28+
setup:
29+
runs-on: ubuntu-latest
30+
outputs:
31+
containers: ${{ steps.rhub-setup.outputs.containers }}
32+
platforms: ${{ steps.rhub-setup.outputs.platforms }}
33+
34+
steps:
35+
# NO NEED TO CHECKOUT HERE
36+
- uses: r-hub/actions/setup@v1
37+
with:
38+
config: ${{ github.event.inputs.config }}
39+
id: rhub-setup
40+
41+
linux-containers:
42+
needs: setup
43+
if: ${{ needs.setup.outputs.containers != '[]' }}
44+
runs-on: ubuntu-latest
45+
name: ${{ matrix.config.label }}
46+
strategy:
47+
fail-fast: false
48+
matrix:
49+
config: ${{ fromJson(needs.setup.outputs.containers) }}
50+
container:
51+
image: ${{ matrix.config.container }}
52+
53+
steps:
54+
- uses: r-hub/actions/checkout@v1
55+
- uses: r-hub/actions/platform-info@v1
56+
with:
57+
token: ${{ secrets.RHUB_TOKEN }}
58+
job-config: ${{ matrix.config.job-config }}
59+
- uses: r-hub/actions/setup-deps@v1
60+
with:
61+
token: ${{ secrets.RHUB_TOKEN }}
62+
job-config: ${{ matrix.config.job-config }}
63+
- uses: r-hub/actions/run-check@v1
64+
with:
65+
token: ${{ secrets.RHUB_TOKEN }}
66+
job-config: ${{ matrix.config.job-config }}
67+
68+
other-platforms:
69+
needs: setup
70+
if: ${{ needs.setup.outputs.platforms != '[]' }}
71+
runs-on: ${{ matrix.config.os }}
72+
name: ${{ matrix.config.label }}
73+
strategy:
74+
fail-fast: false
75+
matrix:
76+
config: ${{ fromJson(needs.setup.outputs.platforms) }}
77+
78+
steps:
79+
- uses: r-hub/actions/checkout@v1
80+
- uses: r-hub/actions/setup-r@v1
81+
with:
82+
job-config: ${{ matrix.config.job-config }}
83+
token: ${{ secrets.RHUB_TOKEN }}
84+
- uses: r-hub/actions/platform-info@v1
85+
with:
86+
token: ${{ secrets.RHUB_TOKEN }}
87+
job-config: ${{ matrix.config.job-config }}
88+
- uses: r-hub/actions/setup-deps@v1
89+
with:
90+
job-config: ${{ matrix.config.job-config }}
91+
token: ${{ secrets.RHUB_TOKEN }}
92+
- uses: r-hub/actions/run-check@v1
93+
with:
94+
job-config: ${{ matrix.config.job-config }}
95+
token: ${{ secrets.RHUB_TOKEN }}

.github/workflows/test-coverage.yaml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88

99
name: test-coverage
1010

11+
permissions: read-all
12+
1113
jobs:
1214
test-coverage:
1315
runs-on: ubuntu-latest
@@ -28,23 +30,32 @@ jobs:
2830

2931
- uses: r-lib/actions/setup-r-dependencies@v2
3032
with:
31-
extra-packages: any::covr
33+
extra-packages: any::covr, any::xml2
3234
needs: coverage
3335

3436
- name: Test coverage
3537
run: |
36-
covr::codecov(
38+
cov <- covr::package_coverage(
3739
quiet = FALSE,
3840
clean = FALSE,
3941
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
4042
)
43+
covr::to_cobertura(cov)
4144
shell: Rscript {0}
4245

46+
- uses: codecov/codecov-action@v4
47+
with:
48+
fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }}
49+
file: ./cobertura.xml
50+
plugin: noop
51+
disable_search: true
52+
token: ${{ secrets.CODECOV_TOKEN }}
53+
4354
- name: Show testthat output
4455
if: always()
4556
run: |
4657
## --------------------------------------------------------------------
47-
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
58+
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
4859
shell: bash
4960

5061
- name: Upload test results

DESCRIPTION

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: quarto
22
Title: R Interface to 'Quarto' Markdown Publishing System
3-
Version: 1.4.1
3+
Version: 1.4.4.9003
44
Authors@R: c(
55
person("JJ", "Allaire", , "[email protected]", role = "aut",
66
comment = c(ORCID = "0000-0003-0174-9868")),
@@ -39,6 +39,6 @@ VignetteBuilder:
3939
Config/testthat/edition: 3
4040
Encoding: UTF-8
4141
Roxygen: list(markdown = TRUE)
42-
RoxygenNote: 7.3.1
43-
SystemRequirements: Quarto command line tools
44-
(https://github.com/quarto-dev/quarto-cli).
42+
RoxygenNote: 7.3.2
43+
SystemRequirements: Quarto command line tool
44+
(<https://github.com/quarto-dev/quarto-cli>).

NEWS.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,31 @@
11
# quarto (development version)
22

3+
- Add `quarto.quiet` options to allow more verbose error message when `quarto_*` function are used inside other package.
4+
For example, inside **pkgdown** for building Quarto vignettes. **pkgdown** sets `quiet = TRUE` internally for its call to `quarto_render()`,
5+
and setting `options(quarto.quiet = TRUE)` allows to overwrite this.
6+
7+
- `quarto_path()` now returns a normalized path with potential symlink resolved, for less confusion with `quarto_binary_sitrep()` (thanks, @jennybc).
8+
9+
- Fix an error with interactive prompt for extension approval (thanks, @wjschne, #212).
10+
11+
# quarto 1.4.4
12+
13+
- `quarto_preview()` now looks at `quarto preview` log to browse to the correct url when inside RStudio viewer (thanks, @aronatkins, #167).
14+
15+
- This package now uses the x.y.z.dev versionning scheme to indicate development, patch, minor and major versions. This follows [Tidyverse package version conventions](https://r-pkgs.org/lifecycle.html#sec-lifecycle-version-number-tidyverse).
16+
17+
- Adapt tests for CRAN checks issues due to Quarto v1.5.54 regression (though it is fixed upstream).
18+
19+
- Approval check in `quarto_add_extension()` and `quarto_use_template()` now works correctly (thanks, @eveyp, #172).
20+
321
# quarto 1.4
422

523
- This version is now adapted to Quarto 1.4 latest stable release.
624

725
- Add registration of vignette engine to use `quarto` as a vignette builder, and use `.qmd` file as vignette. See `vignette("hello", package = "quarto")`. (thanks, @dcnorris, #57).
826

927
- New `quarto_binary_sitrep()` checks possible difference in Quarto binary used by this package, and the one used by RStudio IDE (thanks, @jthomasmock, #12).
10-
28+
1129
- New `is_using_quarto()` to check if a directory requires using Quarto (i.e. it has a `_quarto.yml` or at least one `*.qmd` file) (thanks, @hadley, #103).
1230

1331
- New `quarto_create_project()` calls `quarto create project <type> <name>` (thanks, @maelle, #87).

R/add.R

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,12 @@ quarto_add_extension <- function(extension = NULL, no_prompt = FALSE, quiet = FA
3737
quarto_bin <- find_quarto()
3838

3939
# This will ask for approval or stop installation
40-
check_extension_approval(no_prompt, "Quarto extensions", "https://quarto.org/docs/extensions/managing.html")
40+
approval <- check_extension_approval(no_prompt, "Quarto extensions", "https://quarto.org/docs/extensions/managing.html")
4141

42-
args <- c(extension, "--no-prompt", if (quiet) cli_arg_quiet(), quarto_args)
43-
44-
quarto_add(args, quarto_bin = quarto_bin, echo = TRUE)
42+
if (approval) {
43+
args <- c(extension, "--no-prompt", if (is_quiet(quiet)) cli_arg_quiet(), quarto_args)
44+
quarto_add(args, quarto_bin = quarto_bin, echo = TRUE)
45+
}
4546

4647
invisible()
4748
}

R/create.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ quarto_create_project <- function(name, type = "default", dir = ".", no_prompt =
3939

4040
quarto_bin <- find_quarto()
4141

42-
args <- c("project", type, name, "--no-prompt", "--no-open", if (quiet) cli_arg_quiet(), quarto_args = NULL)
42+
args <- c("project", type, name, "--no-prompt", "--no-open", if (is_quiet(quiet)) cli_arg_quiet(), quarto_args = NULL)
4343

4444
owd <- setwd(dir)
4545
on.exit(setwd(owd), add = TRUE, after = FALSE)

0 commit comments

Comments
 (0)