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

Add missing Random import #211

Merged
merged 2 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/QuartoNotebookWorker/src/QuartoNotebookWorker.jl
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ import InteractiveUtils
import Logging
import Pkg
import REPL
import Random

# Includes.

Expand Down
17 changes: 17 additions & 0 deletions test/examples/integrations/RCallSVG.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: RCall integration
fig-width: 4
fig-height: 3
fig-dpi: 150
fig-format: svg
julia:
exeflags: ["--project=RCall"]
---

```{julia}
using RCall
```

```{julia}
R"plot(1:10)"
```
12 changes: 12 additions & 0 deletions test/testsets/integrations/RCall.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,15 @@ test_example(joinpath(@__DIR__, "../../examples/integrations/RCall.qmd")) do jso
@test cell["outputs"][1]["metadata"]["image/png"] ==
Dict("width" => 600, "height" => 450)
end

# Don't run this on macOS CI, since that appears to be missing the required libs.
if !(get(ENV, "CI", "false") == "true" && Sys.isapple())
test_example(joinpath(@__DIR__, "../../examples/integrations/RCallSVG.qmd")) do json
cells = json["cells"]
cell = cells[4]
output = cell["outputs"][1]

@test !isempty(output["data"]["image/svg+xml"])
@test isempty(cell["outputs"][1]["metadata"])
end
end
Loading