{"action":"created","issue":{"url":"https://api.github.com/repos/pbiecek/archivist/issues/77","labels_url":"https://api.github.com/repos/pbiecek/archivist/issues/77/labels{/name}","comments_url":"https://api.github.com/repos/pbiecek/archivist/issues/77/comments","events_url":"https://api.github.com/repos/pbiecek/archivist/issues/77/events","html_url":"https://github.com/pbiecek/archivist/issues/77","id":103959481,"number":77,"title":"Dependencies in archivist","user":{"login":"MarcinKosinski","id":6773454,"avatar_url":"https://avatars.githubusercontent.com/u/6773454?v=3","gravatar_id":"","url":"https://api.github.com/users/MarcinKosinski","html_url":"https://github.com/MarcinKosinski","followers_url":"https://api.github.com/users/MarcinKosinski/followers","following_url":"https://api.github.com/users/MarcinKosinski/following{/other_user}","gists_url":"https://api.github.com/users/MarcinKosinski/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcinKosinski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcinKosinski/subscriptions","organizations_url":"https://api.github.com/users/MarcinKosinski/orgs","repos_url":"https://api.github.com/users/MarcinKosinski/repos","events_url":"https://api.github.com/users/MarcinKosinski/events{/privacy}","received_events_url":"https://api.github.com/users/MarcinKosinski/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pbiecek/archivist/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/pbiecek/archivist/labels/important","name":"important","color":"5319e7"},{"url":"https://api.github.com/repos/pbiecek/archivist/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-30T22:29:43Z","updated_at":"2015-08-30T22:46:13Z","closed_at":null,"body":"So far archivist have 4 packages in `Depends` section.\r\n\r\n-    `RSQLite`,\r\n-   `DBI`,\r\n-    `shiny`,\r\n-    `lubridate`.\r\n\r\nOne can see that `RSQLite` has `DBI` package in dependencies [https://cran.r-project.org/web/packages/RSQLite/index.html](https://cran.r-project.org/web/packages/RSQLite/index.html) so we might remove `DBI` from `Depends` section. What is more, I think we only use one function from `lubridate` package - `now()`, so maybe we should change `@import lubridate` to `@importFrom lubridate now` in the `[archivist-package.R file](https://github.com/pbiecek/archivist/blob/master/R/archivist-package.R)`. Then archivist would only depend on `RSQLite` and `shiny`. Functions from `shiny` package are only used in `shinySearch...` function - so maybe we should move `shiny` from `Depends` to `Suggets` like it is done in `rvest` package for [`guess_encdoing`](https://github.com/hadley/rvest/blob/master/R/encoding.R) function where there is a sentence at the beginning of the function's declaration\r\n````{Ruby}\r\nguess_encoding <- function(x) {\r\n  if (!requireNamespace(\"stringi\", quietly = TRUE)) {\r\n    stop(\"stringi package required for encoding operations\")\r\n  }\r\n````\r\n\r\n`guess_encdoing` function in somehow treated as an extra functionality to base functions from `rvest` package and there even is a sentence in this function's manual\r\n\r\n>\r\n> #' @section stringi:\r\n> #'\r\n> #' These function are wrappers around tools from the fantastic stringi\r\n> #' package, so you'll need to make sure to have that installed.\r\n>\r\n\r\nso maybe we should treat `shinySearch...` also as an extra function and move it to the `Suggests` section.\r\n\r\n\r\nFinally in the [`archivist-package.R` file](https://github.com/pbiecek/archivist/blob/master/R/archivist-package.R) there is specified\r\n\r\n````{Ruby}\r\n#' @import RCurl\r\n#' @import httr\r\n#' @import RSQLite\r\n#' @import DBI\r\n#' @import shiny\r\n#' @import lubridate\r\n#' @import digest\r\n#' @importFrom utils head\r\n#' @importFrom utils zip\r\n#' @importFrom grDevices png\r\n#' @importFrom grDevices dev.off\r\n#' @importFrom graphics plot\r\n#' @importFrom graphics par\r\n#' @importFrom graphics barplot\r\n#' @importFrom graphics par\r\n````\r\n\r\nI think that\r\n\r\n- from `RCurl` we only use `getBinaryURL` function. Maybe should change to `@imporFrom RCurl getBinaryURL`.\r\n- from `digest` we only use `digest` function. Maybe should change to `@imporFrom digest digest`.\r\n- we do not have to import from `graphics` package as it is provided with `base` package. I suggest to remove `import From graphics *` lines\r\n- the same with imports from `utils` and `grDevices` as for the `graphics`\r\n\r\n\r\nLastly:\r\n\r\n- Dependencies on RSQLite:  might be replaced with (mostly used in [`createEmpyRepo()`](https://github.com/pbiecek/archivist/blob/master/R/createEmptyRepo.R) function and in `zzz.R` file)\r\n\r\n- @importFrom RSQLite dbWriteTable\r\n- @importFrom RSQLite dbGetQuery\r\n- @importFrom RSQLite dbDisconnect\r\n- @importFrom RSQLite dbConnect\r\n- @importFrom RSQLite dbReadTable\r\n- @importFrom RSQLite dbDriver\r\n\r\nWhat's even funnier? Than all those functions come from `DBI` package. So maybe we should remove `RSQLite` from `DESCRIPTION` file and only move `DBI` to `Imports`.\r\n\r\nWhen I first tried to organize Dependencies I wasn't so aware of package dependencies as I am today. What do you think about that?"},"comment":{"url":"https://api.github.com/repos/pbiecek/archivist/issues/comments/136211907","html_url":"https://github.com/pbiecek/archivist/issues/77#issuecomment-136211907","issue_url":"https://api.github.com/repos/pbiecek/archivist/issues/77","id":136211907,"user":{"login":"MarcinKosinski","id":6773454,"avatar_url":"https://avatars.githubusercontent.com/u/6773454?v=3","gravatar_id":"","url":"https://api.github.com/users/MarcinKosinski","html_url":"https://github.com/MarcinKosinski","followers_url":"https://api.github.com/users/MarcinKosinski/followers","following_url":"https://api.github.com/users/MarcinKosinski/following{/other_user}","gists_url":"https://api.github.com/users/MarcinKosinski/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcinKosinski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcinKosinski/subscriptions","organizations_url":"https://api.github.com/users/MarcinKosinski/orgs","repos_url":"https://api.github.com/users/MarcinKosinski/repos","events_url":"https://api.github.com/users/MarcinKosinski/events{/privacy}","received_events_url":"https://api.github.com/users/MarcinKosinski/received_events","type":"User","site_admin":false},"created_at":"2015-08-30T22:46:13Z","updated_at":"2015-08-30T22:46:13Z","body":"I may work on it on my own fork and then apply a pull request when it'll be ready and working.\r\nI think it's a good time and situation to create some functions' tests or maybe `travis` is enough?"}}