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

fixing CI for pluto tutorials #174

Merged
merged 11 commits into from
May 27, 2022
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
86 changes: 22 additions & 64 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,67 +6,26 @@ using Documenter
using Pluto, PlutoStaticHTML
using Documenter: MathJax3

tutorial_menu = Array{Pair{String,String},1}()
pluto_src_folder = joinpath(@__DIR__, "src", "tutorials")

#
# Generate Pluto Tutorial HTMLs
"""
build()

# pluto_src_folder = joinpath(@__DIR__, "src", "tutorials")
# pluto_output_folder = joinpath(@__DIR__, "src", "tutorials")
# pluto_relative_path = "tutorials/"
# mkpath(pluto_output_folder)
Run all Pluto notebooks (".jl" files) in `NOTEBOOK_DIR`.
"""
function build()
println("Building notebooks")
hopts = HTMLOptions(; append_build_context=false)
output_format = documenter_output
bopts = BuildOptions(pluto_src_folder; output_format)
build_notebooks(bopts, hopts)
return nothing
end

# """
# build()
# Run all Pluto notebooks (".jl" files) in `NOTEBOOK_DIR`.
# """
# function build()
# println("Building notebooks")
# hopts = HTMLOptions(; append_build_context=true)
# output_format = documenter_output
# bopts = BuildOptions(pluto_src_folder; output_format)
# build_notebooks(bopts, hopts)
# return nothing
# end

# # Build the notebooks; defaults to true.
# if get(ENV, "BUILD_DOCS_NOTEBOOKS", "true") == "true"
# build()
# end

# # Please do not use the same name as for a(n old) literate Tutorial
# pluto_files = [
# "gnn_intro_pluto",
# "graph_classification_pluto",
# ]
# pluto_titles = [
# "Intro to Graph Neural Networks ",
# "Graph Classification",
# ]

# # build menu and write files myself - tp set edit url correctly.
# for (title, file) in zip(pluto_titles, pluto_files)
# global tutorial_menu
# rendered = build_notebooks( #though not really parallel here
# BuildOptions(
# pluto_src_folder;
# output_format=documenter_output,
# write_files=false,
# use_distributed=false,
# ),
# ["$(file).jl"],
# )
# write(
# joinpath(pluto_output_folder, file * ".md"),
# """
# ```@meta
# EditURL = "$(joinpath(pluto_src_folder, file * ".jl"))"
# ```
# $(rendered[1])
# """,
# )
# push!(tutorial_menu, title => joinpath(pluto_relative_path, file * ".md"))
# end
# Build the notebooks; defaults to true.
if get(ENV, "BUILD_DOCS_NOTEBOOKS", "true") == "true"
build()
end

DocMeta.setdocmeta!(GraphNeuralNetworks, :DocTestSetup,
:(using GraphNeuralNetworks, Graphs, SparseArrays, NNlib, Flux);
Expand All @@ -86,12 +45,11 @@ makedocs(;
"Message Passing" => "messagepassing.md",
"Model Building" => "models.md",
"Datasets" => "datasets.md",
# "Tutorials" => tutorial_menu,
# "Tutorials" =>
# [
# "Intro to Graph Neural Networks" => "gnn_intro_pluto.md",
# "Graph Classification" => "graph_classification_pluto.md",
# ],
"Tutorials" =>
[
"Intro to Graph Neural Networks" => "tutorials/gnn_intro_pluto.md",
"Graph Classification" => "tutorials/graph_classification_pluto.md",
],
"API Reference" =>
[
"GNNGraph" => "api/gnngraph.md",
Expand Down
Loading