From 2e52a2c8f00ac54271f18ccd26935a4f4251f756 Mon Sep 17 00:00:00 2001 From: Aurora Rossi Date: Sat, 7 Dec 2024 17:08:14 +0100 Subject: [PATCH 1/6] Fix GNNGraphs --- GNNGraphs/docs/make.jl | 2 +- GNNGraphs/docs/src/api/heterograph.md | 4 +++- GNNGraphs/src/gnnheterograph/query.jl | 2 +- GNNGraphs/src/sampling.jl | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/GNNGraphs/docs/make.jl b/GNNGraphs/docs/make.jl index 1e95d1654..73cd184e9 100644 --- a/GNNGraphs/docs/make.jl +++ b/GNNGraphs/docs/make.jl @@ -3,7 +3,7 @@ using DocumenterInterLinks using GNNGraphs using MLUtils # this is needed by setdocmeta! import Graphs -using Graphs: induced_subgraph +using Graphs: induced_subgraph, has_edge DocMeta.setdocmeta!(GNNGraphs, :DocTestSetup, :(using GNNGraphs, MLUtils); recursive = true) diff --git a/GNNGraphs/docs/src/api/heterograph.md b/GNNGraphs/docs/src/api/heterograph.md index 18a5562e2..e5dd0182a 100644 --- a/GNNGraphs/docs/src/api/heterograph.md +++ b/GNNGraphs/docs/src/api/heterograph.md @@ -22,7 +22,9 @@ Modules = [GNNGraphs] Pages = ["gnnheterograph/query.jl"] Private = false ``` - +```@docs +Graphs.has_edge(g::GNNHeteroGraph, edge_t::EType, i::Integer, j::Integer) +``` ## Transform ```@autodocs diff --git a/GNNGraphs/src/gnnheterograph/query.jl b/GNNGraphs/src/gnnheterograph/query.jl index 831e654eb..9c8db78d7 100644 --- a/GNNGraphs/src/gnnheterograph/query.jl +++ b/GNNGraphs/src/gnnheterograph/query.jl @@ -12,7 +12,7 @@ edge_index(g::GNNHeteroGraph{<:COO_T}) = only(g.graph)[2][1:2] get_edge_weight(g::GNNHeteroGraph{<:COO_T}, edge_t::EType) = g.graph[edge_t][3] """ - has_edge(g::GNNHeteroGraph, edge_t, i, j) + Graphs.has_edge(g::GNNHeteroGraph, edge_t::EType, i::Integer, j::Integer) Return `true` if there is an edge of type `edge_t` from node `i` to node `j` in `g`. diff --git a/GNNGraphs/src/sampling.jl b/GNNGraphs/src/sampling.jl index 6e38730f0..ad571552b 100644 --- a/GNNGraphs/src/sampling.jl +++ b/GNNGraphs/src/sampling.jl @@ -119,7 +119,7 @@ end """ - induced_subgraph(graph, nodes) + Graphs.induced_subgraph(graph::GNNGraph, nodes::Vector{Int}) Generates a subgraph from the original graph using the provided `nodes`. The function includes the nodes' neighbors and creates edges between nodes that are connected in the original graph. From 72b2575efcdfdf40812c8937664a46e1feff11b1 Mon Sep 17 00:00:00 2001 From: Aurora Rossi Date: Sat, 7 Dec 2024 17:10:09 +0100 Subject: [PATCH 2/6] Test GNNGraphs master workflow --- .github/workflows/multidocs.yml | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/.github/workflows/multidocs.yml b/.github/workflows/multidocs.yml index 46418813d..794d54812 100644 --- a/.github/workflows/multidocs.yml +++ b/.github/workflows/multidocs.yml @@ -22,11 +22,7 @@ jobs: - name: Build GNNGraphs docs run: - julia --project=GNNGraphs/docs/ -e ' - using Pkg; - pkg"dev ./GNNGraphs"; - Pkg.instantiate(); - include("GNNGraphs/docs/make.jl")' + julia --project=GNNGraphs/docs/ GNNGraphs/docs/make.jl env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} @@ -68,13 +64,7 @@ jobs: 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 From d2ec0e5aa02f4d8ff5cf1d0ad3e3e417eaf9cc32 Mon Sep 17 00:00:00 2001 From: Aurora Rossi Date: Sat, 7 Dec 2024 17:16:43 +0100 Subject: [PATCH 3/6] Add instantiate --- .github/workflows/multidocs.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/multidocs.yml b/.github/workflows/multidocs.yml index 794d54812..3ce6f79cd 100644 --- a/.github/workflows/multidocs.yml +++ b/.github/workflows/multidocs.yml @@ -21,8 +21,10 @@ jobs: run: git config --global init.defaultBranch master - name: Build GNNGraphs docs - run: - julia --project=GNNGraphs/docs/ GNNGraphs/docs/make.jl + run: julia --project=GNNGraphs/docs/ -e' + using Pkg; + Pkg.instantiate(); + include("GNNGraphs/docs/make.jl")' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} From c4d69f5a2008094e87e76aff6aedfc32757cb684 Mon Sep 17 00:00:00 2001 From: Aurora Rossi Date: Sat, 7 Dec 2024 17:25:41 +0100 Subject: [PATCH 4/6] test --- GNNGraphs/docs/make.jl | 1 - GNNGraphs/docs/src/api/heterograph.md | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/GNNGraphs/docs/make.jl b/GNNGraphs/docs/make.jl index 73cd184e9..707d47cd9 100644 --- a/GNNGraphs/docs/make.jl +++ b/GNNGraphs/docs/make.jl @@ -2,7 +2,6 @@ using Documenter using DocumenterInterLinks using GNNGraphs using MLUtils # this is needed by setdocmeta! -import Graphs using Graphs: induced_subgraph, has_edge diff --git a/GNNGraphs/docs/src/api/heterograph.md b/GNNGraphs/docs/src/api/heterograph.md index e5dd0182a..b9192127c 100644 --- a/GNNGraphs/docs/src/api/heterograph.md +++ b/GNNGraphs/docs/src/api/heterograph.md @@ -22,6 +22,7 @@ Modules = [GNNGraphs] Pages = ["gnnheterograph/query.jl"] Private = false ``` + ```@docs Graphs.has_edge(g::GNNHeteroGraph, edge_t::EType, i::Integer, j::Integer) ``` From 46d35e20880e84fd7838ce75b0961d345cb4ebfe Mon Sep 17 00:00:00 2001 From: Aurora Rossi Date: Sat, 7 Dec 2024 17:30:52 +0100 Subject: [PATCH 5/6] using Graphs --- GNNGraphs/docs/make.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GNNGraphs/docs/make.jl b/GNNGraphs/docs/make.jl index 707d47cd9..21246d124 100644 --- a/GNNGraphs/docs/make.jl +++ b/GNNGraphs/docs/make.jl @@ -2,7 +2,7 @@ using Documenter using DocumenterInterLinks using GNNGraphs using MLUtils # this is needed by setdocmeta! -using Graphs: induced_subgraph, has_edge +using Graphs DocMeta.setdocmeta!(GNNGraphs, :DocTestSetup, :(using GNNGraphs, MLUtils); recursive = true) From 7f5c237353ea16fea6830f6ed87189cb9418d6f0 Mon Sep 17 00:00:00 2001 From: Aurora Rossi Date: Sat, 7 Dec 2024 17:38:58 +0100 Subject: [PATCH 6/6] Remove dev --- .github/workflows/multidocs.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/multidocs.yml b/.github/workflows/multidocs.yml index 3ce6f79cd..b8de48864 100644 --- a/.github/workflows/multidocs.yml +++ b/.github/workflows/multidocs.yml @@ -32,7 +32,6 @@ jobs: - name: Build GNNlib docs run: julia --project=GNNlib/docs/ -e ' using Pkg; - pkg"dev ./GNNlib ./GNNGraphs"; Pkg.instantiate(); include("GNNlib/docs/make.jl")' env: @@ -42,7 +41,6 @@ jobs: - 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: @@ -52,7 +50,6 @@ jobs: - 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: @@ -64,7 +61,6 @@ jobs: - name: Install dependencies for multidocs run: julia --project=docs/ -e ' using Pkg; - pkg"dev ./GraphNeuralNetworks ./GNNlib ./GNNGraphs ./GNNLux"; Pkg.instantiate();' - name: Config git