Skip to content

Commit

Permalink
Merged origin/main into lionel--discard-current-pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Nov 2, 2023
2 parents 3ddd9d7 + c7a0727 commit bcdd464
Show file tree
Hide file tree
Showing 49 changed files with 45 additions and 35 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v3

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
covr::codecov(
quiet = FALSE,
clean = FALSE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
shell: Rscript {0}

Expand Down
5 changes: 2 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ License: MIT + file LICENSE
URL: https://roxygen2.r-lib.org/, https://github.com/r-lib/roxygen2
BugReports: https://github.com/r-lib/roxygen2/issues
Depends:
R (>= 3.3)
R (>= 3.6)
Imports:
brew,
cli (>= 3.3.0),
Expand Down Expand Up @@ -51,5 +51,4 @@ Config/testthat/edition: 3
Encoding: UTF-8
Language: en-GB
Roxygen: list(markdown = TRUE, load = "installed")
RoxygenNote: 7.2.2.9000
SystemRequirements: C++11
RoxygenNote: 7.2.3.9000
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
YEAR: 2020
YEAR: 2023
COPYRIGHT HOLDER: roxygen2 authors
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License

Copyright (c) 2020 roxygen2 authors
Copyright (c) 2023 roxygen2 authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion R/tag-metadata.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ tags_rd <- function(type) {
"@aliases",
tags_rd_section(tags, "aliases"),
"@description",
paste0("Learn full the details in in `vignette('", type, "')`."),
paste0("Learn the full details in `vignette('", type, "')`."),
"",
if (any(tags$recommend)) c(
"Key tags:",
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# roxygen2 <a href="https://roxygen2.r-lib.org"><img src="man/figures/logo.png" align="right" height="138" /></a>
# roxygen2 <a href="https://roxygen2.r-lib.org"><img src="man/figures/logo.png" align="right" height="138" alt="roxygen2 website" /></a>

<!-- badges: start -->
[![CRAN status](https://www.r-pkg.org/badges/version/roxygen2)](https://CRAN.R-project.org/package=roxygen2)
[![R-CMD-check](https://github.com/r-lib/roxygen2/workflows/R-CMD-check/badge.svg)](https://github.com/r-lib/roxygen2/actions)
[![R-CMD-check](https://github.com/r-lib/roxygen2/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/r-lib/roxygen2/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/r-lib/roxygen2/branch/main/graph/badge.svg)](https://app.codecov.io/gh/r-lib/roxygen2?branch=main)
<!-- badges: end -->

Expand Down
Binary file modified man/figures/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions man/roxygen2-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/tags-index-crossref.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/tags-namespace.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/tags-rd-formatting.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/tags-rd-other.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/tags-rd.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/tags-reuse.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified pkgdown/favicon/apple-touch-icon-120x120.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/apple-touch-icon-152x152.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/apple-touch-icon-180x180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pkgdown/favicon/apple-touch-icon-60x60.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pkgdown/favicon/apple-touch-icon-76x76.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pkgdown/favicon/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pkgdown/favicon/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pkgdown/favicon/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pkgdown/favicon/favicon.ico
Binary file not shown.
3 changes: 2 additions & 1 deletion tests/testthat/_snaps/markdown-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
Output
Message
Quitting from lines 1-1 ()
Quitting from lines 1-1
Condition
Warning:
[<text>:4] @description failed to evaluate inline markdown code
Expand Down
6 changes: 4 additions & 2 deletions tests/testthat/_snaps/rd-include-rmd.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
Code
. <- roc_proc_text(rd_roclet(), text)
Message
Quitting from lines 2-3 (<temp-path.Rmd>)
Quitting from lines 2-3 (<temp-path.Rmd>)
Quitting from lines 2-3 [unnamed-chunk-2] (<temp-path.Rmd>)
Quitting from lines 2-3 [unnamed-chunk-1] (<temp-path.Rmd>)
Condition
Warning:
[<text>:3] @includeRmd failed to evaluate '<temp-path.Rmd>'
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-collate.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ test_that("Collate field unchanged when no @includes", {
local_package_copy(test_path('testCollateNoIncludes'))

update_collate(".")
expect_equal(desc::desc_get_field("Collate"), "b.r a.r")
expect_equal(desc::desc_get_field("Collate"), "b.R a.R")
})

test_that("DESCRIPTION file is re-written only if collate changes", {
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-object-from-call.R
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ test_that("finds arguments when S4 method wrapped inside .local()", {
# R.oo / R.methodsS3 ------------------------------------------------------

test_that("can define constructor with R.oo", {
skip_if_not_installed("R.oo")
obj <- call_to_object({
R.oo::setConstructorS3("Foo", function(x, y, z) {})
})
Expand All @@ -176,6 +177,7 @@ test_that("can define constructor with R.oo", {
})

test_that("can define method for R.methodsS3", {
skip_if_not_installed("R.methodsS3")
obj <- call_to_object({
R.methodsS3::setMethodS3("foo", "default", function(x, ...) {})
})
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-package_files.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
test_that("respects order in Collate (#790)", {
expect_equal(
package_files('testCollateParse'),
normalizePath(c("testCollateParse/R/b.r", "testCollateParse/R/c.r"))
normalizePath(c("testCollateParse/R/b.R", "testCollateParse/R/c.R"))
)
})

Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-rd-include-rmd.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
skip_if_not_installed("rmarkdown")

test_that("markdown file can be included", {
skip_if_not(rmarkdown::pandoc_available("2.17"))

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/testCollateNoIncludes/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ Description:
Author: Geoff <geoff.lee99@gmail.com>
Maintainer: Geoff <geoff.lee99@gmail.com>
Version: 0.1
Collate: b.r a.r
Collate: b.R a.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Manually edited the Collate field in the DESCRIPTION file so this *should*
# run after b.r
# run after b.R

a <- 1
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/testthat/testCollateOverwrite/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Author: Hadley <h.wickham@gmail.com>
Maintainer: Hadley <h.wickham@gmail.com>
Version: 0.1
Collate:
'b.r'
'b.R'
2 changes: 2 additions & 0 deletions tests/testthat/testCollateOverwrite/R/a.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#' @include b.R
a <- 1
2 changes: 0 additions & 2 deletions tests/testthat/testCollateOverwrite/R/a.r

This file was deleted.

File renamed without changes.
4 changes: 2 additions & 2 deletions tests/testthat/testCollateParse/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ Author: Brodie Gaslam <brodie.gaslam@yahoo.com>
Maintainer: Brodie Gaslam <brodie.gaslam@yahoo.com>
Version: 0.1
Collate:
'b.r'
'c.r'
'b.R'
'c.R'
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion vignettes/index-crossref.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ A function can be a member of multiple families.

By default `@family {family}`, will generate the see also text "Other {family}:", so the `@family` name should be plural (i.e., "model building helpers" not "model building helper").

If you want to override default title, you can provide an `rd_family_title` element in a list stored in `man/roxygen/meta.R`:
If you want to override the default title, you can provide an `rd_family_title` element in a list stored in `man/roxygen/meta.R`:

```{r, eval = FALSE}
list(
Expand Down
2 changes: 2 additions & 0 deletions vignettes/rd-other.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ This means you need to document them in a slightly different way: instead of doc
#' \item{depth}{total depth percentage = z / mean(x, y) = 2 * z / (x + y) (43--79)}
#' \item{table}{width of top of diamond relative to widest point (43--95)}
#' }
#'
#' @source {ggplot2} tidyverse R package.
```

Note the use of two additional tags that are particularly useful for documenting data:
Expand Down
4 changes: 2 additions & 2 deletions vignettes/rd.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ This is unnecessary unless you want to have a multi-paragraph description, bulle

## Functions

Functions are the mostly commonly documented objects.
Functions are the most commonly documented objects.
Functions require three tags: `@param`, `@returns`, and `@examples`.

### Inputs
Expand Down Expand Up @@ -134,5 +134,5 @@ All functions must have a documented return value for initial CRAN submission.
### Usage

In most case, the function usage (which appears beneath the description in the generates docs) will be automatically derived from the function specification.
For the cases where it is not, please [file an issue](https://github.com/r-lib/roxygen2/issues) and use `@usage` to override the default with you want.
For the cases where it is not, please [file an issue](https://github.com/r-lib/roxygen2/issues) and use `@usage` to override the default with what you want.
If you want to suppress the usage altogether (which is sometimes useful for internal or deprecated functions), you can use `@usage NULL`.
6 changes: 3 additions & 3 deletions vignettes/reuse.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ knitr::opts_chunk$set(

roxygen2 provides several ways to avoid repeating yourself in code documentation, while assembling information from multiple places in one documentation file:

- Combine documentation for closely related functions into a single file with `@describe` in or `@rdname`.
- Combine documentation for closely related functions into a single file with `@describeIn` or `@rdname`.

- Inherit components from another topic with `@inheritParams`, `@inheritSection`, or `@inherit`.

Expand All @@ -37,7 +37,7 @@ Use it when all functions have the same (or very similar) arguments.

### `@describeIn`

Use `@describeIn <destination> <description>` to document mutiple functions together.
Use `@describeIn <destination> <description>` to document multiple functions together.
It generates a new section named "**Related functions and methods**", further divided into subsections by the type of relationship between the source and the destination documentation.
Each subsection contains a bulleted list describing the function with the specified `<description>`.

Expand Down Expand Up @@ -170,7 +170,7 @@ Note that the evaluation environment is deliberately a child of the package that

## Child documents

You can use the same `.Rmd` or `.md` document in the documentation, `README.Rmd`, and vignettes but using child documents:
You can use the same `.Rmd` or `.md` document in the documentation, `README.Rmd`, and vignettes by using child documents:

```{r child = "common.Rmd"}`r ''`
```
Expand Down

0 comments on commit bcdd464

Please sign in to comment.