thackl / gggenomes

A grammar of graphics for comparative genomics
https://thackl.github.io/gggenomes/
Other
579 stars 64 forks source link

Move deps from Depends to Imports? #142

Closed lionel- closed 10 months ago

lionel- commented 1 year ago

Hello. I noticed that all your dependencies are in the Depends: section of your DESCRIPTION file. This unnecessarily causes all the dependencies to be attached to the search path after a library(gggenomes). By convention, dependencies should be in Imports: unless necessary (sometimes ggplot2 is added to Depends). See https://r-pkgs.org/dependencies-mindset-background.html#sec-dependencies-imports-vs-depends for more about this.

thackl commented 1 year ago

Hi Lionel, yes you are of course right! I think this is related to me not having done a proper job using ::, importFrom, etc. when I started to dabble in writing R packages. I need do a proper code-clean up soon!

thackl commented 10 months ago

Note to self - the move itself is super easy, literally move packages to Imports: and add #' @import to files for roxygen to put it in NAMESPACE. However, that still leaves things messy. Check out library(conflicted) to make calls to functions from other packages explicit.