Skip to content

Commit ba68b3e

Browse files
committed
Merge branch 'main' into parmsam-188_cli_wrapper_exts
2 parents fa71abf + d643d27 commit ba68b3e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1656
-186
lines changed

.Rbuildignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
^doc$
1010
^Meta$
1111

12+
^vignettes/.quarto$
1213
^vignettes/*_files$
1314
^revdep$
1415
^cran-comments\.md$
1516
^codecov\.yml$
1617
^CRAN-SUBMISSION$
18+
^[\.]?air\.toml$

.github/workflows/pkgdown.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ jobs:
2626
steps:
2727
- uses: actions/checkout@v4
2828

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+
2936
- uses: r-lib/actions/setup-pandoc@v2
3037

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

.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 }}

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
.Rproj.user
22
.Rhistory
33

4-
.vscode
5-
64
inst/doc
75
docs
86

.vscode/extensions.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"recommendations": [
3+
"Posit.air-vscode"
4+
]
5+
}

.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"[r]": {
3+
"editor.formatOnSave": true,
4+
"editor.defaultFormatter": "Posit.air-vscode"
5+
}
6+
}

DESCRIPTION

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
Package: quarto
22
Title: R Interface to 'Quarto' Markdown Publishing System
3-
Version: 1.4.2
3+
Version: 1.4.4.9007
44
Authors@R: c(
55
person("JJ", "Allaire", , "[email protected]", role = "aut",
66
comment = c(ORCID = "0000-0003-0174-9868")),
77
person("Christophe", "Dervieux", , "[email protected]", role = c("cre", "aut"),
88
comment = c(ORCID = "0000-0003-4474-2498")),
9-
person("Posit Software, PBC", role = c("cph", "fnd"))
9+
person("Posit Software, PBC", role = c("cph", "fnd")),
10+
person("Gordon", "Woodhull", role = "ctb")
1011
)
1112
Description: Convert R Markdown documents and 'Jupyter' notebooks to a
1213
variety of output formats using 'Quarto'.
@@ -29,16 +30,26 @@ Imports:
2930
yaml
3031
Suggests:
3132
curl,
33+
flextable,
34+
ggiraph,
35+
ggplot2,
36+
gt,
37+
heatmaply,
3238
knitr,
39+
palmerpenguins,
40+
patchwork,
41+
plotly,
3342
rsconnect (>= 0.8.26),
3443
testthat (>= 3.1.7),
44+
thematic,
45+
tidyverse,
3546
withr,
3647
xfun
3748
VignetteBuilder:
3849
quarto
3950
Config/testthat/edition: 3
4051
Encoding: UTF-8
4152
Roxygen: list(markdown = TRUE)
42-
RoxygenNote: 7.3.1
43-
SystemRequirements: Quarto command line tools
44-
(https://github.com/quarto-dev/quarto-cli).
53+
RoxygenNote: 7.3.2
54+
SystemRequirements: Quarto command line tool
55+
(<https://github.com/quarto-dev/quarto-cli>).

NAMESPACE

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@ export(quarto_serve)
1818
export(quarto_update_extension)
1919
export(quarto_use_template)
2020
export(quarto_version)
21+
export(theme_brand_flextable)
22+
export(theme_brand_ggplot)
23+
export(theme_brand_gt)
24+
export(theme_brand_plotly)
25+
export(theme_brand_thematic)
26+
export(theme_colors_flextable)
27+
export(theme_colors_ggplot)
28+
export(theme_colors_gt)
29+
export(theme_colors_plotly)
30+
export(theme_colors_thematic)
2131
import(rlang)
2232
importFrom(cli,cli_abort)
2333
importFrom(cli,cli_inform)

NEWS.md

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

3+
- `quarto_preview()` gains a `quiet` argument to suppress any output from R or Quarto CLI (thanks, @cwickham, #232.)
4+
5+
- Add some helpers function `theme_brand_*` and `theme_colors_*` to help theme with dark and light brand using some common graph and table packages (thanks, @gordonwoodhull, [#234](https://github.com/quarto-dev/quarto-r/issues/234)).
6+
7+
- Add `quarto.quiet` options to allow more verbose error message when `quarto_*` function are used inside other package.
8+
For example, inside **pkgdown** for building Quarto vignettes. **pkgdown** sets `quiet = TRUE` internally for its call to `quarto_render()`,
9+
and setting `options(quarto.quiet = TRUE)` allows to overwrite this.
10+
11+
- `quarto_path()` now returns a normalized path with potential symlink resolved, for less confusion with `quarto_binary_sitrep()` (thanks, @jennybc).
12+
13+
- Fix an error with interactive prompt for extension approval (thanks, @wjschne, #212).
14+
15+
- `quarto_path()` now correctly return `NULL` when no quarto is found in the PATH (thanks, @jeroen, #220, #221).
16+
17+
- `QUARTO_R_QUIET` environment variable can be used to set `quarto.quiet` option, which overrides any `quiet = TRUE` argument passed to `quarto_*` functions. This can be useful to debug Quarto rendering inside other packages, like **pkgdown**. Overrides will also now happens for [GHA debug logging](https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/troubleshooting-workflows/enabling-debug-logging).
18+
19+
- Correctly report Quarto CLI error when background process call to `quarto` fails (thanks, @salim-b, [#235](https://github.com/quarto-dev/quarto-r/issues/235))
20+
21+
# quarto 1.4.4
22+
23+
- `quarto_preview()` now looks at `quarto preview` log to browse to the correct url when inside RStudio viewer (thanks, @aronatkins, #167).
24+
25+
- 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).
26+
27+
- Adapt tests for CRAN checks issues due to Quarto v1.5.54 regression (though it is fixed upstream).
28+
329
- Approval check in `quarto_add_extension()` and `quarto_use_template()` now works correctly (thanks, @eveyp, #172).
430

531
# quarto 1.4
@@ -9,7 +35,7 @@
935
- 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).
1036

1137
- New `quarto_binary_sitrep()` checks possible difference in Quarto binary used by this package, and the one used by RStudio IDE (thanks, @jthomasmock, #12).
12-
38+
1339
- 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).
1440

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

R/add.R

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,30 @@
3131
#' @importFrom rlang is_interactive
3232
#' @importFrom cli cli_abort
3333
#' @export
34-
quarto_add_extension <- function(extension = NULL, no_prompt = FALSE, quiet = FALSE, quarto_args = NULL) {
34+
quarto_add_extension <- function(
35+
extension = NULL,
36+
no_prompt = FALSE,
37+
quiet = FALSE,
38+
quarto_args = NULL
39+
) {
3540
rlang::check_required(extension)
3641

3742
quarto_bin <- find_quarto()
3843

3944
# This will ask for approval or stop installation
40-
approval <- check_extension_approval(no_prompt, "Quarto extensions", "https://quarto.org/docs/extensions/managing.html")
45+
approval <- check_extension_approval(
46+
no_prompt,
47+
"Quarto extensions",
48+
"https://quarto.org/docs/extensions/managing.html"
49+
)
4150

4251
if (approval) {
43-
args <- c(extension, "--no-prompt", if (quiet) cli_arg_quiet(), quarto_args)
52+
args <- c(
53+
extension,
54+
"--no-prompt",
55+
if (is_quiet(quiet)) cli_arg_quiet(),
56+
quarto_args
57+
)
4458
quarto_add(args, quarto_bin = quarto_bin, echo = TRUE)
4559
}
4660

0 commit comments

Comments
 (0)