Skip to content
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

Move un-imported packages to "Suggests"? #2

Closed
trevorld opened this issue Feb 22, 2022 · 2 comments
Closed

Move un-imported packages to "Suggests"? #2

trevorld opened this issue Feb 22, 2022 · 2 comments

Comments

@trevorld
Copy link

  • Some of your packages in your Imports seem to be used only in your Examples, Tests, and Vignettes. It might be better to move these to Suggests so downstream packages don't need to install them when installing {truchet} (such as when doing Continuous Integration testing). When used in Examples, Tests, Vignettes you'd need to guard their usage with requireNamespace() blocks (or add them to the VignetteBuilder field in DESCRIPTION)...
  • In particular, in the future if {truchet} is published to CRAN I may try to Import/Suggest {truchet} to make some {grid} graphics using sf::st_as_grob() and your {ggplot2} Imports seems to be a non-trivial dependency to download that doesn't seem to be an actual dependency for {truchet} but only used in its examples/vignettes...
@paezha
Copy link
Owner

paezha commented Feb 22, 2022

Thank you for this. I am relatively new at package development and was not sure about the package used in the articles/vignettes, but I think this has been resolved. Check the DESCRIPTION file.

@trevorld
Copy link
Author

Thanks!

If you put packages like {ggplot2} in VignetteBuilder you don't need a bunch of requireNamespace("ggplot") in your vignettes checking if {ggplot2} is available. (You always need {knitr} in there). CRAN has a test where they test your package without any Suggested packages installed...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants