-
Notifications
You must be signed in to change notification settings - Fork 25
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
R CMD check note: not imported from lifecycle
#22
Comments
I'm not sure if there is a conventional way to fix this NOTE but including something like this somewhere in the package should do it: if (FALSE) lifecycle::deprecate_soft() |
@lionel- Thanks for the quick turnaround, this worked! Including |
Two more "traditional" ways to silence this are to import one function into your NAMESPACE. This is what the tidyverse package does: Or you can create a pragmatic function that uses something from the package, but never call it: |
You don't even need the if or an actual call, e.g. just this somewhere in your package would work. lifecycle::deprecate_soft |
Thanks @jimhester! I've moved the lifecycle dependency to "Suggests" (together with my other dev dependencies like testthat, usethis, covr) which muted the original NOTE. I'm still happily using the lifecycle badges in function docs. Is "Suggests" the correct place for lifecycle if using its badges? |
It won't cause R CMD check problems but it will cause trouble at doc rendering time when your users don't have lifecycle installed. I think it has to be in imports. |
Sorry to comment on an old closed issue but found this while trying to answer the same question (what to do when just using lifecycle badges). It does seem that currently the lifecycle documentation does have a paragraph addressing this exact scenario:
(from https://cran.r-project.org/web/packages/lifecycle/lifecycle.pdf) So no secret lifecycle function calls or Imports addition needed! |
Hi, thanks for this fantastic package!
I've ran
usethis::use_lifecycle()
and use the\lifecycle{...}
badges in my function docs.I'm getting a NOTE from R CMD check:
Related: in addition to above NOTE,
goodpractice
also raises #19, output see details.What's the cleanest way to fix this NOTE?
sessionInfo and goodpractice
Output from
goodpractice::goodpractice()
:The text was updated successfully, but these errors were encountered: