-
Notifications
You must be signed in to change notification settings - Fork 97
Branch for testing DemoCards.jl #256
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@johnnychen94 I got around to give DemoCards.jl a go.
This is a mostly working version for GR alone, the titles look funny sometimes. Like Open/High/Low/Close
It would be nice to have different backends as tabs.
Backends
Create a preview via rm("docs/gallery/generated", recursive = true); generate_cards(BACKEND); preview_demos("docs/gallery")to get titles for empty cards you'd need (JuliaDocs/DemoCards.jl#103) rm("docs/gallery/generated", recursive = true); generate_cards(BACKEND); preview_demos("docs/gallery"); preview_demos("docs/gallery")where |
|
I'm glad that you have worked it out a few backends. Sorry it's near the end of this semester and I can't comment much right now; I'll continue the work on DemoCards in Jan. |
|
This works now somewhat, but somehow all card links give a |
* generate demo page per backend Instead of generating all backend demos in one demo page, this commit generates one page per backend. This makes exploring the demos easier. - entry "id" is added to resolve the url-link issue - notebook generation is disabled - attributes are generated as hidden page * Update PlotDocs.jl Co-authored-by: Simon Christ <SimonChrist@gmx.de>
|
@johnnychen94 if I run ERROR: IOError: readdir("~/.julia/dev/PlotDocs.jl/docs/src/democards"): no such file or directory (ENOENT)
Stacktrace:
[1] uv_error
@ ./libuv.jl:97 [inlined]
[2] readdir(dir::String; join::Bool, sort::Bool)
@ Base.Filesystem ./file.jl:851
[3] readdir
@ ./file.jl:846 [inlined]
[4] (::DemoCards.var"#107#111"{String, String, String, String, String, String, String, Vector{String}})()
@ DemoCards ~/.julia/packages/DemoCards/w8V2k/src/generate.jl:214
[5] (::var"#5#6")(cb::DemoCards.var"#107#111"{String, String, String, String, String, String, String, Vector{String}})
@ Main ~/.julia/dev/PlotDocs.jl/docs/make.jl:103
[6] foreach(f::var"#5#6", itr::Vector{Any})
@ Base ./abstractarray.jl:2694
[7] top-level scope
@ ~/.julia/dev/PlotDocs.jl/docs/make.jl:101 |
|
This might due to the fact that all demo files are generated from another function foreach(galleries_cb) do cb
# URL redirection for DemoCards-generated gallery
cb()
endThe callbacks are currently specific to redirect the URL of "Edit on Github" button. A workaround is to not use the generated callbacks and manually remove this button in the generated HTML files. |
|
preview is up again: https://docs.juliaplots.org/previews/PR256/ |
|
Also I have trouble getting that custom stylesheet working, it always complains about having an absolute path, though I did specify a relative path |
johnnychen94
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get, why I get the titles for skipped examples for GR but not for the other backends.
Would you mind pointing me to which case is broken? I'm not sure what is expected and what is not.
Co-authored-by: Johnny Chen <johnnychen94@hotmail.com>
* use default order for demos By default DemoCards sort the demos by their filenames. * wrap source cards generation using IOBuffer For unknown reasons, the generated files are still empty when calling `makedemos` unless we wrap the `jl` file with IOBuffer. * correct backend name titlecase * try bulmagrid theme * add a few DemoCards comments * use empty card description * debug: try to sleep a while after each demo generation * restore order Co-authored-by: Simon Christ <SimonChrist@gmx.de>
|
It seems I kinda broke github |
Yes it |
|
It seems everything works now. From a user's perspective, I still dislike the empty cards; it feels like something is broken. |
That's actually the point. To show what is working on which backend and what is not. This lets you quickly evaluate the expectation about the functionality of a backend by scrolling through the galllery. |
Also changes CI from travis to gh-actions