Skip to content

Commit 9aaa636

Browse files
authored
Merge branch 'main' into main
2 parents cc2adcf + 95a54a1 commit 9aaa636

Some content is hidden

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

70 files changed

+2717
-238
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: 20 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.9011
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'.
@@ -16,7 +17,7 @@ URL: https://github.com/quarto-dev/quarto-r,
1617
BugReports: https://github.com/quarto-dev/quarto-r/issues
1718
Depends:
1819
R (>= 3.6)
19-
Imports:
20+
Imports:
2021
cli,
2122
fs,
2223
jsonlite,
@@ -29,10 +30,24 @@ Imports:
2930
utils,
3031
yaml
3132
Suggests:
33+
bslib,
34+
callr,
3235
curl,
36+
dplyr,
37+
flextable,
38+
ggiraph,
39+
ggplot2,
40+
gt,
41+
heatmaply,
3342
knitr,
43+
palmerpenguins,
44+
patchwork,
45+
pkgload,
46+
plotly,
3447
rsconnect (>= 0.8.26),
3548
testthat (>= 3.1.7),
49+
thematic,
50+
tidyverse,
3651
withr,
3752
whoami,
3853
xfun
@@ -42,5 +57,5 @@ Config/testthat/edition: 3
4257
Encoding: UTF-8
4358
Roxygen: list(markdown = TRUE)
4459
RoxygenNote: 7.3.2
45-
SystemRequirements: Quarto command line tools
46-
(https://github.com/quarto-dev/quarto-cli).
60+
SystemRequirements: Quarto command line tool
61+
(<https://github.com/quarto-dev/quarto-cli>).

NAMESPACE

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,33 @@
33
export(is_using_quarto)
44
export(new_blog_post)
55
export(quarto_add_extension)
6+
export(quarto_available)
67
export(quarto_binary_sitrep)
78
export(quarto_create_project)
89
export(quarto_inspect)
10+
export(quarto_list_extensions)
911
export(quarto_path)
1012
export(quarto_preview)
1113
export(quarto_preview_stop)
1214
export(quarto_publish_app)
1315
export(quarto_publish_doc)
1416
export(quarto_publish_site)
17+
export(quarto_remove_extension)
1518
export(quarto_render)
1619
export(quarto_serve)
20+
export(quarto_update_extension)
1721
export(quarto_use_template)
1822
export(quarto_version)
23+
export(theme_brand_flextable)
24+
export(theme_brand_ggplot2)
25+
export(theme_brand_gt)
26+
export(theme_brand_plotly)
27+
export(theme_brand_thematic)
28+
export(theme_colors_flextable)
29+
export(theme_colors_ggplot2)
30+
export(theme_colors_gt)
31+
export(theme_colors_plotly)
32+
export(theme_colors_thematic)
1933
import(rlang)
2034
importFrom(cli,cli_abort)
2135
importFrom(cli,cli_inform)

NEWS.md

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,45 @@
11
# quarto (development version)
22

3-
- Added a `new_blog_post()` function (#22).
3+
- Added a `new_blog_post()` function (thanks, @topeto, #22).
4+
5+
- Quarto CLI will now correctly use the same R version than the one used to run functions in this package (#204).
6+
7+
- Add `quarto_available()` function to check if Quarto CLI is found (thanks, @hadley, #187).
8+
9+
- `quarto_render()` now correctly set `as_job` when not inside RStudio IDE and required **rstudioapi** functions are not available (#203).
10+
11+
- Add several new wrapper function (thanks, @parmsam, #192):
12+
- `quarto_list_extensions()` to list installed extensions using `quarto list extensions`
13+
- `quarto_remove_extension()` to remove an installed extension using `quarto remove extensions`
14+
- `quarto_update_extension()` to update an installed extension using `quarto update extensions`
15+
16+
- `quarto_create_project()` offers better user experience now (thanks, @jennybc, #206, #153).
17+
18+
- `quarto_preview()` gains a `quiet` argument to suppress any output from R or Quarto CLI (thanks, @cwickham, #232.)
19+
20+
- 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)).
21+
22+
- Add `quarto.quiet` options to allow more verbose error message when `quarto_*` function are used inside other package.
23+
For example, inside **pkgdown** for building Quarto vignettes. **pkgdown** sets `quiet = TRUE` internally for its call to `quarto_render()`,
24+
and setting `options(quarto.quiet = TRUE)` allows to overwrite this.
25+
26+
- `quarto_path()` now returns a normalized path with potential symlink resolved, for less confusion with `quarto_binary_sitrep()` (thanks, @jennybc).
27+
28+
- Fix an error with interactive prompt for extension approval (thanks, @wjschne, #212).
29+
30+
- `quarto_path()` now correctly return `NULL` when no quarto is found in the PATH (thanks, @jeroen, #220, #221).
31+
32+
- `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).
33+
34+
- 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))
35+
36+
# quarto 1.4.4
37+
38+
- `quarto_preview()` now looks at `quarto preview` log to browse to the correct url when inside RStudio viewer (thanks, @aronatkins, #167).
39+
40+
- 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).
41+
42+
- Adapt tests for CRAN checks issues due to Quarto v1.5.54 regression (though it is fixed upstream).
443

544
- Approval check in `quarto_add_extension()` and `quarto_use_template()` now works correctly (thanks, @eveyp, #172).
645

@@ -11,7 +50,7 @@
1150
- 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).
1251

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

1756
- 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)