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

try new approach for building and deploying docs #552

Merged
merged 4 commits into from
Dec 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
91 changes: 15 additions & 76 deletions .github/workflows/multidocs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: MultiDocumentation
name: Docs

on:
push:
Expand All @@ -8,87 +8,26 @@ on:
pull_request:

jobs:
build_multidocs:
docs:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: '1.10.5'
version: '1'
- uses: julia-actions/cache@v2

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

- name: Build GNNGraphs docs
run:
julia --project=GNNGraphs/docs/ -e '
using Pkg;
pkg"dev ./GNNGraphs";
Pkg.instantiate();
include("GNNGraphs/docs/make.jl")'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

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

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

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


# Build and deploy multidocs
- name: Install dependencies for multidocs
run: julia --project=docs/ -e '
using Pkg;
pkg"dev ./GraphNeuralNetworks ./GNNlib ./GNNGraphs ./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: Config git
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
# Build individual docs
- run: julia GNNGraphs/docs/make.jl
- run: julia GNNlib/docs/make.jl
- run: julia GNNLux/docs/make.jl
- run: julia GraphNeuralNetworks/docs/make.jl
# Compile multi docs
- name: MultiDocs
run: |
git config user.name github-actions
git config user.email github-actions@github.com

- name: Build multidocs
if: github.event_name == 'pull_request'
run: |
julia --project=docs/ docs/make-multi.jl PR

- name: Build and deploy multidocs
if: github.event_name != 'pull_request'
run: |
julia --project=docs/ docs/make-multi.jl
julia --project=docs/ -e 'using Pkg; Pkg.instantiate()'
julia --project=docs/ docs/make-multi.jl
1 change: 0 additions & 1 deletion GNNGraphs/docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ 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"
MLDatasets = "eb30cadb-4394-5ae3-aed4-317e484a6458"
MLUtils = "f1d291b0-491e-4a28-83b9-f70985020b54"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
47 changes: 28 additions & 19 deletions GNNGraphs/docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
using Pkg
Pkg.activate(@__DIR__)
Pkg.develop(path=joinpath(@__DIR__, ".."))
Pkg.instantiate()

using Documenter
using DocumenterInterLinks
using GNNGraphs
Expand Down Expand Up @@ -27,25 +32,29 @@ makedocs(;
size_threshold=nothing,
size_threshold_warn=200000),sitename = "GNNGraphs.jl",
pages = [
"Home" => "index.md",

"Guides" => [
"Graphs" => "guides/gnngraph.md",
"Heterogeneous Graphs" => "guides/heterograph.md",
"Temporal Graphs" => "guides/temporalgraph.md",
"Datasets" => "guides/datasets.md",
],
"Home" => "index.md",
"Guides" => [
"Graphs" => "guides/gnngraph.md",
"Heterogeneous Graphs" => "guides/heterograph.md",
"Temporal Graphs" => "guides/temporalgraph.md",
"Datasets" => "guides/datasets.md",
],

"API Reference" => [
"GNNGraph" => "api/gnngraph.md",
"GNNHeteroGraph" => "api/heterograph.md",
"TemporalSnapshotsGNNGraph" => "api/temporalgraph.md",
"Samplers" => "api/samplers.md",
],
"API Reference" => [
"GNNGraph" => "api/gnngraph.md",
"GNNHeteroGraph" => "api/heterograph.md",
"TemporalSnapshotsGNNGraph" => "api/temporalgraph.md",
"Samplers" => "api/samplers.md",
"Datasets" => "api/datasets.md",
],
]
)

deploydocs(repo = "github.com/JuliaGraphs/GraphNeuralNetworks.jl.git",
devbranch = "master",
dirname = "GNNGraphs",
tag_prefix="GNNGraphs-")

deploydocs(
repo = "github.com/JuliaGraphs/GraphNeuralNetworks.jl",
target = "build",
branch = "docs-gnngraphs",
devbranch = "master",
tag_prefix="GNNGraphs-",
)
10 changes: 10 additions & 0 deletions GNNGraphs/docs/src/api/datasets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
```@meta
CurrentModule = GNNGraphs
CollapsedDocStrings = true
```

# Datasets

```@docs
mldataset2gnngraph
```
20 changes: 10 additions & 10 deletions GNNGraphs/docs/src/api/gnngraph.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,42 +21,42 @@ Base.copy

## DataStore

```@autodocs
```@autodocs; canonical = true
Modules = [GNNGraphs]
Pages = ["datastore.jl"]
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
```

## 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
Expand All @@ -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})
```
3 changes: 0 additions & 3 deletions GNNGraphs/docs/src/guides/datasets.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Loading
Loading