Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation with MultiDocumenter.jl #508

Merged
merged 69 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
abc58c6
New docs
aurorarossi Sep 27, 2024
5c0ee4a
Update
aurorarossi Sep 27, 2024
3fa8da4
Actions
aurorarossi Sep 27, 2024
bbe07c8
Fix branch
aurorarossi Sep 27, 2024
78744f2
Fix
aurorarossi Sep 27, 2024
91cf00d
Change path
aurorarossi Oct 7, 2024
20cc1ed
Tentative
aurorarossi Oct 7, 2024
ee5bbcd
Fix
aurorarossi Oct 7, 2024
558a021
Some checks
aurorarossi Oct 17, 2024
8d9f3ad
Merge branch 'master' into new-multidocs
aurorarossi Oct 17, 2024
bc24a6c
Add Graphs interlink
aurorarossi Oct 17, 2024
12a82d5
FIx
aurorarossi Oct 17, 2024
4a02343
ok
aurorarossi Oct 17, 2024
2cb45fd
fix?
aurorarossi Oct 17, 2024
ff06669
update julia version
aurorarossi Oct 17, 2024
bba52fc
Change a bit
aurorarossi Oct 25, 2024
0109ff6
dev GNNGraphs
aurorarossi Oct 25, 2024
df8ab80
Fix path
aurorarossi Oct 25, 2024
c7e9742
Test
aurorarossi Oct 25, 2024
a911661
Add envs
aurorarossi Oct 25, 2024
3247938
Rewrite GraphNeuralNetwork part
aurorarossi Oct 26, 2024
d68f529
Merge branch 'master' into new-multidocs
aurorarossi Oct 26, 2024
9fffe19
Fix typo
aurorarossi Oct 26, 2024
daa4fb8
Remove old docs
aurorarossi Oct 26, 2024
e491e19
Test branch docs
aurorarossi Oct 26, 2024
7a17d64
Other test
aurorarossi Oct 26, 2024
a255ab0
Another test
aurorarossi Oct 26, 2024
82dc087
Test
aurorarossi Oct 26, 2024
4130140
New test
aurorarossi Nov 1, 2024
06e8a8c
Back to prevous path
aurorarossi Nov 1, 2024
7d437ca
Back to git error
aurorarossi Nov 1, 2024
742306f
As Datatoolkit
aurorarossi Nov 1, 2024
fabc2c6
Change name
aurorarossi Nov 1, 2024
b40fdcf
remove
aurorarossi Nov 1, 2024
f7a6df1
Locally works
aurorarossi Nov 1, 2024
4ec1411
Test push in branch
aurorarossi Nov 1, 2024
d40a3d4
Add check
aurorarossi Nov 1, 2024
2b51334
Merge branch 'master' into new-multidocs
aurorarossi Nov 3, 2024
22f032e
Change repo
aurorarossi Nov 3, 2024
b000019
Test GNNGraphs deploy
aurorarossi Nov 3, 2024
a12e372
Fix spaces
aurorarossi Nov 3, 2024
572e4fb
Fix workflows
aurorarossi Nov 3, 2024
124e818
Remove https from repo paths
aurorarossi Nov 3, 2024
a13ce2f
Fix datasets
aurorarossi Nov 3, 2024
867975d
Fixes
aurorarossi Nov 3, 2024
e48637e
Remove git ignore
aurorarossi Nov 3, 2024
692e885
Test url
aurorarossi Nov 4, 2024
7941b0a
Back to previous urls and update yml
aurorarossi Nov 4, 2024
89aff40
Fix
aurorarossi Nov 4, 2024
20bca10
test yml
aurorarossi Nov 4, 2024
ec9dc30
Later
aurorarossi Nov 4, 2024
dccfe6e
Fix L
aurorarossi Nov 4, 2024
104db4b
Test as multi
aurorarossi Nov 4, 2024
c8f316f
Update gitignore
aurorarossi Nov 4, 2024
8faef69
Test orphan branch
aurorarossi Nov 4, 2024
c9283d7
Add git config
aurorarossi Nov 4, 2024
27fd8ac
Add checks
aurorarossi Nov 4, 2024
c4f189d
Stash
aurorarossi Nov 4, 2024
4bb5ec0
drop stash useless
aurorarossi Nov 4, 2024
f80ca69
Force checkout
aurorarossi Nov 4, 2024
2b77031
Add restore
aurorarossi Nov 4, 2024
6689730
Check what is deleting
aurorarossi Nov 4, 2024
7e9ee5d
Other check to understand
aurorarossi Nov 4, 2024
35c58a3
It was deleting docs
aurorarossi Nov 4, 2024
5672b24
Fix typo
aurorarossi Nov 4, 2024
4508c36
Fix name
aurorarossi Nov 4, 2024
3687da9
Cleaner
aurorarossi Nov 4, 2024
fbe2b52
Clean to be merge in master
aurorarossi Nov 4, 2024
af5257b
Fix branch switch to master
aurorarossi Nov 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions .github/workflows/docs.yml

