You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I find I regularly forget to update codemeta.json when tweaking the DESCRIPTION. The error message advises to run codemetar::write_codemeta() to update the file.
Describe the solution you'd like
Other hooks such as lintr and styler modify files and it would be neat if this update could be performed automatically if it fails.
But I think the codemetar package would have to be added to the DESCRIPTION too, possibly under the suggests section (not too hot on my R packaging, but learning slowly!).
Describe alternatives you've considered
Improving my memory to always run codemetar::write_codemeta() after touching the DESCRIPTION.
Additional context
Example of failure...
codemeta-description-updated.............................................Failed
- hook id: codemeta-description-updated
- exit code: 1
ℹ Using R 4.3.1 (lockfile was generated with R 4.2.1)
ℹ Using R 4.3.1 (lockfile was generated with R 4.2.1)
Error:
! codemeta.json is out of date; please re-run codemetar::write_codemeta().
Backtrace:
▆
1. └─rlang::abort("codemeta.json is out of date; please re-run codemetar::write_codemeta().")
Execution halted
The text was updated successfully, but these errors were encountered:
The reason why we don't run automatically is 1) {codemetar} has a huge amount of dependencies that you needed to install in your pre-commit renv, and people who don't want to use this hook, but other hooks from the repo have to do that too. 2) it's slow. Similar to #494, I think a new hook that uses the system language would solve the problem.
An alternative is that you go talk to the maintainers of {codemeta} so they can implement the hook on their side. That would resulte in a new virtual env created only for this hook and not interact with my repo.
Is your feature request related to a problem? Please describe.
I find I regularly forget to update
codemeta.json
when tweaking theDESCRIPTION
. The error message advises to runcodemetar::write_codemeta()
to update the file.Describe the solution you'd like
Other hooks such as
lintr
andstyler
modify files and it would be neat if this update could be performed automatically if it fails.Probably over-simplifying it but perhaps Line 31 of
inst/hooks/exported/codemeta-description-updated.R
could be replaced withBut I think the
codemetar
package would have to be added to theDESCRIPTION
too, possibly under thesuggests
section (not too hot on my R packaging, but learning slowly!).Describe alternatives you've considered
Improving my memory to always run
codemetar::write_codemeta()
after touching theDESCRIPTION
.Additional context
Example of failure...
The text was updated successfully, but these errors were encountered: