Skip to content

Commit 9d982be

Browse files
authored
Documentation with MultiDocumenter.jl (#508)
* New docs * Update * Actions * Fix branch * Fix * Change path * Tentative * Fix * Some checks * Add Graphs interlink * FIx * ok * fix? * update julia version * Change a bit * dev GNNGraphs * Fix path * Test * Add envs * Rewrite GraphNeuralNetwork part * Fix typo * Remove old docs * Test branch docs * Other test * Another test * Test * New test * Back to prevous path * Back to git error * As Datatoolkit * Change name * remove * Locally works * Test push in branch * Add check * Change repo * Test GNNGraphs deploy * Fix spaces * Fix workflows * Remove https from repo paths * Fix datasets * Fixes * Remove git ignore * Test url * Back to previous urls and update yml * Fix * test yml * Later * Fix L * Test as multi * Update gitignore * Test orphan branch * Add git config * Add checks * Stash * drop stash useless * Force checkout * Add restore * Check what is deleting * Other check to understand * It was deleting docs * Fix typo * Fix name * Cleaner * Clean to be merge in master * Fix branch switch to master
1 parent 15055d8 commit 9d982be

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1146
-249
lines changed

.github/workflows/docs.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/multidocs.yml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
name: MultiDocumentation
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags: '*'
8+
pull_request:
9+
10+
jobs:
11+
build_multidocs:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: julia-actions/setup-julia@v2
16+
with:
17+
version: '1.10.5'
18+
- uses: julia-actions/cache@v2
19+
20+
- name: Set up
21+
run: git config --global init.defaultBranch master
22+
23+
# Build GNNGraphs docs
24+
- name: Install dependencies for GNNGraphs
25+
run:
26+
julia --project=GNNGraphs/docs/ -e '
27+
using Pkg;
28+
Pkg.develop(PackageSpec(path=joinpath(pwd(), "GNNGraphs")));
29+
Pkg.instantiate();'
30+
- name: Build GNNGraphs docs
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
33+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
34+
run: julia --project=GNNGraphs/docs/ GNNGraphs/docs/make.jl
35+
36+
# Build GNNlib docs
37+
- name: Install dependencies for GNNlib
38+
run: julia --project=GNNlib/docs/ -e 'using Pkg; Pkg.instantiate();'
39+
- name: Build GNNlib docs
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
42+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
43+
run: julia --project=GNNlib/docs/ GNNlib/docs/make.jl
44+
45+
# Build GNNLux docs
46+
- name: Install dependencies for GNNLux
47+
run: julia --project=GNNLux/docs/ -e '
48+
using Pkg;
49+
Pkg.develop(PackageSpec(path=joinpath(pwd(), "GNNLux")));
50+
Pkg.instantiate();'
51+
- name: Build GNNLux docs
52+
env:
53+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
54+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
55+
run: julia --project=GNNLux/docs/ GNNLux/docs/make.jl
56+
57+
# Build GraphNeuralNetworks docs
58+
- name: Install dependencies for GraphNeuralNetworks
59+
run: julia --project=GraphNeuralNetworks/docs/ -e '
60+
using Pkg;
61+
Pkg.develop(PackageSpec(path=joinpath(pwd(), "GraphNeuralNetworks")));
62+
Pkg.instantiate();'
63+
- name: Build GraphNeuralNetworks docs
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
66+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
67+
run: julia --project=GraphNeuralNetworks/docs/ GraphNeuralNetworks/docs/make.jl
68+
69+
# Build multidocs
70+
- name: Install dependencies for main docs
71+
run: julia --project=GraphNeuralNetworks/docs/ -e '
72+
using Pkg;
73+
Pkg.develop(PackageSpec(path=joinpath(pwd(), "GraphNeuralNetworks")));
74+
Pkg.instantiate();'
75+
- name: Build main docs
76+
env:
77+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
78+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
79+
run: julia --project=GraphNeuralNetworks/docs/make.jl
80+
81+
# Build tutorials
82+
- name: Install dependencies for tutorials
83+
run: julia --project=tutorials/docs/ -e 'using Pkg; Pkg.instantiate();'
84+
- name: Build tutorials
85+
env:
86+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
87+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
88+
run: julia --project=tutorials/docs/ tutorials/docs/make.jl
89+
90+
# Build and deploy multidocs
91+
- name: Install dependencies for multidocs
92+
run: julia --project=docs/ -e '
93+
using Pkg;
94+
Pkg.develop([PackageSpec(path=joinpath(pwd(), "GraphNeuralNetworks")),
95+
PackageSpec(path=joinpath(pwd(), "GNNGraphs")),
96+
PackageSpec(path=joinpath(pwd(), "GNNlib")),
97+
PackageSpec(path=joinpath(pwd(), "GNNLux"))]);
98+
Pkg.instantiate();'
99+
- name: Check if objects.inv exists for GraphNeuralNetworks
100+
run: |
101+
if [ -f GraphNeuralNetworks/docs/build/objects.inv ]; then
102+
echo "GraphNeuralNetworks: objects.inv exists."
103+
else
104+
echo "GraphNeuralNetworks: objects.inv does not exist!" && exit 1
105+
fi
106+
- name: Build and deploy multidocs
107+
env:
108+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
109+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
110+
run: |
111+
git config user.name github-actions
112+
git config user.email [email protected]
113+
julia --project=docs/ docs/make-multi.jl

.gitignore

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@
55
*.swp
66
*.swo
77
Manifest.toml
8-
/docs/build/
98
.vscode
109
LocalPreferences.toml
1110
.DS_Store
1211
docs/src/democards/gridtheme.css
13-
test.jl
12+
test.jl
13+
docs/build
14+
GNNGraphs/docs/build
15+
GNNlib/docs/build
16+
GNNLux/docs/build
17+
GraphNeuralNetworks/docs/build
18+
tutorials/docs/build

GNNGraphs/docs/Project.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[deps]
2+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
DocumenterInterLinks = "d12716ef-a0f6-4df4-a9f1-a5a34e75c656"
4+
GNNGraphs = "aed8fd31-079b-4b5a-b342-a13352159b8c"
5+
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
6+
LiveServer = "16fef848-5104-11e9-1b77-fb7a48bbb589"

GNNGraphs/docs/make.jl

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
using Documenter
2+
using DocumenterInterLinks
3+
using GNNGraphs
4+
import Graphs
5+
using Graphs: induced_subgraph
6+
7+
assets=[]
8+
prettyurls = get(ENV, "CI", nothing) == "true"
9+
mathengine = MathJax3()
10+
11+
12+
makedocs(;
13+
modules = [GNNGraphs],
14+
doctest = false,
15+
clean = true,
16+
format = Documenter.HTML(; mathengine, prettyurls, assets = assets, size_threshold=nothing),
17+
sitename = "GNNGraphs.jl",
18+
pages = ["Home" => "index.md",
19+
"Graphs" => ["gnngraph.md", "heterograph.md", "temporalgraph.md"],
20+
"Datasets" => "datasets.md",
21+
"API Reference" => [
22+
"GNNGraph" => "api/gnngraph.md",
23+
"GNNHeteroGraph" => "api/heterograph.md",
24+
"TemporalSnapshotsGNNGraph" => "api/temporalgraph.md",
25+
],
26+
]
27+
)
28+
29+
deploydocs(;repo = "github.com/JuliaGraphs/GraphNeuralNetworks.jl.git",
30+
devbranch = "master",
31+
push_preview = true,
32+
dirname = "GNNGraphs")

GraphNeuralNetworks/docs/src/api/gnngraph.md renamed to GNNGraphs/docs/src/api/gnngraph.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ CurrentModule = GNNGraphs
44

55
# GNNGraph
66

7-
Documentation page for the graph type `GNNGraph` provided by GraphNeuralNetworks.jl and related methods.
7+
Documentation page for the graph type `GNNGraph` provided by GNNGraphs.jl and related methods.
88

99
Besides the methods documented here, one can rely on the large set of functionalities
1010
given by [Graphs.jl](https://github.com/JuliaGraphs/Graphs.jl) thanks to the fact

GNNGraphs/docs/src/api/heterograph.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Heterogeneous Graphs
2+
3+
4+
## GNNHeteroGraph
5+
Documentation page for the type `GNNHeteroGraph` representing heterogeneous graphs, where nodes and edges can have different types.
6+
7+
8+
```@autodocs
9+
Modules = [GNNGraphs]
10+
Pages = ["gnnheterograph.jl"]
11+
Private = false
12+
```
13+
14+
```@docs
15+
Graphs.has_edge(::GNNHeteroGraph, ::Tuple{Symbol, Symbol, Symbol}, ::Integer, ::Integer)
16+
```
17+
File renamed without changes.

GNNGraphs/docs/src/datasets.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Datasets
2+
3+
GNNGraphs.jl doesn't come with its own datasets, but leverages those available in the Julia (and non-Julia) ecosystem. In particular, the [examples in the GraphNeuralNetworks.jl repository](https://github.com/JuliaGraphs/GraphNeuralNetworks.jl/tree/master/examples) make use of the [MLDatasets.jl](https://github.com/JuliaML/MLDatasets.jl) package. There you will find common graph datasets such as Cora, PubMed, Citeseer, TUDataset and [many others](https://juliaml.github.io/MLDatasets.jl/dev/datasets/graphs/).
4+
For graphs with static structures and temporal features, datasets such as METRLA, PEMSBAY, ChickenPox, and WindMillEnergy are available. For graphs featuring both temporal structures and temporal features, the TemporalBrains dataset is suitable.
5+
6+
GraphNeuralNetworks.jl provides the [`mldataset2gnngraph`](@ref) method for interfacing with MLDatasets.jl.
7+
8+
```@docs
9+
mldataset2gnngraph
10+
```

GraphNeuralNetworks/docs/src/gnngraph.md renamed to GNNGraphs/docs/src/gnngraph.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Working with GNNGraph
1+
# Static Graphs
22

3-
The fundamental graph type in GraphNeuralNetworks.jl is the [`GNNGraph`](@ref).
3+
The fundamental graph type in GNNGraphs.jl is the [`GNNGraph`](@ref).
44
A GNNGraph `g` is a directed graph with nodes labeled from 1 to `g.num_nodes`.
55
The underlying implementation allows for efficient application of graph neural network
66
operators, gpu movement, and storage of node/edge/graph related feature arrays.
@@ -12,7 +12,7 @@ therefore it supports most functionality from that library.
1212
A GNNGraph can be created from several different data sources encoding the graph topology:
1313

1414
```julia
15-
using GraphNeuralNetworks, Graphs, SparseArrays
15+
using GNNGraphs, Graphs, SparseArrays
1616

1717

1818
# Construct a GNNGraph from from a Graphs.jl's graph
@@ -124,7 +124,7 @@ g′.e
124124
## Edge weights
125125

126126
It is common to denote scalar edge features as edge weights. The `GNNGraph` has specific support
127-
for edge weights: they can be stored as part of internal representations of the graph (COO or adjacency matrix). Some graph convolutional layers, most notably the [`GCNConv`](@ref), can use the edge weights to perform weighted sums over the nodes' neighborhoods.
127+
for edge weights: they can be stored as part of internal representations of the graph (COO or adjacency matrix). Some graph convolutional layers, most notably the `GCNConv`, can use the edge weights to perform weighted sums over the nodes' neighborhoods.
128128

129129
```julia
130130
julia> source = [1, 1, 2, 2, 3, 3];
@@ -233,7 +233,7 @@ Moreover, a `GNNGraph` can be easily constructed from a `Graphs.Graph` or a `Gra
233233
```julia
234234
julia> import Graphs
235235

236-
julia> using GraphNeuralNetworks
236+
julia> using GNNGraphs
237237

238238
# A Graphs.jl undirected graph
239239
julia> gu = Graphs.erdos_renyi(10, 20)

0 commit comments

Comments
 (0)