|
1 | | -# precommit v0.1.3.9114-* (Development) |
2 | | - |
3 | | -This version marks the switch to `language: r` of all existing hooks. This |
4 | | -includes switching to R based hook for `readme-rmd-render`, avoiding the |
5 | | -{usethis} dependency, integration tests via GitHub Actions, auto-updates for |
6 | | -used packages, roxygen snippet generation and more. In addition: |
7 | | - |
8 | | -* `use_precommit()` gains a `ci` argument, defaulting to `"native"`, which will |
9 | | - guide the user to set up continuous integration of the hooks with either |
10 | | - [pre-commit.ci](https://pre-commit.ci) or |
11 | | - [GitHub Actions](https://github.com/features/actions). New exported |
12 | | - function `use_ci(ci = "native")` can be used to migrate existing repos. The |
13 | | - default behavior for `ci` is governed by the R option `precommit.ci`. |
14 | | -* `use_precommit(..., install_hooks = TRUE)` is no longer blocking by default. |
15 | | - New option `precommit.block_install_hooks` (defaults to `FALSE`) governs the |
16 | | - behavior (#312). |
17 | | -* Always sort `inst/WORDLIST` (#303). |
18 | | -* rename default branch to *main* (#307). |
19 | | -* `style-files` hook gains an argument `--cache-root` that is passed to |
20 | | - `options(styler.cache_root = ...)` (#305). |
21 | | -* Use dev version of {lintr} to reduce total dependencies from 71 to 59 that |
22 | | - brings down install time. |
23 | | -* Use LF line endings in git config to ensure passing tests on Windows for R |
24 | | - devel (#321). |
25 | | -* `.lintr` and `.gitlab-ci.yml` are not ignored in the spell check hook (#317). |
26 | | - |
27 | | -# precommit v0.1.3.9012 |
28 | | - |
29 | | -This is a pre-release for `v0.2.0` and imposes a minimal version requirement |
30 | | -on the [pre-commit framework](https://pre-commit.com/) (`v2.13.0`). Please see |
31 | | -*Installation/Update* below for how to satisfy it. This will ensure future |
32 | | -releases of {precommit} building on the newly supported |
33 | | -[`language: r`](https://pre-commit.com/#r) will work out of the box instead of |
34 | | -issuing messages that are confusing for most end-users. We aspire the transition |
35 | | -to `language: r` due to the following benefits: No more manual dependency management |
36 | | -for hooks nor conflicts with your global R library plus eventually it will |
37 | | -enable the easy use of continuous integration services (enforcing hooks and |
38 | | -auto-fixing problems with pre-commit.ci, GitHub Actions). |
39 | | - |
| 1 | +# precommit v0.2.0 |
40 | 2 |
|
41 | | -**Installation/Update** |
42 | 3 |
|
43 | | -Please follow the |
44 | | -[update instructions](https://lorenzwalthert.github.io/precommit/dev/#update) or |
45 | | -[installation instructions](https://lorenzwalthert.github.io/precommit/dev/#installation) |
46 | | -depending on whether or not you previously used pre-commit. |
47 | | - |
48 | | -**API changes** |
| 4 | +This version marks the switch to [`language: r`](https://pre-commit.com/#r) of |
| 5 | +all existing hooks. This means two things: |
49 | 6 |
|
| 7 | +* creation of isolated pre-commit environments: No |
| 8 | + more manual dependency management for hooks nor conflicts with your global R |
| 9 | + library and more consistent output of hooks from different collaborators in a |
| 10 | + project. Thanks to {renv}'s excellent |
| 11 | + [caching](https://rstudio.github.io/renv/articles/renv.html#cache-1), this |
| 12 | + hardly consumes any space and is fast. |
| 13 | + This requires the Python package `pre-commit >= 2.11.1` (ideally even |
| 14 | + `>= 2.13.0`). See *Installation/Update** below (#233, #250, #260, #264, #273, |
| 15 | + #315, #313, #308, #301, #300, #295, #285). |
| 16 | +* support for continuous integration via [pre-commit.ci](https://pre-commit.ci) |
| 17 | + and [GitHub Actions]([GitHub Actions](https://github.com/pre-commit/action), |
| 18 | + that is, running the pre-commit hooks as part of a CI pipeline. This |
| 19 | + means that hook passing can be enforced for pull requests, even if the creator |
| 20 | + did not run the hooks locally. Further, the diff from running the hooks is |
| 21 | + committed and pushed back to the remote repository. This may fix the failing |
| 22 | + hook problems in some cases (e.g. `style-files`). See `vignette("ci")` for a |
| 23 | + comparison of the two services (#318). |
| 24 | + |
| 25 | +*API changes** |
| 26 | + |
| 27 | +* `use_precommit()` gains a new argument `ci` defaulting to `"native"` (for |
| 28 | + [pre-commit](https://pre-commit.ci)) to set up continuous |
| 29 | + integration. Other allowed values are `"gha"` (for |
| 30 | + [GitHub Actions]([GitHub Actions](https://github.com/pre-commit/action)) or |
| 31 | + `NULL` (for no CI). |
| 32 | +* The new exported function `use_ci(ci = "native")` can be used to set up |
| 33 | + continuous integration for existing repos. The default behavior for `ci` for |
| 34 | + both functions is governed by the R option `precommit.ci`. |
50 | 35 | - `version_precommit()` and `update_precommit()` are new functions to check the |
51 | 36 | version of the installed pre-commit executable and to update it (#197). |
| 37 | +* `style-files` hook gains an argument `--cache-root` that is passed to |
| 38 | + `options(styler.cache_root = ...)` (#305). |
52 | 39 | - `style-files` hook now supports the full |
53 | 40 | [`style_file()`](https://styler.r-lib.org/dev/reference/style_file.html) API, |
54 | 41 | e.g. you can supply `--scope=spaces` and similar via `args:` in your |
55 | 42 | `.pre-commit-config.yaml`. See the |
56 | 43 | [docs](https://lorenzwalthert.github.io/precommit/articles/available-hooks.html#style-files-1) |
57 | 44 | for details. |
| 45 | +- `style-files` and `roxygenize` hooks now warn if there is no permanent |
| 46 | + `{R.cache}` cache set up. You can silence the warning with the hook argument |
| 47 | + `--no-warn-cache` (#225). |
58 | 48 |
|
59 | | -**Major Changes** |
60 | 49 |
|
61 | | -- {precommit} now uses [`language: r`](https://pre-commit.com/#r) instead of |
62 | | - `language: script` from the [pre-commit framework](https://pre-commit.com). |
63 | | - This requires `pre-commit >= 2.11.1` (ideally even `>= 2.13.0`). All hooks and |
64 | | - dependencies are now contained in a virtual environment with |
65 | | - [`{renv}`](https://rstudio.github.io/renv/). Thanks to {renv}'s excellent |
66 | | - [caching](https://rstudio.github.io/renv/articles/renv.html#cache-1), this |
67 | | - hardly consumes any space and is fast. This makes output |
68 | | - of hooks more consistent across different local setups, make manual dependency |
69 | | - management redundant and will facilitate running R hooks as part of CI/CD in |
70 | | - the future, e.g. via https://pre-commit.ci or |
71 | | - [GitHub Actions](https://github.com/pre-commit/action) along with hook |
72 | | - implemented in other languages (#233, #250, #260, #264, #273). |
| 50 | +**Installation/Update** |
| 51 | + |
| 52 | +Please follow the |
| 53 | +[update instructions](https://lorenzwalthert.github.io/precommit/dev/#update) or |
| 54 | +[installation instructions](https://lorenzwalthert.github.io/precommit/dev/#installation) |
| 55 | +depending on whether or not you previously used pre-commit. |
| 56 | + |
| 57 | + |
| 58 | +**Major changes** |
| 59 | + |
73 | 60 | - Because hooks run in a virtual environment and the `roxygenize` hook runs |
74 | 61 | `pkgload::load_all()`, you need to list all dependencies of your package in |
75 | 62 | `additional_dependencies` field in `.pre-commit-config.yaml`. You will be |
76 | 63 | prompted to add them if they are missing, |
77 | 64 | `precommit::snippet_generate("additional-deps-roxygenize")` generates |
78 | 65 | the code you can copy/paste (#247, #248, #249). |
| 66 | + |
| 67 | +- In order to avoid multiple installations of the pre-commit framework, a |
| 68 | + warning is issued if multiple are found so the user can remove them (#266, |
| 69 | + #273, #277, #278). |
| 70 | +* `use_precommit(..., install_hooks = TRUE)` is no longer blocking by default. |
| 71 | + New option `precommit.block_install_hooks` (defaults to `FALSE`) governs the |
| 72 | + behavior (#312). |
| 73 | +* Always sort `inst/WORDLIST` (#303). |
| 74 | +* `.lintr` and `.gitlab-ci.yml` are not ignored in the spell check hook (#317). |
79 | 75 | - Warnings are no longer promoted to errors in the styler hook, which is |
80 | 76 | particularly relevant for the apparently random error |
81 | 77 | `Unknown or uninitialised column: text` (#268). |
82 | 78 | - `deps-in-desc` now checks `.Rprofile`, `.Rmd` and `.Rnw` files in addition to |
83 | 79 | `.R` files (#216). |
84 | | -- `style-files` and `roxygenize` hooks now warn if there is no permanent |
85 | | - `{R.cache}` cache set up. You can silence the warning with the hook argument |
86 | | - `--no-warn-cache` (#225). |
87 | 80 | - the lintr and styler hook now also check `.Rmd`, `.Rnw` and `.Rprofile` files |
88 | | - (#286). |
89 | | - |
90 | | -**Minor changes** |
91 | | - |
92 | | -- In order to avoid multiple installations of the pre-commit framework, a |
93 | | - warning is issued if multiple are found so the user can remove them (#266, |
94 | | - #273, #277, #278). |
95 | | -- The cache for the roxygen2 hook is now also invalidated for changes in formals |
96 | | - if there are no changes in roxygen comments (#214). |
| 81 | + (#287). |
97 | 82 | - `{renv}` infra files are not checked anymore by default in the template config |
98 | 83 | files (#237). |
99 | 84 | - `.png`, `.jpeg`, `.pdf` and files in `.github/workflows` are no longer |
100 | 85 | spell-checked in the template config file (#276). |
101 | | -- All sub-patterns in the `exclude:` pattern of the spell check hook are now |
102 | | - ordered alphabetically (#276). |
| 86 | + |
| 87 | + |
| 88 | +**Minor changes** |
| 89 | + |
| 90 | +* rename default branch to *main* (#307). |
| 91 | +* Use dev version of {lintr} to reduce total dependencies from 71 to 59 that |
| 92 | + brings down install time. |
103 | 93 | - The location of the pre-commit executable is now also recognized on Apple |
104 | 94 | Silicon when installed with Homebrew (#240). |
| 95 | +- pinning python version to 3.9 for conda until problems related to 3.10 are |
| 96 | + fixed (#310). |
| 97 | +- The cache for the roxygen2 hook is now also invalidated for changes in formals |
| 98 | + if there are no changes in roxygen comments (#214). |
| 99 | +- All sub-patterns in the `exclude:` pattern of the spell check hook are now |
| 100 | + ordered alphabetically (#276). |
105 | 101 | - The `deps-in-desc` hook now points to the hook argument |
106 | 102 | `--allow_private_imports` when the hook fails due to private imports (#254). |
107 | 103 | - roxygenize hook is now fully tested (#267). |
108 | 104 | - Hook scripts were relocated and R hooks now have a file extension (#280). |
109 | 105 | - Hook dependency updates are proposed by an automatic monthly pull request |
110 | 106 | to `lorenzwalthert/precommit`. This does not affect users directly (#430). |
111 | 107 | - Updated GitHub Action workflows (#288). |
| 108 | +* Use LF line endings in git config to ensure passing tests on Windows for R |
| 109 | + devel (#321). |
| 110 | +- fixing typos (#289). |
| 111 | +- fix R CMD Check (#284). |
| 112 | + |
| 113 | + |
| 114 | +A big hand to all the contributors of this release: |
| 115 | + |
| 116 | +[@adamblake](https://github.com/adamblake), |
| 117 | +[@arbues6](https://github.com/arbues6), |
| 118 | +[@b4D8](https://github.com/b4D8), |
| 119 | +[@bart1](https://github.com/bart1), |
| 120 | +[@dhersz](https://github.com/dhersz), [@github-actions[bot]](https://github.com/github-actions[bot]), [@joelnitta](https://github.com/joelnitta), |
| 121 | +[@jucor](https://github.com/jucor), |
| 122 | +[@lorenzwalthert](https://github.com/lorenzwalthert), [@lukasfeick-sw](https://github.com/lukasfeick-sw), [@MarkMc1089](https://github.com/MarkMc1089), |
| 123 | +[@njtierney](https://github.com/njtierney), |
| 124 | +[@pat-s](https://github.com/pat-s), [@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]), [@pwildenhain](https://github.com/pwildenhain), and [@rossdrucker](https://github.com/rossdrucker) |
| 125 | + |
| 126 | +For previous versions of `NEWS.md` with news bullet per patch release, see the |
| 127 | +[latest `NEWS.md` before gathering](https://github.com/lorenzwalthert/precommit/blob/7a8740714ab868d20e981b8b80898d7be050e34e/NEWS.md). |
112 | 128 |
|
113 | 129 | # precommit v0.1.3 |
114 | 130 |
|
|
0 commit comments