From 1ef9b128bb73b6ae12cb0df17e9f6a3799db62d2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Titas=20Bu=C4=8Delis?=
<66130422+Titas22@users.noreply.github.com>
Date: Fri, 17 Nov 2023 06:39:30 +0000
Subject: [PATCH 1/4] allow NaN/Inf values in JSON
---
src/PlotlyLight.jl | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/PlotlyLight.jl b/src/PlotlyLight.jl
index 35fbe19..e7a550b 100644
--- a/src/PlotlyLight.jl
+++ b/src/PlotlyLight.jl
@@ -76,7 +76,7 @@ function download_schema!()
end
function load_schema(force=false)
if force || !isassigned(schema)
- schema[] = JSON3.read(open(joinpath(scratch_dir[], "plotly-schema.json"), "r"), Config)
+ schema[] = JSON3.read(open(joinpath(scratch_dir[], "plotly-schema.json"), "r"), Config; allow_inf=true)
end
return schema[]
end
@@ -160,7 +160,7 @@ module Preset
export $f
function $f()
file = joinpath(templates_dir[], $(string(t)) * ".json")
- SETTINGS.layout.template = open(io -> JSON3.read(io, Config), file)
+ SETTINGS.layout.template = open(io -> JSON3.read(io, Config; allow_inf=true), file)
return SETTINGS
end
end
@@ -267,7 +267,7 @@ function Base.show(io::IO, M::MIME"text/html", o::Plot; setting::Settings = SETT
show(io, M, setting.load_plotlyjs())
show(io, M, setting.make_container(id))
print(io, "")
else
iframe = setting.iframe
From 300244e21120bba1ad811433a841951010c6c871 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Titas=20Bu=C4=8Delis?=
<66130422+Titas22@users.noreply.github.com>
Date: Fri, 24 Nov 2023 00:41:47 +0000
Subject: [PATCH 2/4] remove allow_inf=true from reading JSON
Only needed with `JSON3.write()`, otherwise get an error in tests
---
src/PlotlyLight.jl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/PlotlyLight.jl b/src/PlotlyLight.jl
index e7a550b..f5322c8 100644
--- a/src/PlotlyLight.jl
+++ b/src/PlotlyLight.jl
@@ -76,7 +76,7 @@ function download_schema!()
end
function load_schema(force=false)
if force || !isassigned(schema)
- schema[] = JSON3.read(open(joinpath(scratch_dir[], "plotly-schema.json"), "r"), Config; allow_inf=true)
+ schema[] = JSON3.read(open(joinpath(scratch_dir[], "plotly-schema.json"), "r"), Config;)
end
return schema[]
end
@@ -160,7 +160,7 @@ module Preset
export $f
function $f()
file = joinpath(templates_dir[], $(string(t)) * ".json")
- SETTINGS.layout.template = open(io -> JSON3.read(io, Config; allow_inf=true), file)
+ SETTINGS.layout.template = open(io -> JSON3.read(io, Config;), file)
return SETTINGS
end
end
From 4cfdbb63e5d95d141fd11fb2b79f812166236396 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Titas=20Bu=C4=8Delis?=
<66130422+Titas22@users.noreply.github.com>
Date: Fri, 24 Nov 2023 11:47:36 +0000
Subject: [PATCH 3/4] remove unnecessary semicolon
Co-authored-by: Josh Day
---
src/PlotlyLight.jl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PlotlyLight.jl b/src/PlotlyLight.jl
index f5322c8..5b76975 100644
--- a/src/PlotlyLight.jl
+++ b/src/PlotlyLight.jl
@@ -76,7 +76,7 @@ function download_schema!()
end
function load_schema(force=false)
if force || !isassigned(schema)
- schema[] = JSON3.read(open(joinpath(scratch_dir[], "plotly-schema.json"), "r"), Config;)
+ schema[] = JSON3.read(open(joinpath(scratch_dir[], "plotly-schema.json"), "r"), Config)
end
return schema[]
end
From fb119d5d1caa55ddf0f3602cb969063ad8cb3422 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Titas=20Bu=C4=8Delis?=
<66130422+Titas22@users.noreply.github.com>
Date: Fri, 24 Nov 2023 11:47:45 +0000
Subject: [PATCH 4/4] remove unnecessary semicolon
Co-authored-by: Josh Day
---
src/PlotlyLight.jl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PlotlyLight.jl b/src/PlotlyLight.jl
index 5b76975..741e97a 100644
--- a/src/PlotlyLight.jl
+++ b/src/PlotlyLight.jl
@@ -160,7 +160,7 @@ module Preset
export $f
function $f()
file = joinpath(templates_dir[], $(string(t)) * ".json")
- SETTINGS.layout.template = open(io -> JSON3.read(io, Config;), file)
+ SETTINGS.layout.template = open(io -> JSON3.read(io, Config), file)
return SETTINGS
end
end