From 487c6e9ee418811fc366140db03d7839ee0f386a Mon Sep 17 00:00:00 2001 From: Carlo Lucibello Date: Mon, 9 Dec 2024 00:07:33 +0100 Subject: [PATCH] fix --- GNNGraphs/docs/make.jl | 3 ++- GNNGraphs/docs/src/api/datasets.md | 10 ++++++++++ GNNGraphs/docs/src/api/gnngraph.md | 20 ++++++++++---------- GNNGraphs/docs/src/guides/datasets.md | 3 --- GNNLux/docs/make.jl | 1 + GNNlib/docs/make.jl | 18 +++++++++++++++--- GNNlib/src/msgpass.jl | 4 ++-- GraphNeuralNetworks/docs/make.jl | 1 + 8 files changed, 41 insertions(+), 19 deletions(-) create mode 100644 GNNGraphs/docs/src/api/datasets.md diff --git a/GNNGraphs/docs/make.jl b/GNNGraphs/docs/make.jl index 040b1c00d..30a3a2f56 100644 --- a/GNNGraphs/docs/make.jl +++ b/GNNGraphs/docs/make.jl @@ -46,7 +46,8 @@ makedocs(; "GNNHeteroGraph" => "api/heterograph.md", "TemporalSnapshotsGNNGraph" => "api/temporalgraph.md", "Samplers" => "api/samplers.md", - ], + "Datasets" => "api/datasets.md", + ], ] ) diff --git a/GNNGraphs/docs/src/api/datasets.md b/GNNGraphs/docs/src/api/datasets.md new file mode 100644 index 000000000..745053691 --- /dev/null +++ b/GNNGraphs/docs/src/api/datasets.md @@ -0,0 +1,10 @@ +```@meta +CurrentModule = GNNGraphs +CollapsedDocStrings = true +``` + +# Datasets + +```@docs +mldataset2gnngraph +``` diff --git a/GNNGraphs/docs/src/api/gnngraph.md b/GNNGraphs/docs/src/api/gnngraph.md index 47b4040a2..bd344fec4 100644 --- a/GNNGraphs/docs/src/api/gnngraph.md +++ b/GNNGraphs/docs/src/api/gnngraph.md @@ -21,7 +21,7 @@ Base.copy ## DataStore -```@autodocs +```@autodocs; canonical = true Modules = [GNNGraphs] Pages = ["datastore.jl"] Private = false @@ -29,19 +29,19 @@ Private = false ## Query -```@autodocs +```@autodocs; canonical = true Modules = [GNNGraphs] Pages = ["src/query.jl"] Private = false ``` -```@docs +```@docs; canonical = true Graphs.neighbors(::GNNGraph, ::Integer) ``` ## Transform -```@autodocs +```@autodocs; canonical = true Modules = [GNNGraphs] Pages = ["src/transform.jl"] Private = false @@ -49,14 +49,14 @@ Private = false ## Utils -```@docs +```@docs; canonical = true GNNGraphs.sort_edge_index GNNGraphs.color_refinement ``` ## Generate -```@autodocs +```@autodocs; canonical = true Modules = [GNNGraphs] Pages = ["src/generate.jl"] Private = false @@ -65,24 +65,24 @@ Filter = t -> typeof(t) <: Function && t!=rand_temporal_radius_graph && t!=rand_ ## Operators -```@autodocs +```@autodocs; canonical = true Modules = [GNNGraphs] Pages = ["src/operators.jl"] Private = false ``` -```@docs +```@docs; canonical = true Base.intersect ``` ## Sampling -```@autodocs +```@autodocs; canonical = true Modules = [GNNGraphs] Pages = ["src/sampling.jl"] Private = false ``` -```@docs +```@docs; canonical = true Graphs.induced_subgraph(::GNNGraph, ::Vector{Int}) ``` \ No newline at end of file diff --git a/GNNGraphs/docs/src/guides/datasets.md b/GNNGraphs/docs/src/guides/datasets.md index 60477d95e..99c741c92 100644 --- a/GNNGraphs/docs/src/guides/datasets.md +++ b/GNNGraphs/docs/src/guides/datasets.md @@ -5,6 +5,3 @@ For graphs with static structures and temporal features, datasets such as METRLA GraphNeuralNetworks.jl provides the [`mldataset2gnngraph`](@ref) method for interfacing with MLDatasets.jl. -```@docs -mldataset2gnngraph -``` diff --git a/GNNLux/docs/make.jl b/GNNLux/docs/make.jl index 723ed739e..d1f0bbadb 100644 --- a/GNNLux/docs/make.jl +++ b/GNNLux/docs/make.jl @@ -68,6 +68,7 @@ makedocs(; "GNNHeteroGraph" => "GNNGraphs/api/heterograph.md", "TemporalSnapshotsGNNGraph" => "GNNGraphs/api/temporalgraph.md", "Samplers" => "GNNGraphs/api/samplers.md", + "Datasets" => "GNNGraphs/api/datasets.md", ] "Message Passing (GNNlib.jl)" => [ diff --git a/GNNlib/docs/make.jl b/GNNlib/docs/make.jl index 61d71e471..0141ad809 100644 --- a/GNNlib/docs/make.jl +++ b/GNNlib/docs/make.jl @@ -7,6 +7,7 @@ Pkg.instantiate() using Documenter using GNNlib using GNNGraphs +import Graphs using DocumenterInterLinks assets=[] @@ -17,11 +18,13 @@ interlinks = InterLinks( "NNlib" => "https://fluxml.ai/NNlib.jl/stable/", ) +# Copy the docs from GNNGraphs. Will be removed at the end of the script +cp(joinpath(@__DIR__, "../../GNNGraphs/docs/src/"), + joinpath(@__DIR__, "src/GNNGraphs/"), force=true) makedocs(; - modules = [GNNlib], - doctest = false, - clean = true, + modules = [GNNlib, GNNGraphs], + doctest = false, # TODO enable doctest plugins = [interlinks], format = Documenter.HTML(; mathengine, prettyurls, assets = assets, size_threshold=nothing), sitename = "GNNlib.jl", @@ -29,12 +32,21 @@ makedocs(; "Home" => "index.md", "Message Passing" => "guides/messagepassing.md", "API Reference" => [ + "Graphs (GNNGraphs.jl)" => [ + "GNNGraph" => "GNNGraphs/api/gnngraph.md", + "GNNHeteroGraph" => "GNNGraphs/api/heterograph.md", + "TemporalSnapshotsGNNGraph" => "GNNGraphs/api/temporalgraph.md", + "Samplers" => "GNNGraphs/api/samplers.md", + "Datasets" => "GNNGraphs/api/datasets.md", + ], "Message Passing" => "api/messagepassing.md", "Utils" => "api/utils.md", ] ] ) +rm(joinpath(@__DIR__, "src/GNNGraphs"), force=true, recursive=true) + deploydocs( repo = "github.com/JuliaGraphs/GraphNeuralNetworks.jl", target = "build", diff --git a/GNNlib/src/msgpass.jl b/GNNlib/src/msgpass.jl index f6a1cf659..7bbe2ab58 100644 --- a/GNNlib/src/msgpass.jl +++ b/GNNlib/src/msgpass.jl @@ -22,7 +22,7 @@ providing as input `f` a closure. - `g`: A `GNNGraph`. - `xi`: An array or a named tuple containing arrays whose last dimension's size is `g.num_nodes`. It will be appropriately materialized on the - target node of each edge (see also [`edge_index`](@ref)). + target node of each edge (see also [`edge_index`](@ref GNNGraphs.edge_index)). - `xj`: As `xj`, but to be materialized on edges' sources. - `e`: An array or a named tuple containing arrays whose last dimension's size is `g.num_edges`. - `fmsg`: A generic function that will be passed over to [`apply_edges`](@ref). @@ -100,7 +100,7 @@ such tensors. - `g`: An `AbstractGNNGraph`. - `xi`: An array or a named tuple containing arrays whose last dimension's size is `g.num_nodes`. It will be appropriately materialized on the - target node of each edge (see also [`edge_index`](@ref)). + target node of each edge (see also [`edge_index`](@ref GNNGraphs.edge_index)). - `xj`: As `xi`, but now to be materialized on each edge's source node. - `e`: An array or a named tuple containing arrays whose last dimension's size is `g.num_edges`. - `fmsg`: A function that takes as inputs the edge-materialized `xi`, `xj`, and `e`. diff --git a/GraphNeuralNetworks/docs/make.jl b/GraphNeuralNetworks/docs/make.jl index f25223eb9..a5ff601ff 100644 --- a/GraphNeuralNetworks/docs/make.jl +++ b/GraphNeuralNetworks/docs/make.jl @@ -74,6 +74,7 @@ makedocs(; "GNNHeteroGraph" => "GNNGraphs/api/heterograph.md", "TemporalSnapshotsGNNGraph" => "GNNGraphs/api/temporalgraph.md", "Samplers" => "GNNGraphs/api/samplers.md", + "Datasets" => "GNNGraphs/api/datasets.md", ] "Message Passing (GNNlib.jl)" => [