This file was deleted.

113 changes: 113 additions & 0 deletions .github/workflows/multidocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
name: MultiDocumentation

on:
push:
branches:
- master
tags: '*'
pull_request:

jobs:
build_multidocs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: '1.10.5'
- uses: julia-actions/cache@v2

- name: Set up
run: git config --global init.defaultBranch master

# Build GNNGraphs docs
- name: Install dependencies for GNNGraphs
run:
julia --project=GNNGraphs/docs/ -e '
using Pkg;
Pkg.develop(PackageSpec(path=joinpath(pwd(), "GNNGraphs")));
Pkg.instantiate();'
- name: Build GNNGraphs docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
run: julia --project=GNNGraphs/docs/ GNNGraphs/docs/make.jl

# Build GNNlib docs
- name: Install dependencies for GNNlib
run: julia --project=GNNlib/docs/ -e 'using Pkg; Pkg.instantiate();'
- name: Build GNNlib docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
run: julia --project=GNNlib/docs/ GNNlib/docs/make.jl

# Build GNNLux docs
- name: Install dependencies for GNNLux
run: julia --project=GNNLux/docs/ -e '
using Pkg;
Pkg.develop(PackageSpec(path=joinpath(pwd(), "GNNLux")));
Pkg.instantiate();'
- name: Build GNNLux docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
run: julia --project=GNNLux/docs/ GNNLux/docs/make.jl

# Build GraphNeuralNetworks docs
- name: Install dependencies for GraphNeuralNetworks
run: julia --project=GraphNeuralNetworks/docs/ -e '
using Pkg;
Pkg.develop(PackageSpec(path=joinpath(pwd(), "GraphNeuralNetworks")));
Pkg.instantiate();'
- name: Build GraphNeuralNetworks docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
run: julia --project=GraphNeuralNetworks/docs/ GraphNeuralNetworks/docs/make.jl

# Build multidocs
- name: Install dependencies for main docs
run: julia --project=GraphNeuralNetworks/docs/ -e '
using Pkg;
Pkg.develop(PackageSpec(path=joinpath(pwd(), "GraphNeuralNetworks")));
Pkg.instantiate();'
- name: Build main docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
run: julia --project=GraphNeuralNetworks/docs/make.jl

# Build tutorials
- name: Install dependencies for tutorials
run: julia --project=tutorials/docs/ -e 'using Pkg; Pkg.instantiate();'
- name: Build tutorials
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
run: julia --project=tutorials/docs/ tutorials/docs/make.jl

# Build and deploy multidocs
- name: Install dependencies for multidocs
run: julia --project=docs/ -e '
using Pkg;
Pkg.develop([PackageSpec(path=joinpath(pwd(), "GraphNeuralNetworks")),
PackageSpec(path=joinpath(pwd(), "GNNGraphs")),
PackageSpec(path=joinpath(pwd(), "GNNlib")),
PackageSpec(path=joinpath(pwd(), "GNNLux"))]);
Pkg.instantiate();'
- name: Check if objects.inv exists for GraphNeuralNetworks
run: |
if [ -f GraphNeuralNetworks/docs/build/objects.inv ]; then
echo "GraphNeuralNetworks: objects.inv exists."
else
echo "GraphNeuralNetworks: objects.inv does not exist!" && exit 1
fi
- name: Build and deploy multidocs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
run: |
git config user.name github-actions
git config user.email [email protected]
julia --project=docs/ docs/make-multi.jl
9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@
*.swp
*.swo
Manifest.toml
/docs/build/
.vscode
LocalPreferences.toml
.DS_Store
docs/src/democards/gridtheme.css
test.jl
test.jl
docs/build
GNNGraphs/docs/build
GNNlib/docs/build
GNNLux/docs/build
GraphNeuralNetworks/docs/build
tutorials/docs/build
6 changes: 6 additions & 0 deletions GNNGraphs/docs/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterInterLinks = "d12716ef-a0f6-4df4-a9f1-a5a34e75c656"
GNNGraphs = "aed8fd31-079b-4b5a-b342-a13352159b8c"
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
LiveServer = "16fef848-5104-11e9-1b77-fb7a48bbb589"
32 changes: 32 additions & 0 deletions GNNGraphs/docs/make.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using Documenter
using DocumenterInterLinks
using GNNGraphs
import Graphs
using Graphs: induced_subgraph

