Skip to content

Commit

Permalink
fixing CI for pluto tutorials (#174)
Browse files Browse the repository at this point in the history
* fix pluto ci

* fix

* cleanup

* cleanup

* cleanup

* use Pkg.activate

* datadeps always accept

* aaa

* please work

* cleanup

* cleanup
  • Loading branch information
CarloLucibello authored May 27, 2022
1 parent 702cdc1 commit cdfb380
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 2,866 deletions.
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

0 comments on commit cdfb380

Please sign in to comment.