From d819c17e242abe7534e8b0decd73a8b8fcc0df7b Mon Sep 17 00:00:00 2001 From: Etienne Bacher <52219252+etiennebacher@users.noreply.github.com> Date: Mon, 19 Feb 2024 09:24:56 +0100 Subject: [PATCH 01/14] bump version --- DESCRIPTION | 2 +- NEWS.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index c3390183..01bc6f75 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: altdoc Title: Package Documentation Websites with 'Quarto', 'Docsify', 'Docute', or 'MkDocs' -Version: 0.2.2.9014 +Version: 0.3.0 Authors@R: c(person(given = "Etienne", family = "Bacher", diff --git a/NEWS.md b/NEWS.md index 1e5453b9..89b61b8b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,6 @@ # News -## (development version) +## 0.3.0 Breaking changes: From dbce90136ebf69474bf6e4d1eb06b68040d63aca Mon Sep 17 00:00:00 2001 From: Etienne Bacher <52219252+etiennebacher@users.noreply.github.com> Date: Mon, 19 Feb 2024 09:26:50 +0100 Subject: [PATCH 02/14] fix URLs --- README.md | 9 ++++----- README.qmd | 8 ++++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 48ed4b7b..aa2787e6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -
@@ -154,10 +153,10 @@ Docsify plot2 -🌐grantmcdermott.com/plot2 +🌐grantmcdermott.com/tinyplot -Altdoc +Altdoc Settings @@ -184,7 +183,7 @@ Docsify countrycode -🌐vincentarelbundock.github.io/countrycode +🌐vincentarelbundock.github.io/countrycode Altdoc @@ -199,7 +198,7 @@ Docsify WDI -🌐vincentarelbundock.github.io/WDI +🌐vincentarelbundock.github.io/WDI Altdoc diff --git a/README.qmd b/README.qmd index d06454f2..25d5f122 100755 --- a/README.qmd +++ b/README.qmd @@ -104,8 +104,8 @@ The websites in this table were created using Altdoc: Docsify plot2 - 🌐grantmcdermott.com/plot2 - Altdoc Settings + 🌐grantmcdermott.com/tinyplot + Altdoc Settings Docsify @@ -116,13 +116,13 @@ The websites in this table were created using Altdoc: Docsify countrycode - 🌐vincentarelbundock.github.io/countrycode + 🌐vincentarelbundock.github.io/countrycode Altdoc Settings Docsify WDI - 🌐vincentarelbundock.github.io/WDI + 🌐vincentarelbundock.github.io/WDI Altdoc Settings From 0bece1954be7b26846f76121a7136c057ebe6215 Mon Sep 17 00:00:00 2001 From: Etienne Bacher <52219252+etiennebacher@users.noreply.github.com> Date: Mon, 19 Feb 2024 09:28:24 +0100 Subject: [PATCH 03/14] update wordlist --- DESCRIPTION | 2 +- inst/WORDLIST | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 01bc6f75..a9c4144a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -40,6 +40,6 @@ Config/testthat/edition: 3 Encoding: UTF-8 LazyData: true Roxygen: list(markdown = TRUE) -RoxygenNote: 7.2.3.9000 +RoxygenNote: 7.3.1 Language: en-US VignetteBuilder: knitr diff --git a/inst/WORDLIST b/inst/WORDLIST index 4bd649f7..b7c79f0f 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -30,3 +30,4 @@ Rmarkdown Rmd RStudio yaml +venv From a6a98522d61ef53a111b759e3ccc6d6b0604cb84 Mon Sep 17 00:00:00 2001 From: Etienne Bacher <52219252+etiennebacher@users.noreply.github.com> Date: Mon, 19 Feb 2024 09:31:13 +0100 Subject: [PATCH 04/14] NEWS.Rd in buildignore --- .Rbuildignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.Rbuildignore b/.Rbuildignore index b64f766b..7f8fa8a4 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -14,4 +14,5 @@ ^altdoc$ ^vignettes$ ^.lintr$ -man-roxygen \ No newline at end of file +man-roxygen +^inst/NEWS\.Rd$ From 10fb68148263ceb104ab393978e3973c41db4919 Mon Sep 17 00:00:00 2001 From: Etienne Bacher <52219252+etiennebacher@users.noreply.github.com> Date: Mon, 19 Feb 2024 09:51:48 +0100 Subject: [PATCH 05/14] fix test --- tests/testthat/test-rd2qmd.R | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/testthat/test-rd2qmd.R b/tests/testthat/test-rd2qmd.R index ef992b67..7b90eece 100644 --- a/tests/testthat/test-rd2qmd.R +++ b/tests/testthat/test-rd2qmd.R @@ -1,10 +1,11 @@ test_that(".rd2qmd works", { - rd_file <- testthat::test_path("examples/examples-man/between.Rd") # .rd2qmd works only in pkg directory - fs::file_create("DESCRIPTION") - dest <- tempdir() - .rd2qmd(rd_file, dest, path = ".") - qmd_file <- fs::path_join(c(dest, "between.qmd")) + rd_file <- fs::path_abs(testthat::test_path("examples/examples-man/between.Rd")) + create_local_package() + fs::file_copy(rd_file, ".") + fs::dir_create("docs") + .rd2qmd(rd_file, "docs", path = ".") + qmd_file <- fs::path_join(c("docs", "between.qmd")) expect_true(fs::file_exists(qmd_file)) content <- .readlines(qmd_file) From db1576f8a80f5632d5a3394c58ce1b4eeb91e1af Mon Sep 17 00:00:00 2001 From: Etienne Bacher <52219252+etiennebacher@users.noreply.github.com> Date: Mon, 19 Feb 2024 10:07:36 +0100 Subject: [PATCH 06/14] update snapshots with latest quarto stable --- tests/testthat/_snaps/docsify/render_docs.md | 473 ++++++++++--------- tests/testthat/_snaps/docute/render_docs.md | 473 ++++++++++--------- tests/testthat/_snaps/mkdocs/render_docs.md | 402 ++++++++-------- 3 files changed, 678 insertions(+), 670 deletions(-) diff --git a/tests/testthat/_snaps/docsify/render_docs.md b/tests/testthat/_snaps/docsify/render_docs.md index 6824ffaf..23552f98 100644 --- a/tests/testthat/_snaps/docsify/render_docs.md +++ b/tests/testthat/_snaps/docsify/render_docs.md @@ -4,41 +4,42 @@ .readlines("docs/README.md") Output [1] "" - [2] "" - [3] "" - [4] "# testpkg.altdoc" - [5] "" - [6] "" - [7] "" - [8] "[![R-universe status" - [9] "badge](https://grantmcdermott.r-universe.dev/badges/plot2)](https://grantmcdermott.r-universe.dev)" - [10] "" - [11] "" - [12] "The goal of testpkg.altdoc is to …" - [13] "" - [14] "## Installation" - [15] "" - [16] "You can install the development version of testpkg.altdoc like so:" - [17] "" - [18] "``` r" - [19] "# FILL THIS IN! HOW CAN PEOPLE INSTALL YOUR DEV PACKAGE?" - [20] "```" - [21] "" - [22] "## Example" - [23] "" - [24] "This is a basic example which shows you how to solve a common problem:" - [25] "" - [26] "``` r" - [27] "library(testpkg.altdoc)" - [28] "summary(cars)" - [29] "#> speed dist " - [30] "#> Min. : 4.0 Min. : 2.00 " - [31] "#> 1st Qu.:12.0 1st Qu.: 26.00 " - [32] "#> Median :15.0 Median : 36.00 " - [33] "#> Mean :15.4 Mean : 42.98 " - [34] "#> 3rd Qu.:19.0 3rd Qu.: 56.00 " - [35] "#> Max. :25.0 Max. :120.00" - [36] "```" + [2] "" + [3] "" + [4] "" + [5] "# testpkg.altdoc" + [6] "" + [7] "" + [8] "" + [9] "[![R-universe status" + [10] "badge](https://grantmcdermott.r-universe.dev/badges/plot2)](https://grantmcdermott.r-universe.dev)" + [11] "" + [12] "" + [13] "The goal of testpkg.altdoc is to …" + [14] "" + [15] "## Installation" + [16] "" + [17] "You can install the development version of testpkg.altdoc like so:" + [18] "" + [19] "``` r" + [20] "# FILL THIS IN! HOW CAN PEOPLE INSTALL YOUR DEV PACKAGE?" + [21] "```" + [22] "" + [23] "## Example" + [24] "" + [25] "This is a basic example which shows you how to solve a common problem:" + [26] "" + [27] "``` r" + [28] "library(testpkg.altdoc)" + [29] "summary(cars)" + [30] "#> speed dist " + [31] "#> Min. : 4.0 Min. : 2.00 " + [32] "#> 1st Qu.:12.0 1st Qu.: 26.00 " + [33] "#> Median :15.0 Median : 36.00 " + [34] "#> Mean :15.4 Mean : 42.98 " + [35] "#> 3rd Qu.:19.0 3rd Qu.: 56.00 " + [36] "#> Max. :25.0 Max. :120.00" + [37] "```" --- @@ -126,57 +127,58 @@ .readlines("docs/man/hello_base.md") Output [1] "" - [2] "# Base function" - [3] "" - [4] "## Description" - [5] "" - [6] "Base function" - [7] "" - [8] "## Usage" - [9] "" - [10] "
hello_base(x = 2)"                                
-      [11] "
" - [12] "" - [13] "## Arguments" - [14] "" - [15] "" - [16] "" - [17] "" - [20] "" - [23] "" - [24] "
" - [18] "x" - [19] "" - [21] "A parameter" - [22] "
" - [25] "" - [26] "## Details" - [27] "" - [28] "Some code with weird symbols: pl$when(condition) and" - [29] "pl$then(output)" - [30] "" - [31] "Some equations: ∂*Y*/∂*X* = *a* + *ε*/2" - [32] "" - [33] "## Value" - [34] "" - [35] "Some value" - [36] "" - [37] "## Examples" - [38] "" - [39] "``` r" - [40] "library(testpkg.altdoc)" - [41] "" - [42] "hello_base()" - [43] "```" - [44] "" - [45] " [1] \"Hello, world!\"" - [46] "" - [47] "``` r" - [48] "mtcars$drat <- mtcars$drat + 1" - [49] "head(mtcars[[\"drat\"]], 2)" - [50] "```" - [51] "" - [52] " [1] 4.9 4.9" + [2] "" + [3] "# Base function" + [4] "" + [5] "## Description" + [6] "" + [7] "Base function" + [8] "" + [9] "## Usage" + [10] "" + [11] "
hello_base(x = 2)"                                
+      [12] "
" + [13] "" + [14] "## Arguments" + [15] "" + [16] "" + [17] "" + [18] "" + [21] "" + [24] "" + [25] "
" + [19] "x" + [20] "" + [22] "A parameter" + [23] "
" + [26] "" + [27] "## Details" + [28] "" + [29] "Some code with weird symbols: pl$when(condition) and" + [30] "pl$then(output)" + [31] "" + [32] "Some equations: ∂*Y*/∂*X* = *a* + *ε*/2" + [33] "" + [34] "## Value" + [35] "" + [36] "Some value" + [37] "" + [38] "## Examples" + [39] "" + [40] "``` r" + [41] "library(testpkg.altdoc)" + [42] "" + [43] "hello_base()" + [44] "```" + [45] "" + [46] " [1] \"Hello, world!\"" + [47] "" + [48] "``` r" + [49] "mtcars$drat <- mtcars$drat + 1" + [50] "head(mtcars[[\"drat\"]], 2)" + [51] "```" + [52] "" + [53] " [1] 4.9 4.9" --- @@ -184,152 +186,153 @@ .readlines("docs/man/hello_r6.md") Output [1] "" - [2] "# Create a \"conductor\" tour" - [3] "" - [4] "## Description" - [5] "" - [6] "blah blah blah" - [7] "" - [8] "## Methods" - [9] "" - [10] "

" - [11] "Public methods" - [12] "

" - [13] "" - [35] "
" - [36] "" - [37] "" - [38] "" - [39] "

" - [40] "Method new()" - [41] "

" - [42] "
" - [43] "Usage" - [44] "
" - [45] "" - [46] "
hello_r6\\$new()
" - [47] "" - [48] "
" - [49] "Details" - [50] "
" - [51] "" - [52] "Initialise Conductor." - [53] "" - [54] "
" - [55] "" - [56] "" - [57] "" - [58] "

" - [59] "Method init()" - [60] "

" - [61] "
" - [62] "Usage" - [63] "
" - [64] "" - [65] "
hello_r6\\$init(session = NULL)
" - [66] "" - [67] "
" - [68] "Arguments" - [69] "
" - [70] "" - [71] "
" - [72] "
" - [73] "session" - [74] "
" - [75] "
" - [76] "A valid Shiny session. If NULL (default), the function" - [77] "attempts to get the session with" - [78] "shiny::getDefaultReactiveDomain()." - [79] "
" - [80] "
" - [81] "" - [82] "
" - [83] "Details" - [84] "
" - [85] "" - [86] "Initialise Conductor." - [87] "" - [88] "
" - [89] "" - [90] "" - [91] "" - [92] "

" - [93] "Method step()" - [94] "

" - [95] "
" - [96] "Usage" - [97] "
" - [98] "" - [99] "
hello_r6\\$step(title = NULL)
" - [100] "" - [101] "
" - [102] "Arguments" - [103] "
" - [104] "" - [105] "
" - [106] "
" - [107] "title" - [108] "
" - [109] "
" - [110] "Title of the popover." - [111] "
" - [112] "
" - [113] "" - [114] "
" - [115] "Details" - [116] "
" - [117] "" - [118] "Add a step in a Conductor tour." - [119] "" - [120] "
" - [121] "" - [122] "" - [123] "" - [124] "

" - [125] "Method clone()" - [126] "

" - [127] "" - [128] "The objects of this class are cloneable with this method." - [129] "" - [130] "
" - [131] "Usage" - [132] "
" - [133] "" - [134] "
hello_r6\\$clone(deep = FALSE)
" - [135] "" - [136] "
" - [137] "Arguments" - [138] "
" - [139] "" - [140] "
" - [141] "
" - [142] "deep" - [143] "
" - [144] "
" - [145] "Whether to make a deep clone." - [146] "
" - [147] "
" + [2] "" + [3] "# Create a \"conductor\" tour" + [4] "" + [5] "## Description" + [6] "" + [7] "blah blah blah" + [8] "" + [9] "## Methods" + [10] "" + [11] "

" + [12] "Public methods" + [13] "

" + [14] "" + [36] "
" + [37] "" + [38] "" + [39] "" + [40] "

" + [41] "Method new()" + [42] "

" + [43] "
" + [44] "Usage" + [45] "
" + [46] "" + [47] "
hello_r6\\$new()
" + [48] "" + [49] "
" + [50] "Details" + [51] "
" + [52] "" + [53] "Initialise Conductor." + [54] "" + [55] "
" + [56] "" + [57] "" + [58] "" + [59] "

" + [60] "Method init()" + [61] "

" + [62] "
" + [63] "Usage" + [64] "
" + [65] "" + [66] "
hello_r6\\$init(session = NULL)
" + [67] "" + [68] "
" + [69] "Arguments" + [70] "
" + [71] "" + [72] "
" + [73] "
" + [74] "session" + [75] "
" + [76] "
" + [77] "A valid Shiny session. If NULL (default), the function" + [78] "attempts to get the session with" + [79] "shiny::getDefaultReactiveDomain()." + [80] "
" + [81] "
" + [82] "" + [83] "
" + [84] "Details" + [85] "
" + [86] "" + [87] "Initialise Conductor." + [88] "" + [89] "
" + [90] "" + [91] "" + [92] "" + [93] "

" + [94] "Method step()" + [95] "

" + [96] "
" + [97] "Usage" + [98] "
" + [99] "" + [100] "
hello_r6\\$step(title = NULL)
" + [101] "" + [102] "
" + [103] "Arguments" + [104] "
" + [105] "" + [106] "
" + [107] "
" + [108] "title" + [109] "
" + [110] "
" + [111] "Title of the popover." + [112] "
" + [113] "
" + [114] "" + [115] "
" + [116] "Details" + [117] "
" + [118] "" + [119] "Add a step in a Conductor tour." + [120] "" + [121] "
" + [122] "" + [123] "" + [124] "" + [125] "

" + [126] "Method clone()" + [127] "

" + [128] "" + [129] "The objects of this class are cloneable with this method." + [130] "" + [131] "
" + [132] "Usage" + [133] "
" + [134] "" + [135] "
hello_r6\\$clone(deep = FALSE)
" + [136] "" + [137] "
" + [138] "Arguments" + [139] "
" + [140] "" + [141] "
" + [142] "
" + [143] "deep" + [144] "
" + [145] "
" + [146] "Whether to make a deep clone." + [147] "
" + [148] "
" --- @@ -337,7 +340,7 @@ .readlines("docs/vignettes/test.md") Output [1] "# test" "" - [3] "``` r" "library(testpkg.altdoc)" - [5] "```" "" - [7] "hello there" + [3] "" "``` r" + [5] "library(testpkg.altdoc)" "```" + [7] "" "hello there" diff --git a/tests/testthat/_snaps/docute/render_docs.md b/tests/testthat/_snaps/docute/render_docs.md index 88d293f4..2ed9556d 100644 --- a/tests/testthat/_snaps/docute/render_docs.md +++ b/tests/testthat/_snaps/docute/render_docs.md @@ -4,41 +4,42 @@ .readlines("docs/README.md") Output [1] "" - [2] "" - [3] "" - [4] "# testpkg.altdoc" - [5] "" - [6] "" - [7] "" - [8] "[![R-universe status" - [9] "badge](https://grantmcdermott.r-universe.dev/badges/plot2)](https://grantmcdermott.r-universe.dev)" - [10] "" - [11] "" - [12] "The goal of testpkg.altdoc is to …" - [13] "" - [14] "## Installation" - [15] "" - [16] "You can install the development version of testpkg.altdoc like so:" - [17] "" - [18] "``` r" - [19] "# FILL THIS IN! HOW CAN PEOPLE INSTALL YOUR DEV PACKAGE?" - [20] "```" - [21] "" - [22] "## Example" - [23] "" - [24] "This is a basic example which shows you how to solve a common problem:" - [25] "" - [26] "``` r" - [27] "library(testpkg.altdoc)" - [28] "summary(cars)" - [29] "#> speed dist " - [30] "#> Min. : 4.0 Min. : 2.00 " - [31] "#> 1st Qu.:12.0 1st Qu.: 26.00 " - [32] "#> Median :15.0 Median : 36.00 " - [33] "#> Mean :15.4 Mean : 42.98 " - [34] "#> 3rd Qu.:19.0 3rd Qu.: 56.00 " - [35] "#> Max. :25.0 Max. :120.00" - [36] "```" + [2] "" + [3] "" + [4] "" + [5] "# testpkg.altdoc" + [6] "" + [7] "" + [8] "" + [9] "[![R-universe status" + [10] "badge](https://grantmcdermott.r-universe.dev/badges/plot2)](https://grantmcdermott.r-universe.dev)" + [11] "" + [12] "" + [13] "The goal of testpkg.altdoc is to …" + [14] "" + [15] "## Installation" + [16] "" + [17] "You can install the development version of testpkg.altdoc like so:" + [18] "" + [19] "``` r" + [20] "# FILL THIS IN! HOW CAN PEOPLE INSTALL YOUR DEV PACKAGE?" + [21] "```" + [22] "" + [23] "## Example" + [24] "" + [25] "This is a basic example which shows you how to solve a common problem:" + [26] "" + [27] "``` r" + [28] "library(testpkg.altdoc)" + [29] "summary(cars)" + [30] "#> speed dist " + [31] "#> Min. : 4.0 Min. : 2.00 " + [32] "#> 1st Qu.:12.0 1st Qu.: 26.00 " + [33] "#> Median :15.0 Median : 36.00 " + [34] "#> Mean :15.4 Mean : 42.98 " + [35] "#> 3rd Qu.:19.0 3rd Qu.: 56.00 " + [36] "#> Max. :25.0 Max. :120.00" + [37] "```" --- @@ -119,57 +120,58 @@ .readlines("docs/man/hello_base.md") Output [1] "" - [2] "# Base function" - [3] "" - [4] "## Description" - [5] "" - [6] "Base function" - [7] "" - [8] "## Usage" - [9] "" - [10] "
hello_base(x = 2)"                                
-      [11] "
" - [12] "" - [13] "## Arguments" - [14] "" - [15] "" - [16] "" - [17] "" - [20] "" - [23] "" - [24] "
" - [18] "x" - [19] "" - [21] "A parameter" - [22] "
" - [25] "" - [26] "## Details" - [27] "" - [28] "Some code with weird symbols: pl$when(condition) and" - [29] "pl$then(output)" - [30] "" - [31] "Some equations: ∂*Y*/∂*X* = *a* + *ε*/2" - [32] "" - [33] "## Value" - [34] "" - [35] "Some value" - [36] "" - [37] "## Examples" - [38] "" - [39] "``` r" - [40] "library(testpkg.altdoc)" - [41] "" - [42] "hello_base()" - [43] "```" - [44] "" - [45] " [1] \"Hello, world!\"" - [46] "" - [47] "``` r" - [48] "mtcars$drat <- mtcars$drat + 1" - [49] "head(mtcars[[\"drat\"]], 2)" - [50] "```" - [51] "" - [52] " [1] 4.9 4.9" + [2] "" + [3] "# Base function" + [4] "" + [5] "## Description" + [6] "" + [7] "Base function" + [8] "" + [9] "## Usage" + [10] "" + [11] "
hello_base(x = 2)"                                
+      [12] "
" + [13] "" + [14] "## Arguments" + [15] "" + [16] "" + [17] "" + [18] "" + [21] "" + [24] "" + [25] "
" + [19] "x" + [20] "" + [22] "A parameter" + [23] "
" + [26] "" + [27] "## Details" + [28] "" + [29] "Some code with weird symbols: pl$when(condition) and" + [30] "pl$then(output)" + [31] "" + [32] "Some equations: ∂*Y*/∂*X* = *a* + *ε*/2" + [33] "" + [34] "## Value" + [35] "" + [36] "Some value" + [37] "" + [38] "## Examples" + [39] "" + [40] "``` r" + [41] "library(testpkg.altdoc)" + [42] "" + [43] "hello_base()" + [44] "```" + [45] "" + [46] " [1] \"Hello, world!\"" + [47] "" + [48] "``` r" + [49] "mtcars$drat <- mtcars$drat + 1" + [50] "head(mtcars[[\"drat\"]], 2)" + [51] "```" + [52] "" + [53] " [1] 4.9 4.9" --- @@ -177,152 +179,153 @@ .readlines("docs/man/hello_r6.md") Output [1] "" - [2] "# Create a \"conductor\" tour" - [3] "" - [4] "## Description" - [5] "" - [6] "blah blah blah" - [7] "" - [8] "## Methods" - [9] "" - [10] "

" - [11] "Public methods" - [12] "

" - [13] "" - [35] "
" - [36] "" - [37] "" - [38] "" - [39] "

" - [40] "Method new()" - [41] "

" - [42] "
" - [43] "Usage" - [44] "
" - [45] "" - [46] "
hello_r6\\$new()
" - [47] "" - [48] "
" - [49] "Details" - [50] "
" - [51] "" - [52] "Initialise Conductor." - [53] "" - [54] "
" - [55] "" - [56] "" - [57] "" - [58] "

" - [59] "Method init()" - [60] "

" - [61] "
" - [62] "Usage" - [63] "
" - [64] "" - [65] "
hello_r6\\$init(session = NULL)
" - [66] "" - [67] "
" - [68] "Arguments" - [69] "
" - [70] "" - [71] "
" - [72] "
" - [73] "session" - [74] "
" - [75] "
" - [76] "A valid Shiny session. If NULL (default), the function" - [77] "attempts to get the session with" - [78] "shiny::getDefaultReactiveDomain()." - [79] "
" - [80] "
" - [81] "" - [82] "
" - [83] "Details" - [84] "
" - [85] "" - [86] "Initialise Conductor." - [87] "" - [88] "
" - [89] "" - [90] "" - [91] "" - [92] "

" - [93] "Method step()" - [94] "

" - [95] "
" - [96] "Usage" - [97] "
" - [98] "" - [99] "
hello_r6\\$step(title = NULL)
" - [100] "" - [101] "
" - [102] "Arguments" - [103] "
" - [104] "" - [105] "
" - [106] "
" - [107] "title" - [108] "
" - [109] "
" - [110] "Title of the popover." - [111] "
" - [112] "
" - [113] "" - [114] "
" - [115] "Details" - [116] "
" - [117] "" - [118] "Add a step in a Conductor tour." - [119] "" - [120] "
" - [121] "" - [122] "" - [123] "" - [124] "

" - [125] "Method clone()" - [126] "

" - [127] "" - [128] "The objects of this class are cloneable with this method." - [129] "" - [130] "
" - [131] "Usage" - [132] "
" - [133] "" - [134] "
hello_r6\\$clone(deep = FALSE)
" - [135] "" - [136] "
" - [137] "Arguments" - [138] "
" - [139] "" - [140] "
" - [141] "
" - [142] "deep" - [143] "
" - [144] "
" - [145] "Whether to make a deep clone." - [146] "
" - [147] "
" + [2] "" + [3] "# Create a \"conductor\" tour" + [4] "" + [5] "## Description" + [6] "" + [7] "blah blah blah" + [8] "" + [9] "## Methods" + [10] "" + [11] "

" + [12] "Public methods" + [13] "

" + [14] "" + [36] "
" + [37] "" + [38] "" + [39] "" + [40] "

" + [41] "Method new()" + [42] "

" + [43] "
" + [44] "Usage" + [45] "
" + [46] "" + [47] "
hello_r6\\$new()
" + [48] "" + [49] "
" + [50] "Details" + [51] "
" + [52] "" + [53] "Initialise Conductor." + [54] "" + [55] "
" + [56] "" + [57] "" + [58] "" + [59] "

" + [60] "Method init()" + [61] "

" + [62] "
" + [63] "Usage" + [64] "
" + [65] "" + [66] "
hello_r6\\$init(session = NULL)
" + [67] "" + [68] "
" + [69] "Arguments" + [70] "
" + [71] "" + [72] "
" + [73] "
" + [74] "session" + [75] "
" + [76] "
" + [77] "A valid Shiny session. If NULL (default), the function" + [78] "attempts to get the session with" + [79] "shiny::getDefaultReactiveDomain()." + [80] "
" + [81] "
" + [82] "" + [83] "
" + [84] "Details" + [85] "
" + [86] "" + [87] "Initialise Conductor." + [88] "" + [89] "
" + [90] "" + [91] "" + [92] "" + [93] "

" + [94] "Method step()" + [95] "

" + [96] "
" + [97] "Usage" + [98] "
" + [99] "" + [100] "
hello_r6\\$step(title = NULL)
" + [101] "" + [102] "
" + [103] "Arguments" + [104] "
" + [105] "" + [106] "
" + [107] "
" + [108] "title" + [109] "
" + [110] "
" + [111] "Title of the popover." + [112] "
" + [113] "
" + [114] "" + [115] "
" + [116] "Details" + [117] "
" + [118] "" + [119] "Add a step in a Conductor tour." + [120] "" + [121] "
" + [122] "" + [123] "" + [124] "" + [125] "

" + [126] "Method clone()" + [127] "

" + [128] "" + [129] "The objects of this class are cloneable with this method." + [130] "" + [131] "
" + [132] "Usage" + [133] "
" + [134] "" + [135] "
hello_r6\\$clone(deep = FALSE)
" + [136] "" + [137] "
" + [138] "Arguments" + [139] "
" + [140] "" + [141] "
" + [142] "
" + [143] "deep" + [144] "
" + [145] "
" + [146] "Whether to make a deep clone." + [147] "
" + [148] "
" --- @@ -330,7 +333,7 @@ .readlines("docs/vignettes/test.md") Output [1] "# test" "" - [3] "``` r" "library(testpkg.altdoc)" - [5] "```" "" - [7] "hello there" + [3] "" "``` r" + [5] "library(testpkg.altdoc)" "```" + [7] "" "hello there" diff --git a/tests/testthat/_snaps/mkdocs/render_docs.md b/tests/testthat/_snaps/mkdocs/render_docs.md index b3db3671..b7fb2385 100644 --- a/tests/testthat/_snaps/mkdocs/render_docs.md +++ b/tests/testthat/_snaps/mkdocs/render_docs.md @@ -19,57 +19,58 @@ .readlines("docs/man/hello_base.md") Output [1] "" - [2] "# Base function" - [3] "" - [4] "## Description" - [5] "" - [6] "Base function" - [7] "" - [8] "## Usage" - [9] "" - [10] "
hello_base(x = 2)"                                
-      [11] "
" - [12] "" - [13] "## Arguments" - [14] "" - [15] "" - [16] "" - [17] "" - [20] "" - [23] "" - [24] "
" - [18] "x" - [19] "" - [21] "A parameter" - [22] "
" - [25] "" - [26] "## Details" - [27] "" - [28] "Some code with weird symbols: pl$when(condition) and" - [29] "pl$then(output)" - [30] "" - [31] "Some equations: ∂*Y*/∂*X* = *a* + *ε*/2" - [32] "" - [33] "## Value" - [34] "" - [35] "Some value" - [36] "" - [37] "## Examples" - [38] "" - [39] "``` r" - [40] "library(testpkg.altdoc)" - [41] "" - [42] "hello_base()" - [43] "```" - [44] "" - [45] " [1] \"Hello, world!\"" - [46] "" - [47] "``` r" - [48] "mtcars$drat <- mtcars$drat + 1" - [49] "head(mtcars[[\"drat\"]], 2)" - [50] "```" - [51] "" - [52] " [1] 4.9 4.9" + [2] "" + [3] "# Base function" + [4] "" + [5] "## Description" + [6] "" + [7] "Base function" + [8] "" + [9] "## Usage" + [10] "" + [11] "
hello_base(x = 2)"                                
+      [12] "
" + [13] "" + [14] "## Arguments" + [15] "" + [16] "" + [17] "" + [18] "" + [21] "" + [24] "" + [25] "
" + [19] "x" + [20] "" + [22] "A parameter" + [23] "
" + [26] "" + [27] "## Details" + [28] "" + [29] "Some code with weird symbols: pl$when(condition) and" + [30] "pl$then(output)" + [31] "" + [32] "Some equations: ∂*Y*/∂*X* = *a* + *ε*/2" + [33] "" + [34] "## Value" + [35] "" + [36] "Some value" + [37] "" + [38] "## Examples" + [39] "" + [40] "``` r" + [41] "library(testpkg.altdoc)" + [42] "" + [43] "hello_base()" + [44] "```" + [45] "" + [46] " [1] \"Hello, world!\"" + [47] "" + [48] "``` r" + [49] "mtcars$drat <- mtcars$drat + 1" + [50] "head(mtcars[[\"drat\"]], 2)" + [51] "```" + [52] "" + [53] " [1] 4.9 4.9" --- @@ -77,152 +78,153 @@ .readlines("docs/man/hello_r6.md") Output [1] "" - [2] "# Create a \"conductor\" tour" - [3] "" - [4] "## Description" - [5] "" - [6] "blah blah blah" - [7] "" - [8] "## Methods" - [9] "" - [10] "

" - [11] "Public methods" - [12] "

" - [13] "" - [35] "
" - [36] "" - [37] "" - [38] "" - [39] "

" - [40] "Method new()" - [41] "

" - [42] "
" - [43] "Usage" - [44] "
" - [45] "" - [46] "
hello_r6\\$new()
" - [47] "" - [48] "
" - [49] "Details" - [50] "
" - [51] "" - [52] "Initialise Conductor." - [53] "" - [54] "
" - [55] "" - [56] "" - [57] "" - [58] "

" - [59] "Method init()" - [60] "

" - [61] "
" - [62] "Usage" - [63] "
" - [64] "" - [65] "
hello_r6\\$init(session = NULL)
" - [66] "" - [67] "
" - [68] "Arguments" - [69] "
" - [70] "" - [71] "
" - [72] "
" - [73] "session" - [74] "
" - [75] "
" - [76] "A valid Shiny session. If NULL (default), the function" - [77] "attempts to get the session with" - [78] "shiny::getDefaultReactiveDomain()." - [79] "
" - [80] "
" - [81] "" - [82] "
" - [83] "Details" - [84] "
" - [85] "" - [86] "Initialise Conductor." - [87] "" - [88] "
" - [89] "" - [90] "" - [91] "" - [92] "

" - [93] "Method step()" - [94] "

" - [95] "
" - [96] "Usage" - [97] "
" - [98] "" - [99] "
hello_r6\\$step(title = NULL)
" - [100] "" - [101] "
" - [102] "Arguments" - [103] "
" - [104] "" - [105] "
" - [106] "
" - [107] "title" - [108] "
" - [109] "
" - [110] "Title of the popover." - [111] "
" - [112] "
" - [113] "" - [114] "
" - [115] "Details" - [116] "
" - [117] "" - [118] "Add a step in a Conductor tour." - [119] "" - [120] "
" - [121] "" - [122] "" - [123] "" - [124] "

" - [125] "Method clone()" - [126] "

" - [127] "" - [128] "The objects of this class are cloneable with this method." - [129] "" - [130] "
" - [131] "Usage" - [132] "
" - [133] "" - [134] "
hello_r6\\$clone(deep = FALSE)
" - [135] "" - [136] "
" - [137] "Arguments" - [138] "
" - [139] "" - [140] "
" - [141] "
" - [142] "deep" - [143] "
" - [144] "
" - [145] "Whether to make a deep clone." - [146] "
" - [147] "
" + [2] "" + [3] "# Create a \"conductor\" tour" + [4] "" + [5] "## Description" + [6] "" + [7] "blah blah blah" + [8] "" + [9] "## Methods" + [10] "" + [11] "

" + [12] "Public methods" + [13] "

" + [14] "" + [36] "
" + [37] "" + [38] "" + [39] "" + [40] "

" + [41] "Method new()" + [42] "

" + [43] "
" + [44] "Usage" + [45] "
" + [46] "" + [47] "
hello_r6\\$new()
" + [48] "" + [49] "
" + [50] "Details" + [51] "
" + [52] "" + [53] "Initialise Conductor." + [54] "" + [55] "
" + [56] "" + [57] "" + [58] "" + [59] "

" + [60] "Method init()" + [61] "

" + [62] "
" + [63] "Usage" + [64] "
" + [65] "" + [66] "
hello_r6\\$init(session = NULL)
" + [67] "" + [68] "
" + [69] "Arguments" + [70] "
" + [71] "" + [72] "
" + [73] "
" + [74] "session" + [75] "
" + [76] "
" + [77] "A valid Shiny session. If NULL (default), the function" + [78] "attempts to get the session with" + [79] "shiny::getDefaultReactiveDomain()." + [80] "
" + [81] "
" + [82] "" + [83] "
" + [84] "Details" + [85] "
" + [86] "" + [87] "Initialise Conductor." + [88] "" + [89] "
" + [90] "" + [91] "" + [92] "" + [93] "

" + [94] "Method step()" + [95] "

" + [96] "
" + [97] "Usage" + [98] "
" + [99] "" + [100] "
hello_r6\\$step(title = NULL)
" + [101] "" + [102] "
" + [103] "Arguments" + [104] "
" + [105] "" + [106] "
" + [107] "
" + [108] "title" + [109] "
" + [110] "
" + [111] "Title of the popover." + [112] "
" + [113] "
" + [114] "" + [115] "
" + [116] "Details" + [117] "
" + [118] "" + [119] "Add a step in a Conductor tour." + [120] "" + [121] "
" + [122] "" + [123] "" + [124] "" + [125] "

" + [126] "Method clone()" + [127] "

" + [128] "" + [129] "The objects of this class are cloneable with this method." + [130] "" + [131] "
" + [132] "Usage" + [133] "
" + [134] "" + [135] "
hello_r6\\$clone(deep = FALSE)
" + [136] "" + [137] "
" + [138] "Arguments" + [139] "
" + [140] "" + [141] "
" + [142] "
" + [143] "deep" + [144] "
" + [145] "
" + [146] "Whether to make a deep clone." + [147] "
" + [148] "
" --- @@ -230,7 +232,7 @@ .readlines("docs/vignettes/test.md") Output [1] "# test" "" - [3] "``` r" "library(testpkg.altdoc)" - [5] "```" "" - [7] "hello there" + [3] "" "``` r" + [5] "library(testpkg.altdoc)" "```" + [7] "" "hello there" From 90652a79e60cc7bc172b70946048db436e1f9905 Mon Sep 17 00:00:00 2001 From: Etienne Bacher <52219252+etiennebacher@users.noreply.github.com> Date: Wed, 21 Feb 2024 14:40:39 +0100 Subject: [PATCH 07/14] fix test and NOTE --- tests/testthat/examples/testpkg.altdoc/.Rbuildignore | 2 -- tests/testthat/test-utils.R | 10 ++++++---- 2 files changed, 6 insertions(+), 6 deletions(-) delete mode 100644 tests/testthat/examples/testpkg.altdoc/.Rbuildignore diff --git a/tests/testthat/examples/testpkg.altdoc/.Rbuildignore b/tests/testthat/examples/testpkg.altdoc/.Rbuildignore deleted file mode 100644 index 91114bf2..00000000 --- a/tests/testthat/examples/testpkg.altdoc/.Rbuildignore +++ /dev/null @@ -1,2 +0,0 @@ -^.*\.Rproj$ -^\.Rproj\.user$ diff --git a/tests/testthat/test-utils.R b/tests/testthat/test-utils.R index 5e6d50a8..54a365e3 100644 --- a/tests/testthat/test-utils.R +++ b/tests/testthat/test-utils.R @@ -20,11 +20,13 @@ test_that(".pkg_version() works", { }) test_that(".parse_news works", { + skip_if_not_installed("desc") + create_local_package() + desc::desc_set_urls("https://github.com/etiennebacher/altdoc") input <- "# 1.1.0\n\n* thanks @foo-bar for their contribution (#111)\n\n* thanks @foo2- for their contribution (#11)\n\n* due to issue in another repo (pola-rs/polars#112)\n\n* thanks @JohnDoe, @JaneDoe" - temp <- tempfile() - cat(input, file = temp) - .parse_news(".", temp) - parsed <- paste(.readlines(temp), collapse = "") + cat(input, file = "NEWS.md") + .parse_news(".", "NEWS.md") + parsed <- paste(.readlines("NEWS.md"), collapse = "") should_be_found <- c( "[@foo-bar](https://github.com/foo-bar)", From 6604a72d416a7bc1eedb9b8ad0c53fbf8a4f53a9 Mon Sep 17 00:00:00 2001 From: Etienne Bacher <52219252+etiennebacher@users.noreply.github.com> Date: Wed, 21 Feb 2024 15:04:44 +0100 Subject: [PATCH 08/14] cleanup docs --- NEWS.md | 52 +++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 11 deletions(-) diff --git a/NEWS.md b/NEWS.md index 89b61b8b..c277e1fe 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,36 +2,66 @@ ## 0.3.0 -Breaking changes: +All functions have changed so any change listed below technically is a breaking +change. + +### Breaking changes * Functions renamed: - `use_docute()`, `use_docsify()` and `use_mkdocs()` are combined into `setup_docs()` - `update_docs()` -> `render_docs()` - `preview()` -> `preview_docs()` -* `setup_docs()` (previously `use_*()`) no longer updates and previews the website by default. -* `custom_reference` argument is removed. See the `Post-processing` vignette for a description of the new proposed workflow. -* `theme` argument is removed. Users can change themes by editing settings files in `altdoc/` + +* `setup_docs()` (previously `use_*()`) no longer updates and previews the website + by default. +* `custom_reference` argument is removed. See the `Post-processing` vignette for + a description of the new proposed workflow. +* `theme` argument is removed. Users can change themes by editing settings files + in `altdoc/` * `mkdocs` documentation is no longer stored in `docs/docs/` -New: +### New features * Support Quarto websites as a documentation format. + * Support Quarto vignettes (.qmd) in the `vignettes/` folder. -* `render_docs(parallel=TRUE)` uses `future` to parallelize the rendering of vignettes and man pages. -* `render_docs(freeze = TRUE)` no longer renders vignettes or man pages when they have not changed and are already stored in `docs/`. + +* `render_docs(parallel = TRUE)` uses `future` to parallelize the rendering of + vignettes and man pages. + +* `render_docs(freeze = TRUE)` no longer renders vignettes or man pages when they + have not changed and are already stored in `docs/`. + * Link to source code at the top of function reference. -* Settings files are now permanently stored in the `altdoc/` directory. These files can be edited manually to customize the website. -* Major internal changes to the .Rd -> .md conversion system. We now use Quarto to convert man pages and execute examples, and the man pages are stored in separate markdown files instead of combined in a single large file. -* `mkdocs` now behaves like the other documentation generators and stores its files in `docs/`. This means that `mkdocs` websites can be deployed to Github Pages. + +* Settings files are now permanently stored in the `altdoc/` directory. These + files can be edited manually to customize the website. + +* Major internal changes to the .Rd -> .md conversion system. We now use Quarto + to convert man pages and execute examples, and the man pages are stored in + separate markdown files instead of combined in a single large file. + +* `mkdocs` now behaves like the other documentation generators and stores its + files in `docs/`. This means that `mkdocs` websites can be deployed to Github + Pages. + * Improved vignettes -* Do not reformat markdown header levels automatically, but raise a warning when there is more than one level 1 header. + +* Do not reformat markdown header levels automatically, but raise a warning when + there is more than one level 1 header. + * Fewer dependencies. * Fix parsing for issue/PR references like [org/repo#111]. + * Changelog and News sections can be present simultaneously. + * Support for `NEWS.Rd`, either in the root folder or in `inst/` + * Automatically create a Github Actions workflow with `setup_github_actions()`. + * Skip .Rd files when they document internal functions. + ## 0.2.2 * If necessary, two spaces are automatically added in nested lists in the `NEWS` From 1b183574170408855e94299280f77d832ab84f44 Mon Sep 17 00:00:00 2001 From: Etienne Bacher <52219252+etiennebacher@users.noreply.github.com> Date: Wed, 21 Feb 2024 15:37:57 +0100 Subject: [PATCH 09/14] use proper vignette preamble --- README.md | 1 + vignettes/get-started.Rmd | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index aa2787e6..ce113318 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ +
diff --git a/vignettes/get-started.Rmd b/vignettes/get-started.Rmd index f5eca24d..d1002e12 100644 --- a/vignettes/get-started.Rmd +++ b/vignettes/get-started.Rmd @@ -1,4 +1,11 @@ -# Get Started +--- +title: "Get started" +output: rmarkdown::html_vignette +vignette: > + %\VignetteIndexEntry{Get started} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} +--- ## Quick start From 042be0367dfc3867386356fa1fef90f982c57904 Mon Sep 17 00:00:00 2001 From: Etienne Bacher <52219252+etiennebacher@users.noreply.github.com> Date: Wed, 21 Feb 2024 15:40:29 +0100 Subject: [PATCH 10/14] update cran comments --- cran-comments.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/cran-comments.md b/cran-comments.md index fdd4fa8c..fbd83821 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -2,5 +2,3 @@ 0 errors | 0 warnings | 0 note - -Resubmission to fix test failures on CRAN due to the new version of `usethis`. From 7df1e3010e95c6397cb86caf4d7894b3f536882f Mon Sep 17 00:00:00 2001 From: Etienne Bacher <52219252+etiennebacher@users.noreply.github.com> Date: Wed, 21 Feb 2024 15:42:25 +0100 Subject: [PATCH 11/14] do not put vignettes in buildignore --- .Rbuildignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.Rbuildignore b/.Rbuildignore index 7f8fa8a4..14388159 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -12,7 +12,6 @@ ^CRAN-SUBMISSION$ ^docs$ ^altdoc$ -^vignettes$ ^.lintr$ man-roxygen ^inst/NEWS\.Rd$ From 4901b190e2369b4e0b5120bf649e3555ccc8a935 Mon Sep 17 00:00:00 2001 From: Etienne Bacher <52219252+etiennebacher@users.noreply.github.com> Date: Wed, 21 Feb 2024 15:58:11 +0100 Subject: [PATCH 12/14] description shouldn't start with pkg name --- DESCRIPTION | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index a9c4144a..0ca9093a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -13,7 +13,10 @@ Authors@R: email = "vincent.arel-bundock@umontreal.ca", comment = c(ORCID = "0000-0003-2042-7063")) ) -Description: 'altdoc' is a simple and powerful package to create, render, preview, and deploy documentation websites for 'R' packages. It is a lightweight and flexible alternative to 'pkgdown', with support for many documentation generators, including 'Quarto', 'Docute', 'Docsify', and 'MkDocs'. +Description: This is a simple and powerful package to create, render, preview, + and deploy documentation websites for 'R' packages. It is a lightweight and + flexible alternative to 'pkgdown', with support for many documentation + generators, including 'Quarto', 'Docute', 'Docsify', and 'MkDocs'. License: MIT + file LICENSE URL: https://altdoc.etiennebacher.com, https://github.com/etiennebacher/altdoc BugReports: https://github.com/etiennebacher/altdoc/issues From 136d882f9f7004a74426e557608cc71eedd3ca06 Mon Sep 17 00:00:00 2001 From: Etienne Bacher <52219252+etiennebacher@users.noreply.github.com> Date: Wed, 21 Feb 2024 16:00:50 +0100 Subject: [PATCH 13/14] use full link to "get started" --- README.md | 5 +++-- README.qmd | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ce113318..e068fee1 100644 --- a/README.md +++ b/README.md @@ -65,8 +65,9 @@ render_docs() preview_docs() ``` -See [the Get Started vignette](vignettes/get-started.md) for more -details. +See [the Get Started +vignette](https://altdoc.etiennebacher.com/#/vignettes/get-started.md) +for more details. ## Demos diff --git a/README.qmd b/README.qmd index 25d5f122..94be1b99 100755 --- a/README.qmd +++ b/README.qmd @@ -64,7 +64,8 @@ render_docs() preview_docs() ``` -See [the Get Started vignette](vignettes/get-started.md) for more details. +See [the Get Started vignette](https://altdoc.etiennebacher.com/#/vignettes/get-started.md) +for more details. ## Demos From f85e14531988aaa01f36a3ac7ce740b380872a1f Mon Sep 17 00:00:00 2001 From: Etienne Bacher <52219252+etiennebacher@users.noreply.github.com> Date: Wed, 21 Feb 2024 16:36:13 +0100 Subject: [PATCH 14/14] add cran comments --- cran-comments.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cran-comments.md b/cran-comments.md index fbd83821..6ec9ece0 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -2,3 +2,5 @@ 0 errors | 0 warnings | 0 note +This is the second submission of altdoc 0.3.0 (first one was an hour ago). I +corrected the NOTEs reported.