-
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New hook: cff #456
base: main
Are you sure you want to change the base?
New hook: cff #456
Conversation
Thanks @joelnitta, I will have a look at this next week. I think most notes, errors and warnings are as you said I related to your PR. |
As the error says, the hook must be listed in the |
Yeah, we should make the condo tests conditional on having condo installed. This currently works with
That way, testing should work better in local setup, i.e. not only on CI/CD where the env variables are set. I guess this would be a separate issue to fix (if you are interested, PR welcome 😀). |
This is annoying and I think a bug. |
True. We have a similar problem for run_test("deps-in-desc",
"Rprofile",
suffix = "", std_err = "Dependency check failed",
artifacts = c("DESCRIPTION" = test_path("in/DESCRIPTION")),
file_transformer = function(files) {
writeLines("R.cache::findCache", files)
fs::file_move(
files,
fs::path(fs::path_dir(files), paste0(".", fs::path_file(files)))
)
}
) Can you do the same with your citation file? |
Thanks overall, very good PR for a first contributor 🥳 |
Also, maybe once this gets merged, we can ask the {cff} maintainers to also document our hook (based on the pre-commit.com framework) as another backend for the pre-commit hook they have built on top of the bare git hook functionality? |
Yes, I missed that -- but I see in |
In the root it’s commented out. But there is a sample config file testthat/resources or similar that need to have the hook listed. That’s just for testing. See also the workflow file of the failing GitHub Action in |
Did you see my other comments (not liked to lines of code) above? |
Yes (thanks!) but I'm going to be traveling soon and may not get to this for a while, so I thought I'd send what I've fixed so far. Not much but it's a start. |
@joelnitta do you want to finish this up or should we close it? |
Sorry, fell off the radar. Thanks for the reminder, I'll try to get to this in the next week, or you can close it. |
@lorenzwalthert would you consider updating to the most recent renv? I am having trouble re-creating the project library, since I am coming back to this after a while and am needing to update packages. Specifically I'm having problems with {digest}, which I can install using renv v1.0.3 but not v0.17.3. |
I suggest you update your fork, because the digest dependency was removed. If that does not solve the problem, delete the |
Even though it is not listed in Line 199 in e989416
|
I would encourage this hook, I was just looking for it |
@joelnitta sorry I for some reason forgot about this PR completely. Can you fix the merge conflict and I'll do another review and then hopefully merge it? |
Fixes #446.
When I run
R CMD check
(withdevtools::check()
), I get anERROR
and twoNOTE
s, but I believe the error is unrelated to this PR and only one of the notes is.I used brew to install pre-commit, not conda; perhaps that has something to do with the error?
I didn't use {here} in any of my code. Perhaps it does need to be imported?
You may need to indicate in
cran-comments.md
that the note about location ofCITATION.cff
does not indicate a problem.