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

Avoid having implicit imports. #23

Merged
merged 2 commits into from
Nov 7, 2024
Merged
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
10 changes: 5 additions & 5 deletions src/PlotlyKaleido.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module PlotlyKaleido

using JSON: JSON
using Base64
using Kaleido_jll
using Base64: Base64
using Kaleido_jll: Kaleido_jll

export savefig

Expand Down Expand Up @@ -75,8 +75,8 @@ function start(;
kwargs...,
)
is_running() && return
# The kaleido executable must be ran from the artifact directory
BIN = Cmd(kaleido(); dir = Kaleido_jll.artifact_dir)
# The kaleido executable must be run from the artifact directory
BIN = Cmd(Kaleido_jll.kaleido(); dir = Kaleido_jll.artifact_dir)
# We push the mandatory plotly flag
push!(BIN.exec, "plotly")
chromium_flags = ["--disable-gpu", Sys.isapple() ? "--single-process" : "--no-sandbox"]
Expand Down Expand Up @@ -170,7 +170,7 @@ If the process was killed due to an error during initialization, you will receiv
img = String(obj["result"])

# base64 decode if needed, otherwise transcode to vector of byte
bytes = format in TEXT_FORMATS ? transcode(UInt8, img) : base64decode(img)
bytes = format in TEXT_FORMATS ? transcode(UInt8, img) : Base64.base64decode(img)

write(io, bytes)
end
Expand Down
Loading