assets=[]
prettyurls = get(ENV, "CI", nothing) == "true"
mathengine = MathJax3()


makedocs(;
modules = [GNNGraphs],
doctest = false,
clean = true,
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",
"API Reference" => [
"GNNGraph" => "api/gnngraph.md",
"GNNHeteroGraph" => "api/heterograph.md",
"TemporalSnapshotsGNNGraph" => "api/temporalgraph.md",
],
]
)

deploydocs(;repo = "github.com/JuliaGraphs/GraphNeuralNetworks.jl.git",
devbranch = "master",
push_preview = true,
dirname = "GNNGraphs")
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CurrentModule = GNNGraphs

# GNNGraph

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

Besides the methods documented here, one can rely on the large set of functionalities
given by [Graphs.jl](https://github.com/JuliaGraphs/Graphs.jl) thanks to the fact
Expand Down
17 changes: 17 additions & 0 deletions GNNGraphs/docs/src/api/heterograph.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Heterogeneous Graphs


## GNNHeteroGraph
Documentation page for the type `GNNHeteroGraph` representing heterogeneous graphs, where nodes and edges can have different types.


```@autodocs
Modules = [GNNGraphs]
Pages = ["gnnheterograph.jl"]
Private = false
```

```@docs
Graphs.has_edge(::GNNHeteroGraph, ::Tuple{Symbol, Symbol, Symbol}, ::Integer, ::Integer)
```

10 changes: 10 additions & 0 deletions GNNGraphs/docs/src/datasets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Datasets

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/).
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.

GraphNeuralNetworks.jl provides the [`mldataset2gnngraph`](@ref) method for interfacing with MLDatasets.jl.

```@docs
mldataset2gnngraph
```
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Working with GNNGraph
# Static Graphs

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

```julia
using GraphNeuralNetworks, Graphs, SparseArrays
using GNNGraphs, Graphs, SparseArrays


# Construct a GNNGraph from from a Graphs.jl's graph
Expand Down Expand Up @@ -124,7 +124,7 @@ g′.e
## Edge weights

It is common to denote scalar edge features as edge weights. The `GNNGraph` has specific support
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.
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.

```julia
julia> source = [1, 1, 2, 2, 3, 3];
Expand Down Expand Up @@ -233,7 +233,7 @@ Moreover, a `GNNGraph` can be easily constructed from a `Graphs.Graph` or a `Gra
```julia
julia> import Graphs

julia> using GraphNeuralNetworks
julia> using GNNGraphs

# A Graphs.jl undirected graph
julia> gu = Graphs.erdos_renyi(10, 20)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Relations such as `:rate` or `:like` can connect nodes of different types. We ca

Different node/edge types can store different groups of features
and this makes heterographs a very flexible modeling tools
and data containers. In GraphNeuralNetworks.jl heterographs are implemented in
and data containers. In GNNGraphs.jl heterographs are implemented in
the type [`GNNHeteroGraph`](@ref).


Expand Down Expand Up @@ -137,4 +137,4 @@ end

## Graph convolutions on heterographs

See [`HeteroGraphConv`](@ref) for how to perform convolutions on heterogeneous graphs.
See `HeteroGraphConv` for how to perform convolutions on heterogeneous graphs.
15 changes: 15 additions & 0 deletions GNNGraphs/docs/src/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# GNNGraphs.jl

GNNGraphs.jl is a package that provides graph data structures and helper functions specifically designed for working with graph neural networks. This package allows to store not only the graph structure, but also features associated with nodes, edges, and the graph itself. It is the core foundation for the GNNlib, GraphNeuralNetworks, and GNNLux packages.

It supports three types of graphs:

