Skip to content

Commit

Permalink
Fixed add_edge! conflicts (#18)
Browse files Browse the repository at this point in the history
* Exported add_edge!

* Fixed add_edge conflicts
  • Loading branch information
dlcole3 authored Mar 7, 2024
1 parent 0d3efae commit 24ae7bb
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 10 deletions.
3 changes: 3 additions & 0 deletions src/PlasmoData.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ using SparseArrays
using Statistics
using LinearAlgebra

import Graphs: add_edge!

export DataGraph,
DataDiGraph,
add_node!,
add_edge!,
add_node_data!,
add_edge_data!,
adjacency_matrix,
Expand Down
2 changes: 1 addition & 1 deletion test/DataDiGraph_interface_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ for i in 1:length(nodes)
end

for i in 1:length(edges)
PlasmoData.add_edge!(dg, edges[i])
add_edge!(dg, edges[i])
add_edge_data!(dg, edges[i], edge_data[i])
end

Expand Down
4 changes: 2 additions & 2 deletions test/DataDiGraph_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function build_datadigraph(nodes, edges)
add_node!(dg, i)
end
for (i, j) in edges
PlasmoData.add_edge!(dg, i, j)
add_edge!(dg, i, j)
end
return dg
end
Expand Down Expand Up @@ -108,7 +108,7 @@ end
# Test add_edge! function 1

for (i, j) in edges
PlasmoData.add_edge!(dg, i, j)
add_edge!(dg, i, j)
end

@testset "add_edge! test1" begin
Expand Down
4 changes: 2 additions & 2 deletions test/DataDiGraph_utils_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ for i in 1:length(nodes)
end

for i in 1:length(edges)
PlasmoData.add_edge!(dg, edges[i])
add_edge!(dg, edges[i])
add_edge_data!(dg, edges[i], edge_data[i])
end

Expand Down Expand Up @@ -97,7 +97,7 @@ for i in 1:length(nodes)
end

for i in 1:length(edges)
PlasmoData.add_edge!(dg, edges[i])
add_edge!(dg, edges[i])
add_edge_data!(dg, edges[i], edge_data[i])
end

Expand Down
2 changes: 1 addition & 1 deletion test/DataGraph_interface_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ for i in 1:length(nodes)
end

for i in 1:length(edges)
PlasmoData.add_edge!(dg, edges[i])
add_edge!(dg, edges[i])
add_edge_data!(dg, edges[i], edge_data[i], "weight")
end

Expand Down
6 changes: 3 additions & 3 deletions test/DataGraph_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function build_datagraph(nodes, edges)
add_node!(dg, i)
end
for (i, j) in edges
PlasmoData.add_edge!(dg, i, j)
add_edge!(dg, i, j)
end

return dg
Expand Down Expand Up @@ -108,7 +108,7 @@ end
# Test add_edge! function 1

for (i, j) in edges
PlasmoData.add_edge!(dg, i, j)
add_edge!(dg, i, j)
end

@testset "add_edge! test" begin
Expand Down Expand Up @@ -147,7 +147,7 @@ for i in nodes
end

for i in edges
PlasmoData.add_edge!(dg, i)
add_edge!(dg, i)
end

@testset "add_edge! test" begin
Expand Down
2 changes: 1 addition & 1 deletion test/function_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ for i in 1:length(nodes)
end

for i in 1:length(edges)
PlasmoData.add_edge!(ddg, edges[i])
add_edge!(ddg, edges[i])
add_edge_data!(ddg, edges[i], edge_data[i])
end

Expand Down

0 comments on commit 24ae7bb

Please sign in to comment.