Skip to content

Commit cdfb380

Browse files
fixing CI for pluto tutorials (#174)
* fix pluto ci * fix * cleanup * cleanup * cleanup * use Pkg.activate * datadeps always accept * aaa * please work * cleanup * cleanup
1 parent 702cdc1 commit cdfb380

File tree

5 files changed

+85
-2866
lines changed

5 files changed

+85
-2866
lines changed

docs/make.jl

Lines changed: 22 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -6,67 +6,26 @@ using Documenter
66
using Pluto, PlutoStaticHTML
77
using Documenter: MathJax3
88

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

11-
#
12-
# Generate Pluto Tutorial HTMLs
11+
"""
12+
build()
1313
14-
# pluto_src_folder = joinpath(@__DIR__, "src", "tutorials")
15-
# pluto_output_folder = joinpath(@__DIR__, "src", "tutorials")
16-
# pluto_relative_path = "tutorials/"
17-
# mkpath(pluto_output_folder)
14+
Run all Pluto notebooks (".jl" files) in `NOTEBOOK_DIR`.
15+
"""
16+
function build()
17+
println("Building notebooks")
18+
hopts = HTMLOptions(; append_build_context=false)
19+
output_format = documenter_output
20+
bopts = BuildOptions(pluto_src_folder; output_format)
21+
build_notebooks(bopts, hopts)
22+
return nothing
23+
end
1824

19-
# """
20-
# build()
21-
# Run all Pluto notebooks (".jl" files) in `NOTEBOOK_DIR`.
22-
# """
23-
# function build()
24-
# println("Building notebooks")
25-
# hopts = HTMLOptions(; append_build_context=true)
26-
# output_format = documenter_output
27-
# bopts = BuildOptions(pluto_src_folder; output_format)
28-
# build_notebooks(bopts, hopts)
29-
# return nothing
30-
# end
31-
32-
# # Build the notebooks; defaults to true.
33-
# if get(ENV, "BUILD_DOCS_NOTEBOOKS", "true") == "true"
34-
# build()
35-
# end
36-
37-
# # Please do not use the same name as for a(n old) literate Tutorial
38-
# pluto_files = [
39-
# "gnn_intro_pluto",
40-
# "graph_classification_pluto",
41-
# ]
42-
# pluto_titles = [
43-
# "Intro to Graph Neural Networks ",
44-
# "Graph Classification",
45-
# ]
46-
47-
# # build menu and write files myself - tp set edit url correctly.
48-
# for (title, file) in zip(pluto_titles, pluto_files)
49-
# global tutorial_menu
50-
# rendered = build_notebooks( #though not really parallel here
51-
# BuildOptions(
52-
# pluto_src_folder;
53-
# output_format=documenter_output,
54-
# write_files=false,
55-
# use_distributed=false,
56-
# ),
57-
# ["$(file).jl"],
58-
# )
59-
# write(
60-
# joinpath(pluto_output_folder, file * ".md"),
61-
# """
62-
# ```@meta
63-
# EditURL = "$(joinpath(pluto_src_folder, file * ".jl"))"
64-
# ```
65-
# $(rendered[1])
66-
# """,
67-
# )
68-
# push!(tutorial_menu, title => joinpath(pluto_relative_path, file * ".md"))
69-
# end
25+
# Build the notebooks; defaults to true.
26+
if get(ENV, "BUILD_DOCS_NOTEBOOKS", "true") == "true"
27+
build()
28+
end
7029

7130
DocMeta.setdocmeta!(GraphNeuralNetworks, :DocTestSetup,
7231
:(using GraphNeuralNetworks, Graphs, SparseArrays, NNlib, Flux);
@@ -86,12 +45,11 @@ makedocs(;
8645
"Message Passing" => "messagepassing.md",
8746
"Model Building" => "models.md",
8847
"Datasets" => "datasets.md",
89-
# "Tutorials" => tutorial_menu,
90-
# "Tutorials" =>
91-
# [
92-
# "Intro to Graph Neural Networks" => "gnn_intro_pluto.md",
93-
# "Graph Classification" => "graph_classification_pluto.md",
94-
# ],
48+
"Tutorials" =>
49+
[
50+
"Intro to Graph Neural Networks" => "tutorials/gnn_intro_pluto.md",
51+
"Graph Classification" => "tutorials/graph_classification_pluto.md",
52+
],
9553
"API Reference" =>
9654
[
9755
"GNNGraph" => "api/gnngraph.md",

0 commit comments

Comments
 (0)