-
Notifications
You must be signed in to change notification settings - Fork 9
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
Create wrappers for all possible Github/local functions #153
Comments
There is 2015-12-08 13:48 GMT+01:00 Witold Chodor notifications@github.com:
|
@wchodor Ok let's create wrappers with the functionality as in |
We have a lot of work to do ahead of us :) |
Due to new behavior of loadFromRepo wrapper we are having 3 fails in tests: Testing archivist
Directory test1111 did not exist. Forced to create a new directory..Directory tmp_archivist did not exist. Forced to create a new directory.........12Directory tmp_archivist did not exist. Forced to create a new directory...Directory new_repo did not exist. Forced to create a new directory........3....Directory /tmp/RtmpDuqttx/file59b57a8bc9a did not exist. Forced to create a new directory.......Directory repository did not exist. Forced to create a new directory..Directory repository did not exist. Forced to create a new directory..Directory repository did not exist. Forced to create a new directory...Directory test1234 did not exist. Forced to create a new directory. adding: test1234/backpack.db (deflated 87%)
adding: test1234/gallery/ff575c261c949d073b2895b05d1097c3.rda (deflated 71%)
adding: test1234/gallery/ff575c261c949d073b2895b05d1097c3.txt (deflated 70%)
..
1. Error: aread downloads files ---------------------------------------------------------------------------------
repoDir and repo or user or branch or repoDirGit were used simultaneously. Remember
to use them separately!
1: withCallingHandlers(eval(code, new_test_environment), error = capture_calls, message = function(c) invokeRestart("muffleMessage"))
2: eval(code, new_test_environment)
3: eval(expr, envir, enclos)
4: aread("pbiecek/graphGallery/2166dfbd3a7a68a91a2f8e6df1a44111") at test_jss_artilce.R:2
5: loadFromRepo(md5hash = elements[length(elements)], repo = elements[2], repoDirGit = ifelse(length(elements) > 3, paste(elements[3:(length(elements) -
1)], collapse = "/"), FALSE), user = elements[1], value = TRUE) at /home/mkosinski/alink/archivist/R/aread.R:56
6: stop("repoDir and repo or user or branch or repoDirGit were used simultaneously. Remember\nto use them separately!") at /home/mkosinski/alink/archivist/R/loadFromRepo.R:370
2. Error: asearch works properly --------------------------------------------------------------------------------
repoDir and repo or user or branch or repoDirGit were used simultaneously. Remember
to use them separately!
1: withCallingHandlers(eval(code, new_test_environment), error = capture_calls, message = function(c) invokeRestart("muffleMessage"))
2: eval(code, new_test_environment)
3: eval(expr, envir, enclos)
4: asearch("pbiecek/graphGallery", patterns = c("class:lm", "coefname:Sepal.Length")) at test_jss_artilce.R:26
5: lapply(paste0(repo, "/", oblist), aread) at /home/mkosinski/alink/archivist/R/asearch.R:132
6: FUN(X[[i]], ...)
7: loadFromRepo(md5hash = elements[length(elements)], repo = elements[2], repoDirGit = ifelse(length(elements) > 3, paste(elements[3:(length(elements) -
1)], collapse = "/"), FALSE), user = elements[1], value = TRUE) at /home/mkosinski/alink/archivist/R/aread.R:56
8: stop("repoDir and repo or user or branch or repoDirGit were used simultaneously. Remember\nto use them separately!") at /home/mkosinski/alink/archivist/R/loadFromRepo.R:370
3. Error: object is properly serialized -------------------------------------------------------------------------
repoDir and repo or user or branch or repoDirGit were used simultaneously. Remember
to use them separately!
1: withCallingHandlers(eval(code, new_test_environment), error = capture_calls, message = function(c) invokeRestart("muffleMessage"))
2: eval(code, new_test_environment)
3: eval(expr, envir, enclos)
4: aread("pbiecek/graphGallery/2a6e492cb6982f230e48cf46023e2e4f") at test_jss_artilce.R:104
5: loadFromRepo(md5hash = elements[length(elements)], repo = elements[2], repoDirGit = ifelse(length(elements) > 3, paste(elements[3:(length(elements) -
1)], collapse = "/"), FALSE), user = elements[1], value = TRUE) at /home/mkosinski/alink/archivist/R/aread.R:56
6: stop("repoDir and repo or user or branch or repoDirGit were used simultaneously. Remember\nto use them separately!") at /home/mkosinski/alink/archivist/R/loadFromRepo.R:370 Could you pleas somehow rewrtie |
@pbiecek @wchodor Coming back to writing new functionalities/function that will work on object of class Since we are going to write wrappers, and are about to change Functions that use
Functions that use Repository
Functions that use md5hashes
We would have less documentation pages, all functionalities that works similiar will be in the same place and the vision ans usecases (and maybe tutorials) would be more compact. We could then leave functioalities for artifacts as they are now:
and we would have the main function What do you think about that? Note:
|
Or we can go further and create repository as Repo@show(...) -> showRepo
Repo@summary(...) -> summaryRepo
Repo@set(...) -> setRepo
Repo@Tags@add()
Repo@Tags@get()
Repo@Tags@split()
Repo@Tags@search
Repo@md5hash@load
Repo@md5hash@remove
Repo@md5hash@replace |
I think creating wrappers around all existing function qould require creating a new object's class which for practical reason should be of class S4 and could work as here #153 (comment) . |
Ok, I will do this with #189 |
No description provided.
The text was updated successfully, but these errors were encountered: