From 3ef811fd9c275bf48b00ccac92811f025b5d19eb Mon Sep 17 00:00:00 2001 From: Lorenz Walthert Date: Sat, 22 Oct 2022 18:30:09 +0200 Subject: [PATCH 1/4] Bump version to 1.8.0 --- DESCRIPTION | 2 +- NEWS.md | 144 ++++++++++++++++++++++++++------------------------ inst/WORDLIST | 3 ++ 3 files changed, 80 insertions(+), 69 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 986be39e8..03fd7fa06 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: styler Title: Non-Invasive Pretty Printing of R Code -Version: 1.7.0.9003 +Version: 1.8.0 Authors@R: c(person(given = "Kirill", family = "Müller", diff --git a/NEWS.md b/NEWS.md index 1448134d5..58073f6ac 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,101 +1,109 @@ -# styler 1.7.0.9003 -**Performance and code quality improvements** +# styler 1.8.0 -- Use integer literals and avoid coercions where needed (\@IndrajeetPatil, #994). -- Don't preserve names for `unlist()` (\@IndrajeetPatil, #998). -- Remove unused variables (\@IndrajeetPatil, #999). -- Get rid of lints with performance implications (\@IndrajeetPatil, #1000). -- Use more efficient match() alternative (\@IndrajeetPatil, #1001). -- Don't use `nrow` arg in `new_tibble()` calls (\@IndrajeetPatil, #1003). -- Performance improvements with `if()` + `else()` instead of `ifelse()` (\@IndrajeetPatil, #1006). -- Replace tibbles with data frames to improve performance (\@IndrajeetPatil, #1007). -- Simplify `styler_df()` signature (\@IndrajeetPatil, #1009). -- Minor cleanup (\@IndrajeetPatil, #1016). +{styler} 1.8.0 comes with a host of new features, around 40% speed improvement, +bug fixes and the removal of 8 recursive dependencies. We also welcome +\@IndrajeetPatil as a new contributor to {styler}, who has contributed +significantly to this and and previous releases. -**Dependency related changes** +**Features** -- Don't import entire tibble package (\@IndrajeetPatil, #1007). -- Drop {rematch2} dependency (\@IndrajeetPatil, #1011). +- `style_dir()` and `style_pkg()` now default to styling all supported file +formats (`.R`, `.Rmd`, `.Rmarkdown`, `.Rnw`, and `.qmd`) in the (package) +directory (#965, #931, #1033). + - `style_pkg()` now excludes the auto-generated `R/cpp11.R` file (#977). + - Minimum needed R version is now bumped to `3.5` (#986). -**Other changes** +- alignment is now detected for function declaration in a similar way as for +function calls (#968). +- new R option `styler.ignore_alignment` controls if alignment should be +detected (and preserved) or not (#932). -- Add flags to skip code coverage for zzz.R (\@IndrajeetPatil, #1005). +**Bug Fixes** -# styler 1.7.0.9002 (Development version) +- alignment is detected in `tibble::tribble()` (and similar) calls with more +than 3 columns when left aligned (#945). -- Same as previous version. +- Fix alignment detection for one column, mixed named/unnamed (#1035). +- If there are only empty lines in a code chunk, they are all removed (#936). -# styler 1.7.0.9000 +- apply rules for [ to [[ and its closing counterpair (#1030) -**User-facing changes** +- There is now at most one line break after `{` and before `#` (#952, #1022). -- `style_dir()` and `style_pkg()` now default to styling all supported file - formats (`.R`, `.Rmd`, `.Rmarkdown`, `.Rnw`, and `.qmd`) in the (package) - directory (\@IndrajeetPatil, #965, #931). -- `style_pkg()` now excludes the auto-generated `R/cpp11.R` file (#977). -- Minimum needed R version is now bumped to `3.5` (\@IndrajeetPatil, #986). +- Line breaks may be added to function calls to ensure indention symmetry for +round braces (#975). -**Features** +- the cache is also invalidated on changing the stylerignore markers (#932). -- alignment is now detected for function declaration in a similar way as for - function calls (#968). -- new R option `styler.ignore_alignment` controls if alignment should be - detected (and preserved) or not (#932). +- `{` is not put on a new line after `=` and in `function() {` for some edge +cases (#939). -**Bug Fixes** +- `while ({})` statements are now handled the same way as function statements +with regards to breaking lines (#967). -- alignment is detected in `tibble::tribble()` (and similar) calls with more - than 3 columns when left aligned (#945). +- Parsing of {roxygen2} example comments now also works for edge cases when +there is no literal code immediately following after the end of the example +section (#940). -- If there are only empty lines in a code chunk, they are all removed (#936). +- Files with no tokens in it are now transformed into zero-byte files (#962). -- There is now always one line break after `{` and before `#` (#952). +**Documentation** -- Line breaks may be added to function calls to ensure indention symmetry for - round braces (#975). +- Old (and outdated) vignettes have been removed (#955). To +access them, do `git checkout v1.0.0`. +- Minor improvements to the documentation (#958). + - turned off `styler.print.Vertical` in vignettes so ANSI output of + {prettycode} not messing with {pkgdown} (#956, #957). -- the cache is also invalidated on changing the stylerignore markers (#932). -- `{` is not put on a new line after `=` and in `function() {` for some edge - cases (#939). +**Performance and code quality improvements** + +- Use integer literals and avoid coercions where needed (#994). + - Don't preserve names for `unlist()` (#998). +- Remove unused variables (#999). +- Get rid of lints with performance implications (#1000). +- Use more efficient match() alternative (#1001). +- Don't use `nrow` arg in `new_tibble()` calls (#1003). +- Performance improvements with `if()` + `else()` instead of `ifelse()` (#1006). + - Replace tibbles with data frames to improve performance (#1007). +- Simplify `styler_df()` signature (#1009). +- Minor cleanup (#1016). + - Non-exported and unused functions `odd()` and `even()` were removed + (#989). + - All (R)md files in this project's source code are now formatted with +default pandoc markdown formatter. This conversion is required when using +the visual mode in RStudio (#941). +- Improved code quality by fixing {lintr} warnings (#960, #1028). + -- `while ({})` statements are now handled the same way as function statements - with regards to breaking lines (#967). +**Dependency related changes** + +In total, 8 recursive dependencies are removed: {ellipsis}, {pillar}, +{rematch2}, {tibble}, {utf8}, {fansi}, {lifecycle}, {pkgconfig}. -- Parsing of {roxygen2} example comments now also works for edge cases when - there is no literal code immediately following after the end of the example - section (#940). +- Don't import entire tibble package (#1007). +- Drop {rematch2} dependency (#1011). -- Files with no tokens in it are now transformed into zero-byte files (#962). -**Other** +**Infrastructure** -- \@IndrajeetPatil is now a contributor to {styler}. Welcome and thanks for - everything you did so far! (#988). -- Old (and outdated) vignettes have been removed (\@IndrajeetPatil, #955). To - access them, do `git checkout v1.0.0`. -- Minor improvements to the documentation (\@IndrajeetPatil, #958). -- turned off `styler.print.Vertical` in vignettes so ANSI output of - {prettycode} not messing with {pkgdown} (\@IndrajeetPatil, #956, #957). -- Non-exported and unused functions `odd()` and `even()` were removed - (\@IndrajeetPatil, #989). -- Upgrade testing infra to testthat 3e (\@IndrajeetPatil, #949). -- All (R)md files in this project's source code are now formatted with - default pandoc markdown formatter. This conversion is required when using - the visual mode in RStudio (#941). -- Update {pkgdown} action to always build, but only deploy on default branch - (#946). -- Better stack tracing for profiling (#979, #980). -- Improved code quality by fixing {lintr} warnings (#960). -- Error now on R CMD note (\@IndrajeetPatil, #987). -- Test on latest Ubuntu instead of Ubuntu 18.04 (#982). -- Run tests in parallel (#978, \@krlmlr). +- Upgrade testing infra to testthat 3e (#949). +- Run tests in parallel (#978). +- Run some tests sequentially (#1031) +- Better stack tracing for profiling (#979, #980). +- Add flags to skip code coverage for zzz.R (#1005). + - Error now on R CMD note (#987). +- Test on latest Ubuntu instead of Ubuntu 18.04 (#982). +- Use latest GitHub Actions for R (#1034). +- Update {pkgdown} action to always build, but only deploy on default branch +(#946). +- remove pre-commit push hook for news entry (#1023). # styler 1.7.0 diff --git a/inst/WORDLIST b/inst/WORDLIST index d4c3a037e..4af72b2b6 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -27,6 +27,7 @@ coercions compat config CONST +counterpair coventions covr cpp @@ -63,6 +64,7 @@ examplesIf exampletestr expr expr EQ +fansi fileext filetype forcond @@ -150,6 +152,7 @@ patilindrajeet patilindrajeets pgkdown pkgapi +pkgconfig pkgdown pkgs pos From c7e2c6a0fd4de42afa4d7d0b0ea99715b2ef51b3 Mon Sep 17 00:00:00 2001 From: Lorenz Walthert Date: Sat, 22 Oct 2022 20:21:10 +0200 Subject: [PATCH 2/4] add tidy thanks --- NEWS.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/NEWS.md b/NEWS.md index 58073f6ac..596fe2934 100644 --- a/NEWS.md +++ b/NEWS.md @@ -105,6 +105,14 @@ In total, 8 recursive dependencies are removed: {ellipsis}, {pillar}, (#946). - remove pre-commit push hook for news entry (#1023). +A big hand to everyone who made this release possible: + +[@behrman](https://github.com/behrman), +[@EngineerDanny](https://github.com/EngineerDanny), [@gavinsimpson](https://github.com/gavinsimpson), [@IndrajeetPatil](https://github.com/IndrajeetPatil), [@jabenninghoff](https://github.com/jabenninghoff), +[@krlmlr](https://github.com/krlmlr), +[@lorenzwalthert](https://github.com/lorenzwalthert), [@MichaelChirico](https://github.com/MichaelChirico), [@moodymudskipper](https://github.com/moodymudskipper), [@RaymondBalise](https://github.com/RaymondBalise), [@Robinlovelace](https://github.com/Robinlovelace), [@sebffischer](https://github.com/sebffischer), +[@sgorm123](https://github.com/sgorm123), [@stefanoborini](https://github.com/stefanoborini), and [@wdkrnls](https://github.com/wdkrnls). + # styler 1.7.0 - if `else` follows directly after `if`, line breaks are removed (#935). From 32bd3a69b509a28e5638fb86e894298c04a37290 Mon Sep 17 00:00:00 2001 From: Lorenz Walthert Date: Sat, 22 Oct 2022 20:27:16 +0200 Subject: [PATCH 3/4] update deps --- cran-comments.md | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/cran-comments.md b/cran-comments.md index 7935d7e66..59027b212 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -4,15 +4,11 @@ editor_options: wrap: 79 --- -This release does not check for a specific error message from `parse()` anymore -when the input involves unparsable use of `_`. The release was requested by -Luke Tierney. - ## Test environments -- ubuntu 20.04 (on GitHub Actions): R devel, R 4.1.2, R 4.0.5, R 3.6, R 3.5, - R 3.4 -- Windows Server 10 (on GitHub Actions): R 3.6, R 4.0.5 +- ubuntu 20.04 (on GitHub Actions): R devel, R 4.2.1, 4.1.2, R 4.0.5, R 3.6, + R 3.5. +- Windows Server 10 (on GitHub Actions): R devel, R 4.2.1, R 4.1.2, R 3.6. - win-builder: R devel ## R CMD check results @@ -35,15 +31,7 @@ compliant with the requirements of CRAN. ## Downstream Dependencies -I also ran R CMD check on all downstream dependencies of styler using the -revdepcheck package. The downstream dependencies are: - -- Reverse imports: biocthis, boomer, exampletestr, flow, iNZightTools, - languageserver, questionr, shinymeta, shinyobjects, ShinyQuickStarter, - systemPipeShiny, tidypaleo. - -- Reverse suggests: admiral, autothresholdr, crunch, datastructures, drake, - epigraphdb, ghclass, knitr, multiverse, nph, precommit, reprex, - shiny.react, shinydashboardPlus, shinyMonacoEditor, upsetjs, usethis. +I also ran R CMD check on all 39 downstream dependencies of styler using the +revdepcheck package. All of them finished R CMD CHECK with zero (0) ERRORS, WARNINGS and NOTES. From f8321047b5ff612e91b03812b4312c8af11a0a0d Mon Sep 17 00:00:00 2001 From: Lorenz Walthert Date: Sat, 22 Oct 2022 22:09:21 +0200 Subject: [PATCH 4/4] reformat --- NEWS.md | 97 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 48 insertions(+), 49 deletions(-) diff --git a/NEWS.md b/NEWS.md index 596fe2934..2783c6a6c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -8,36 +8,35 @@ bug fixes and the removal of 8 recursive dependencies. We also welcome \@IndrajeetPatil as a new contributor to {styler}, who has contributed significantly to this and and previous releases. - **Features** - `style_dir()` and `style_pkg()` now default to styling all supported file -formats (`.R`, `.Rmd`, `.Rmarkdown`, `.Rnw`, and `.qmd`) in the (package) -directory (#965, #931, #1033). - - `style_pkg()` now excludes the auto-generated `R/cpp11.R` file (#977). - - Minimum needed R version is now bumped to `3.5` (#986). + formats (`.R`, `.Rmd`, `.Rmarkdown`, `.Rnw`, and `.qmd`) in the (package) + directory (#965, #931, #1033). +- `style_pkg()` now excludes the auto-generated `R/cpp11.R` file (#977). +- minimum needed R version is now bumped to `3.5` (#986). - alignment is now detected for function declaration in a similar way as for -function calls (#968). + function calls (#968). - new R option `styler.ignore_alignment` controls if alignment should be -detected (and preserved) or not (#932). + detected (and preserved) or not (#932). **Bug Fixes** - alignment is detected in `tibble::tribble()` (and similar) calls with more -than 3 columns when left aligned (#945). + than 3 columns when left aligned (#945). -- Fix alignment detection for one column, mixed named/unnamed (#1035). +- fix alignment detection for one column, mixed named/unnamed (#1035). -- If there are only empty lines in a code chunk, they are all removed (#936). +- if there are only empty lines in a code chunk, they are all removed (#936). - apply rules for [ to [[ and its closing counterpair (#1030) -- There is now at most one line break after `{` and before `#` (#952, #1022). +- there is now at most one line break after `{` and before `#` (#952, #1022). -- Line breaks may be added to function calls to ensure indention symmetry for -round braces (#975). +- line breaks may be added to function calls to ensure indention symmetry for + round braces (#975). - the cache is also invalidated on changing the stylerignore markers (#932). @@ -45,41 +44,41 @@ round braces (#975). cases (#939). - `while ({})` statements are now handled the same way as function statements -with regards to breaking lines (#967). + with regards to breaking lines (#967). -- Parsing of {roxygen2} example comments now also works for edge cases when -there is no literal code immediately following after the end of the example -section (#940). +- parsing of {roxygen2} example comments now also works for edge cases when + there is no literal code immediately following after the end of the example + section (#940). -- Files with no tokens in it are now transformed into zero-byte files (#962). +- files with no tokens in it are now transformed into zero-byte files (#962). **Documentation** -- Old (and outdated) vignettes have been removed (#955). To -access them, do `git checkout v1.0.0`. -- Minor improvements to the documentation (#958). - - turned off `styler.print.Vertical` in vignettes so ANSI output of +- old (and outdated) vignettes have been removed (#955). To access them, do + `git checkout v1.0.0`. +- minor improvements to the documentation (#958). +- turned off `styler.colored_print.vertical` in vignettes so ANSI output of {prettycode} not messing with {pkgdown} (#956, #957). **Performance and code quality improvements** -- Use integer literals and avoid coercions where needed (#994). - - Don't preserve names for `unlist()` (#998). -- Remove unused variables (#999). -- Get rid of lints with performance implications (#1000). -- Use more efficient match() alternative (#1001). -- Don't use `nrow` arg in `new_tibble()` calls (#1003). -- Performance improvements with `if()` + `else()` instead of `ifelse()` (#1006). - - Replace tibbles with data frames to improve performance (#1007). -- Simplify `styler_df()` signature (#1009). -- Minor cleanup (#1016). - - Non-exported and unused functions `odd()` and `even()` were removed +- use integer literals and avoid coercions where needed (#994). +- don't preserve names for `unlist()` (#998). +- remove unused variables (#999). +- get rid of lints with performance implications (#1000). +- use more efficient match() alternative (#1001). +- don't use `nrow` arg in `new_tibble()` calls (#1003). +- performance improvements with `if()` + `else()` instead of `ifelse()` (#1006). +- replace tibbles with data frames to improve performance (#1007). +- simplify `styler_df()` signature (#1009). +- minor cleanup (#1016). +- non-exported and unused functions `odd()` and `even()` were removed (#989). - - All (R)md files in this project's source code are now formatted with -default pandoc markdown formatter. This conversion is required when using -the visual mode in RStudio (#941). -- Improved code quality by fixing {lintr} warnings (#960, #1028). +- all (R)md files in this project's source code are now formatted with default + pandoc markdown formatter. This conversion is required when using the visual + mode in RStudio (#941). +- improved code quality by fixing {lintr} warnings (#960, #1028). **Dependency related changes** @@ -87,22 +86,22 @@ the visual mode in RStudio (#941). In total, 8 recursive dependencies are removed: {ellipsis}, {pillar}, {rematch2}, {tibble}, {utf8}, {fansi}, {lifecycle}, {pkgconfig}. -- Don't import entire tibble package (#1007). -- Drop {rematch2} dependency (#1011). +- don't import entire tibble package (#1007). +- drop {rematch2} dependency (#1011). **Infrastructure** -- Upgrade testing infra to testthat 3e (#949). -- Run tests in parallel (#978). -- Run some tests sequentially (#1031) -- Better stack tracing for profiling (#979, #980). -- Add flags to skip code coverage for zzz.R (#1005). - - Error now on R CMD note (#987). -- Test on latest Ubuntu instead of Ubuntu 18.04 (#982). -- Use latest GitHub Actions for R (#1034). -- Update {pkgdown} action to always build, but only deploy on default branch -(#946). +- upgrade testing infra to testthat 3e (#949). +- run tests in parallel (#978). +- run some tests sequentially (#1031) +- better stack tracing for profiling (#979, #980). +- add flags to skip code coverage for zzz.R (#1005). +- error now on R CMD note (#987). +- test on latest Ubuntu instead of Ubuntu 18.04 (#982). +- use latest GitHub Actions for R (#1034). +- update {pkgdown} action to always build, but only deploy on default branch + (#946). - remove pre-commit push hook for news entry (#1023). A big hand to everyone who made this release possible: