Finally got some time to work in this
and here is a little update about this.
As @fonsp said, I have been trying to fix it and running test PlutoSliderServer
. Mainly I have adding joinpath(...)
in the run tests so they are compatible with Windows.
Right now I am stuck in some errors of the test
s.
The first one is in static_export.jl
: “static - Index HTML and JSON - fancy=false” , it looks for the a notebook path in the JSON file pluto_export.json
. I believe is about escaping the \
when JSON file is made.
Test Failed:
static - Index HTML and JSON – fancy=false: Test Failed at C:\Users\EV\.julia\dev\PlutoSliderServer\test\static export.jl:252
Expression: occursin(p, jsonstr)
Evaluated: occursin("subdir\\c.plutojl", "{\"notebooks\":{\"b.pluto.jl\":{\"id\":\"b.pluto.jl\",\"hash\":\"xuMH18BT9LlXOVZa1gKokIr65kzVGewh5bWfCAfL90I\",\"html_path\":\"b.html\",\"statefile_path\":\"b.plutostate\",\"notebookfile_path\":null,\"current_hash\":\"xuMH18BT9LlXOVZa1gKokIr65kzVGewh5bWfCAfL90I\",\"desired_hash\":\"xuMH18BT9LlXOVZa1gKokIr65kzVGewh5bWfCAfL90I\",\"frontmatter\":{\"title\":\"b\"}},\"a.jl\":{\"id\":\"a.jl\",\"hash\":\"_huF1Zv0MKEBI3H0EnYIe0jbxZKzsWarNzg-JL4zt9k\",\"html_path\":\"a.html\",\"statefile_path\":\"a.plutostate\",\"notebookfile_path\":null,\"current_hash\":\"_huF1Zv0MKEBI3H0EnYIe0jbxZKzsWarNzg-JL4zt9k\",\"desired_hash\":\"_huF1Zv0MKEBI3H0EnYIe0jbxZKzsWarNzg-JL4zt9k\",\"frontmatter\":{\"author_url\":\"https://github.com/JuliaPluto\",\"image\":\"https://upload.wikimedia.org/wikipedia/commons/9/99/Unofficial_JavaScript_logo_2.svg\",\"title\":\"My<Title\",\"tags\":[\"aaa\",\"bbb\"],\"author_name\":\"Pluto.jl\",\"description\":\"ccc\",\"license\":\"Unlicense\"}},\"subdir\\\\c.plutojl\":{\"id\":\"subdir\\\\c.plutojl\",\"hash\":\"xuMH18BT9LlXOVZa1gKokIr65kzVGewh5bWfCAfL90I\",\"html_path\":\"subdir\\\\c.html\",\"statefile_path\":\"subdir\\\\c.plutostate\",\"notebookfile_path\":null,\"current_hash\":\"xuMH18BT9LlXOVZa1gKokIr65kzVGewh5bWfCAfL90I\",\"desired_hash\":\"xuMH18BT9LlXOVZa1gKokIr65kzVGewh5bWfCAfL90I\",\"frontmatter\":{\"title\":\"c\"}}},\"pluto_version\":\"0.20.8\",\"julia_version\":\"1.11.5\",\"format_version\":\"1\",\"title\":null,\"description\":null,\"collections\":null,\"binder_url\":\"https://mybinder.org/v2/gh/fonsp/pluto-on-binder/v0.20.8\",\"slider_server_url\":\"krat\"}")
pluto_export.json
:
{
"notebooks":{
"b.pluto.jl":{
"id":"b.pluto.jl",
"hash":"xuMH18BT9LlXOVZa1gKokIr65kzVGewh5bWfCAfL90I",
"html_path":"b.html","statefile_path":"b.plutostate",
"notebookfile_path":null,
"current_hash":"xuMH18BT9LlXOVZa1gKokIr65kzVGewh5bWfCAfL90I",
"desired_hash":"xuMH18BT9LlXOVZa1gKokIr65kzVGewh5bWfCAfL90I",
"frontmatter":{"title":"b"}
},
"a.jl":{
"id":"a.jl",
"hash":"_huF1Zv0MKEBI3H0EnYIe0jbxZKzsWarNzg-JL4zt9k",
"html_path":"a.html",
"statefile_path":"a.plutostate",
"notebookfile_path":null,
"current_hash":"_huF1Zv0MKEBI3H0EnYIe0jbxZKzsWarNzg-JL4zt9k",
"desired_hash":"_huF1Zv0MKEBI3H0EnYIe0jbxZKzsWarNzg-JL4zt9k",
"frontmatter":{
"author_url":"https://github.com/JuliaPluto",
"image":"https://upload.wikimedia.org/wikipedia/commons/9/99/Unofficial_JavaScript_logo_2.svg",
"title":"My<Title",
"tags":["aaa","bbb"],
"author_name":"Pluto.jl",
"description":"ccc",
"license":"Unlicense"
}
},
"subdir\\c.plutojl":{
"id":"subdir\\c.plutojl",
"hash":"xuMH18BT9LlXOVZa1gKokIr65kzVGewh5bWfCAfL90I",
"html_path":"subdir\\c.html",
"statefile_path":"subdir\\c.plutostate",
"notebookfile_path":null,
"current_hash":"xuMH18BT9LlXOVZa1gKokIr65kzVGewh5bWfCAfL90I",
"desired_hash":"xuMH18BT9LlXOVZa1gKokIr65kzVGewh5bWfCAfL90I",
"frontmatter":{"title":"c"}
}
},
"pluto_version":"0.20.8",
"julia_version":"1.11.5",
"format_version":"1",
"title":null,
"description":null,
"collections":null,
"binder_url":"https://mybinder.org/v2/gh/fonsp/pluto-on-binder/v0.20.8",
"slider_server_url":"krat"
}
Another error in /HTTP requests.jl
: “HTTP requests: static”.
HTTP requests: static: Error During Test at C:\Users\EV\.julia\dev\PlutoSliderServer\test\HTTP requests.jl:190
Test threw exception
Expression: s_export_only.run isa PlutoSliderServer.var"../Types.jl".FinishedNotebook
UndefVarError: `../Types.jl` not defined in `PlutoSliderServer`
Suggestion: check for spelling errors or missing imports.
Stacktrace:
[1] getproperty(x::Module, f::Symbol)
@ Base .\Base.jl:42
[2] macro expansion
@ C:\Users\EV\.julia\juliaup\julia-1.11.5+0.x64.w64.mingw32\share\julia\stdlib\v1.11\Test\src\Test.jl:676 [inlined]
[3] macro expansion
@ C:\Users\EV\.julia\dev\PlutoSliderServer\test\HTTP requests.jl:190 [inlined]
[4] macro expansion
@ C:\Users\EV\.julia\juliaup\julia-1.11.5+0.x64.w64.mingw32\share\julia\stdlib\v1.11\Test\src\Test.jl:1704 [inlined]
[5] top-level scope
@ C:\Users\EV\.julia\dev\PlutoSliderServer\test\HTTP requests.jl:136
┌ Info: Request hash not found. See error hint in my source code.
└ notebook_hash = "ungWv48Bz-pBQUDeXa4iI7ADYaOWF3qctBD_YfIAFa0"
response.headers = Pair{SubString{String}, SubString{String}}["Content-Type" => "text/html; charset=utf-8", "Content-Length" => "574", "Access-Control-Allow-Origin" => "*", "Cache-Control" => "no-store, no-cache", "Referrer-Policy" => "origin-when-cross-origin"]
response.headers = Pair{SubString{String}, SubString{String}}["Content-Type" => "application/json; charset=utf-8", "Access-Control-Allow-Origin" => "*", "Cache-Control" => "no-store, no-cache", "Referrer-Policy" => "origin-when-cross-origin", "Transfer-Encoding" => "chunked"]
response.headers = Pair{SubString{String}, SubString{String}}["Content-Type" => "text/html; charset=utf-8", "Content-Length" => "5246", "Access-Control-Allow-Origin" => "*", "Referrer-Policy" => "origin-when-cross-origin"]
response.headers = Pair{SubString{String}, SubString{String}}["Content-Type" => "text/julia; charset=utf-8", "Content-Length" => "518", "Access-Control-Allow-Origin" => "*", "Referrer-Policy" => "origin-when-cross-origin"]
response.headers = Pair{SubString{String}, SubString{String}}["Content-Type" => "application/octet-stream", "Content-Length" => "1993", "Access-Control-Allow-Origin" => "*", "Referrer-Policy" => "origin-when-cross-origin"]
response.headers = Pair{SubString{String}, SubString{String}}["Content-Type" => "text/html; charset=utf-8", "Content-Length" => "4873", "Access-Control-Allow-Origin" => "*", "Referrer-Policy" => "origin-when-cross-origin"]
response.headers = Pair{SubString{String}, SubString{String}}["Content-Type" => "text/julia; charset=utf-8", "Content-Length" => "218", "Access-Control-Allow-Origin" => "*", "Referrer-Policy" => "origin-when-cross-origin"]
response.headers = Pair{SubString{String}, SubString{String}}["Content-Type" => "application/octet-stream", "Content-Length" => "1780", "Access-Control-Allow-Origin" => "*", "Referrer-Policy" => "origin-when-cross-origin"]
response.headers = Pair{SubString{String}, SubString{String}}["Content-Type" => "text/html; charset=utf-8", "Content-Length" => "4873", "Access-Control-Allow-Origin" => "*", "Referrer-Policy" => "origin-when-cross-origin"]
response.headers = Pair{SubString{String}, SubString{String}}["Content-Type" => "application/octet-stream", "Content-Length" => "218", "Access-Control-Allow-Origin" => "*", "Referrer-Policy" => "origin-when-cross-origin"]
response.headers = Pair{SubString{String}, SubString{String}}["Content-Type" => "application/octet-stream", "Content-Length" => "1780", "Access-Control-Allow-Origin" => "*", "Referrer-Policy" => "origin-when-cross-origin"]
[ Info: Server on 127.0.0.1:23664 closing
[ Info: DONEZO
Test Summary: | Pass Error Total Time
HTTP requests: static | 48 1 49 11.8s
Static asset - | 3 3 0.4s
Static asset - pluto_export.json | 3 3 0.0s
Static asset - a.html | 5 5 0.0s
Static asset - a.jl | 4 4 0.0s
Static asset - a.plutostate | 4 4 0.0s
Static asset - b.html | 5 5 0.0s
Static asset - b.pluto.jl | 4 4 0.0s
Static asset - b.plutostate | 4 4 0.0s
Static asset - subdir\c.html | 5 5 0.0s
Static asset - subdir\c.plutojl | 4 4 0.0s
Static asset - subdir\c.plutostate | 4 4 0.0s
ERROR: LoadError: Some tests did not pass: 48 passed, 0 failed, 1 errored, 0 broken.
in expression starting at C:\Users\EV\.julia\dev\PlutoSliderServer\test\HTTP requests.jl:135
in expression starting at C:\Users\EV\.julia\dev\PlutoSliderServer\test\runtests.jl:14
ERROR: Package PlutoSliderServer errored during testing
It would be really helpful some guidance on how I can fix it. I am trying to understand how the package PlutoSliderServer.jl
works.
Thanks a lot for the help.