Skip to content

Commit

Permalink
make routines public
Browse files Browse the repository at this point in the history
  • Loading branch information
romainfrancois committed Oct 26, 2023
1 parent 0f9d9ea commit 5336475
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion share/jupyter/kernels/xr/resources/routines.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ publish_stream <- function(name, text) {
}

display_data <- function(data = NULL, metadata = NULL) {
.Call("xeusr_display_data", jsonlite::toJSON(data), jsonlite::toJSON(metadata), PACKAGE = "(embedding)")
invisible(.Call("xeusr_display_data", jsonlite::toJSON(data), jsonlite::toJSON(metadata), PACKAGE = "(embedding)"))
}
3 changes: 2 additions & 1 deletion share/jupyter/kernels/xr/resources/setup.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ local({
"..", "share", "jupyter", "kernels", "xr", "resources"
)

files <- setdiff(list.files(here), "setup.R")
files <- setdiff(list.files(here), c("setup.R", "routines.R"))

xeus_env$.xeus_call <- function(fn, ...) {
get(fn, envir = xeus_private_env)(...)
Expand All @@ -26,5 +26,6 @@ local({
for (f in files) {
sys.source(file.path(here, f), envir = xeus_private_env)
}
sys.source(file.path(here, "routines.R"), envir = xeus_env)

})

0 comments on commit 5336475

Please sign in to comment.