- **Static graph** is the basic graph type represented by [`GNNGraph`](@ref), where each node and edge can have associated features. This type of graph is used in typical graph neural network applications, where neural networks operate on both the structure of the graph and the features stored in it. It can be used to represent a graph where the structure does not change over time, but the features of the nodes and edges can change over time.

- **Heterogeneous graph** is a graph that supports multiple types of nodes and edges, and is represented by [`GNNHeteroGraph`](@ref). Each type can have its own properties and relationships. This is useful in scenarios with different entities and interactions, such as in citation graphs or multi-relational data.

- **Temporal graph** is a graph that changes over time, and is represented by [`TemporalSnapshotsGNNGraph`](@ref). Edges and features can change dynamically. This type of graph is useful for applications that involve tracking time-dependent relationships, such as social networks.



This package depends on the package [Graphs.jl] (https://github.com/JuliaGraphs/Graphs.jl).
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Temporal Graphs

Temporal Graphs are graphs with time varying topologies and node features. In GraphNeuralNetworks.jl temporal graphs with fixed number of nodes over time are supported by the [`TemporalSnapshotsGNNGraph`](@ref) type.
Temporal Graphs are graphs with time varying topologies and features. In GNNGraphs.jl, temporal graphs with fixed number of nodes over time are supported by the [`TemporalSnapshotsGNNGraph`](@ref) type.

## Creating a TemporalSnapshotsGNNGraph

Expand Down Expand Up @@ -91,7 +91,7 @@ GNNGraph:
```

## Data Features
A temporal graph can stode global feautre for the entire time series in the `tgdata` filed.
A temporal graph can store global feature for the entire time series in the `tgdata` filed.
Also, each snapshot can store node, edge, and graph features in the `ndata`, `edata`, and `gdata` fields, respectively.

```jldoctest
Expand Down Expand Up @@ -126,10 +126,10 @@ julia> [g.x for g in tg.snapshots]; # same vector as above, now accessing

## Graph convolutions on TemporalSnapshotsGNNGraph

A graph convolutional layer can be applied to each snapshot independently, in the next example we apply a `GINConv` layer to each snapshot of a `TemporalSnapshotsGNNGraph`. The list of compatible graph convolution layers can be found [here](api/conv.md).
A graph convolutional layer can be applied to each snapshot independently, in the next example we apply a `GINConv` layer to each snapshot of a `TemporalSnapshotsGNNGraph`.

```jldoctest
julia> using GraphNeuralNetworks, Flux
julia> using GNNGraphs, Flux

julia> snapshots = [rand_graph(10, 20; ndata = rand(3, 10)), rand_graph(10, 14; ndata = rand(3, 10))];

Expand Down
5 changes: 5 additions & 0 deletions GNNLux/docs/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
GNNLux = "e8545f4d-a905-48ac-a8c4-ca114b98986d"
GNNlib = "a6a84749-d869-43f8-aacc-be26a1996e48"
LiveServer = "16fef848-5104-11e9-1b77-fb7a48bbb589"
28 changes: 28 additions & 0 deletions GNNLux/docs/make.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using Documenter
using GNNlib
using GNNLux



assets=[]
prettyurls = get(ENV, "CI", nothing) == "true"
mathengine = MathJax3()


makedocs(;
modules = [GNNLux],
doctest = false,
clean = true,
format = Documenter.HTML(; mathengine, prettyurls, assets = assets, size_threshold=nothing),
sitename = "GNNLux.jl",
pages = ["Home" => "index.md",
"Basic" => "api/basic.md"],
)




deploydocs(;repo = "github.com/JuliaGraphs/GraphNeuralNetworks.jl.git",
devbranch = "master",
push_preview = true,
dirname = "GNNLux")
8 changes: 8 additions & 0 deletions GNNLux/docs/src/api/basic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
```@meta
CurrentModule = GNNLux
```

## GNNLayer
```@docs
GNNLux.GNNLayer
```
5 changes: 5 additions & 0 deletions GNNLux/docs/src/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# GNNLux.jl

GNNLux.jl is a work-in-progress package that implements stateless graph convolutional layers, fully compatible with the [Lux.jl](https://lux.csail.mit.edu/stable/) machine learning framework. It is built on top of the GNNGraphs.jl, GNNlib.jl, and Lux.jl packages.

The full documentation will be available soon.
Loading
Loading