Skip to content

Commit

Permalink
simplify documentation (#531)
Browse files Browse the repository at this point in the history
  • Loading branch information
CarloLucibello authored Dec 1, 2024
1 parent 864c5ec commit 065ec3f
Show file tree
Hide file tree
Showing 24 changed files with 190 additions and 173 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_GNNGraphs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
Pkg.test("GNNGraphs"; coverage=true)
- uses: julia-actions/julia-processcoverage@v1
with:
directories: ./GNNGraphs/src
directories: GNNGraphs/src,GNNGraphs/ext
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test_GNNLux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ jobs:
Pkg.test("GNNLux"; coverage=true)
- uses: julia-actions/julia-processcoverage@v1
with:
# directories: ./GNNLux/src, ./GNNLux/ext
directories: ./GNNLux/src
directories: GNNLux/src,GNNGraphs/src,GNNGraphs/ext,GNNlib/src,GNNlib/ext
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_GNNlib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
Pkg.test("GNNlib"; coverage=true)
- uses: julia-actions/julia-processcoverage@v1
with:
directories: ./GNNlib/src ./GNNGraphs/src
directories: GNNlib/src,GNNlib/ext,GNNGraphs/src,GNNGraphs/ext
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_GraphNeuralNetworks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
Pkg.test("GraphNeuralNetworks"; coverage=true)
- uses: julia-actions/julia-processcoverage@v1
with:
directories: ./GraphNeuralNetworks/src ./GNNGraphs/src ./GNNlib/src
directories: GraphNeuralNetworks/src,GNNGraphs/src,GNNGraphs/ext,GNNlib/src,GNNlib/ext
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ GNNGraphs/docs/build
GNNlib/docs/build
GNNLux/docs/build
GraphNeuralNetworks/docs/build
tutorials/docs/build
GraphNeuralNetworks/docs/src/other
tutorials/docs/build
6 changes: 4 additions & 2 deletions GNNGraphs/docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ makedocs(;
format = Documenter.HTML(; mathengine, prettyurls, assets = assets, size_threshold=nothing),
sitename = "GNNGraphs.jl",
pages = ["Home" => "index.md",
"Graphs" => ["gnngraph.md", "heterograph.md", "temporalgraph.md"],
"Datasets" => "datasets.md",
"Guides" => [
"Graphs" => ["guides/gnngraph.md", "guides/heterograph.md", "guides/temporalgraph.md"],
"Datasets" => "guides/datasets.md",
],
"API Reference" => [
"GNNGraph" => "api/gnngraph.md",
"GNNHeteroGraph" => "api/heterograph.md",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion GNNlib/docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ makedocs(;
format = Documenter.HTML(; mathengine, prettyurls, assets = assets, size_threshold=nothing),
sitename = "GNNlib.jl",
pages = ["Home" => "index.md",
"Message Passing" => "messagepassing.md",
"Message Passing" => "guides/messagepassing.md",

"API Reference" => [

Expand Down
File renamed without changes.
10 changes: 3 additions & 7 deletions GNNlib/test/msgpass.jl
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,7 @@ end

@testset "copy_xj +" begin
for g in TEST_GRAPHS
dev = gpu_device(force=true)
broken = get_graph_type(g) == :sparse && dev isa AMDGPUDevice
broken = get_graph_type(g) == :sparse && gpu_backend() == "AMDGPU"
f(g, x) = propagate(copy_xj, g, +, xj = x)
@test test_gradients(
f, g, g.x; test_gpu=true, test_grad_f=false, compare_finite_diff=false
Expand All @@ -179,8 +178,7 @@ end

@testset "copy_xj mean" begin
for g in TEST_GRAPHS
dev = gpu_device(force=true)
broken = get_graph_type(g) == :sparse && dev isa AMDGPUDevice
broken = get_graph_type(g) == :sparse && gpu_backend() == "AMDGPU"
f(g, x) = propagate(copy_xj, g, mean, xj = x)
@test test_gradients(
f, g, g.x; test_gpu=true, test_grad_f=false, compare_finite_diff=false
Expand All @@ -190,8 +188,7 @@ end

@testset "e_mul_xj +" begin
for g in TEST_GRAPHS
dev = gpu_device(force=true)
broken = get_graph_type(g) == :sparse && dev isa AMDGPUDevice
broken = get_graph_type(g) == :sparse && gpu_backend() == "AMDGPU"
e = rand(Float32, size(g.x, 1), g.num_edges)
f(g, x, e) = propagate(e_mul_xj, g, +; xj = x, e)
@test test_gradients(
Expand All @@ -207,7 +204,6 @@ end
g = set_edge_weight(g, w)
return propagate(w_mul_xj, g, +, xj = x)
end
dev = gpu_device(force=true)
# @show get_graph_type(g) has_isolated_nodes(g)
# broken = get_graph_type(g) == :sparse
broken = true
Expand Down
16 changes: 15 additions & 1 deletion GNNlib/test/test_module.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ using Flux: Flux
# from this module
export D_IN, D_OUT, GRAPH_TYPES, TEST_GRAPHS,
test_gradients, finitediff_withgradient,
check_equal_leaves
check_equal_leaves, gpu_backend


const D_IN = 3
Expand Down Expand Up @@ -177,4 +177,18 @@ TEST_GRAPHS = [generate_test_graphs(:coo)...,
generate_test_graphs(:dense)...,
generate_test_graphs(:sparse)...]


function gpu_backend()
dev = gpu_device()
if dev isa CUDADevice
return "CUDA"
elseif dev isa AMDGPUDevice
return "AMDGPU"
elseif dev isa MetalDevice
return "Metal"
else
return "Unknown"
end
end

end # module
64 changes: 37 additions & 27 deletions GraphNeuralNetworks/docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,44 @@ interlinks = InterLinks(

)

# Copy the guides from GNNGraphs and GNNlib
dest_guides_dir = joinpath(@__DIR__, "src/other")
gnngraphs_guides_dir = joinpath(@__DIR__, "../../GNNGraphs/docs/src/guides")
gnnlib_guides_dir = joinpath(@__DIR__, "../../GNNlib/docs/src/guides")
for file in readdir(gnngraphs_guides_dir)
cp(joinpath(gnngraphs_guides_dir, file), joinpath(dest_guides_dir, file), force=true)
end
for file in readdir(gnnlib_guides_dir)
cp(joinpath(gnnlib_guides_dir, file), joinpath(dest_guides_dir, file), force=true)
end

makedocs(;
modules = [GraphNeuralNetworks],
doctest = false,
clean = true,
plugins = [interlinks],
format = Documenter.HTML(; mathengine, prettyurls, assets = assets, size_threshold=nothing),
sitename = "GraphNeuralNetworks.jl",
pages = ["Monorepo" => [
"Home" => "index.md",
"Developer guide" => "dev.md",
"Google Summer of Code" => "gsoc.md",
],
"GraphNeuralNetworks.jl" =>[
"Home" => "home.md",
"Models" => "models.md",],
modules = [GraphNeuralNetworks],
doctest = false, # TODO: enable doctest
clean = true,
plugins = [interlinks],
format = Documenter.HTML(; mathengine, prettyurls, assets = assets, size_threshold=nothing),
sitename = "GraphNeuralNetworks.jl",
pages = [

"Home" => "index.md",

"Guides" => [
"Graphs" => ["other/gnngraph.md", "other/heterograph.md", "other/temporalgraph.md"],
"Message Passing" => "other/messagepassing.md",
"Models" => "guides/models.md",
"Datasets" => "other/datasets.md",
],

"API Reference" => [

"Basic" => "api/basic.md",
"Convolutional layers" => "api/conv.md",
"Pooling layers" => "api/pool.md",
"Temporal Convolutional layers" => "api/temporalconv.md",
"Hetero Convolutional layers" => "api/heteroconv.md",


],

],
)
"API Reference" => [
"Basic" => "api/basic.md",
"Convolutional layers" => "api/conv.md",
"Pooling layers" => "api/pool.md",
"Temporal Convolutional layers" => "api/temporalconv.md",
"Hetero Convolutional layers" => "api/heteroconv.md",
],
"Developer guide" => "dev.md",
],
)

deploydocs(;repo = "github.com/JuliaGraphs/GraphNeuralNetworks.jl.git", devbranch = "master", dirname= "GraphNeuralNetworks")
5 changes: 0 additions & 5 deletions GraphNeuralNetworks/docs/src/datasets.md

This file was deleted.

3 changes: 0 additions & 3 deletions GraphNeuralNetworks/docs/src/gsoc.md

This file was deleted.

File renamed without changes.
87 changes: 0 additions & 87 deletions GraphNeuralNetworks/docs/src/home.md

This file was deleted.

Loading

0 comments on commit 065ec3f

Please sign in to comment.