Skip to content

Commit

Permalink
LGPersistence -> GraphIO
Browse files Browse the repository at this point in the history
  • Loading branch information
sbromberger committed Apr 19, 2017
1 parent 18983bc commit 55b476a
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ notifications:
script:
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
- julia -e 'Pkg.add("LightGraphs"); Pkg.checkout("LightGraphs", "sbromberger/lightening-lightgraphs")'
- julia -e 'Pkg.clone(pwd()); Pkg.build("LightGraphsPersistence"); Pkg.test("LightGraphsPersistence"; coverage=true)'
- julia -e 'Pkg.clone(pwd()); Pkg.build("GraphIO"); Pkg.test("GraphIO"; coverage=true)'

after_success:
- julia -e 'cd(Pkg.dir("LightGraphsPersistence")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(process_folder()); Codecov.submit(process_folder())'
- julia -e 'cd(Pkg.dir("GraphIO")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(process_folder()); Codecov.submit(process_folder())'
- julia -e 'Pkg.add("Documenter")'
- julia -e 'cd(Pkg.dir("LightGraphsPersistence")); include(joinpath("docs", "make.jl"))'
- julia -e 'cd(Pkg.dir("GraphIO")); include(joinpath("docs", "make.jl"))'
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The LightGraphsPersistence.jl package is licensed under the MIT "Expat" License:
The GraphIO.jl package is licensed under the MIT "Expat" License:

> Copyright (c) 2017: Seth Bromberger.
>
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# LightGraphsPersistence
# GraphIO

[![Build Status](https://travis-ci.org/sbromberger/LightGraphsPersistence.jl.svg?branch=master)](https://travis-ci.org/sbromberger/LightGraphsPersistence.jl)
[![Build Status](https://travis-ci.org/sbromberger/GraphIO.jl.svg?branch=master)](https://travis-ci.org/sbromberger/GraphIO.jl)

[![Coverage Status](https://coveralls.io/repos/sbromberger/LightGraphsPersistence.jl/badge.svg?branch=master&service=github)](https://coveralls.io/github/sbromberger/LightGraphsPersistence.jl?branch=master)
[![Coverage Status](https://coveralls.io/repos/sbromberger/GraphIO.jl/badge.svg?branch=master&service=github)](https://coveralls.io/github/sbromberger/GraphIO.jl?branch=master)

[![codecov.io](http://codecov.io/github/sbromberger/LightGraphsPersistence.jl/coverage.svg?branch=master)](http://codecov.io/github/sbromberger/LightGraphsPersistence.jl?branch=master)
[![codecov.io](http://codecov.io/github/sbromberger/GraphIO.jl/coverage.svg?branch=master)](http://codecov.io/github/sbromberger/GraphIO.jl?branch=master)
2 changes: 1 addition & 1 deletion src/LightGraphsPersistence.jl → src/GraphIO.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__precompile__(true)
module LightGraphsPersistence
module GraphIO

using LightGraphs

Expand Down
2 changes: 1 addition & 1 deletion src/gexf.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ function savegexf(io::IO, g::LightGraphs.AbstractGraph, gname::String)
end

savegraph(io::IO, g::AbstractGraph, gname::String, ::GEXFFormat) = savegexf(io, g, gname)
savegraph(io::IO, g::AbstractGraph, ::GEXFFormat) = savelg(io, g, "graph")
savegraph(io::IO, g::AbstractGraph, ::GEXFFormat) = savegexf(io, g, "graph")
14 changes: 7 additions & 7 deletions test/persistence.jl → test/graphio.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using LightGraphs
using LightGraphsPersistence
using GraphIO

pdict = loadgraphs(joinpath(testdir,"testdata","tutte-pathdigraph.jgz"))
p1 = pdict["Tutte"]
Expand All @@ -16,7 +16,7 @@ using LightGraphsPersistence
if remove
rm(fname)
else
info("persistence/readback_test: Left temporary file at: $fname")
info("graphio/readback_test: Left temporary file at: $fname")
end
end

Expand Down Expand Up @@ -104,8 +104,8 @@ end
n3 = (460175067, UInt8.([126; 126; 63; 90; 90; 90; 90; 90]))
ns = [n1; n2; n3]
for n in ns
@test LightGraphsPersistence._g6_N(n[1]) == n[2]
@test LightGraphsPersistence._g6_Np(n[2])[1] == n[1]
@test GraphIO._g6_N(n[1]) == n[2]
@test GraphIO._g6_Np(n[2])[1] == n[1]
end

gs = loadgraphs(joinpath(testdir,"testdata", "twographs.g6"), Graph6Format())
Expand All @@ -123,7 +123,7 @@ end
close(fio)
d = Dict{String, LightGraphs.Graph}("g1"=>CompleteGraph(10), "g2"=>PathGraph(5), "g3" => WheelGraph(7))
@test savegraph(f,d, Graph6Format()) == 3
g6graphs = LightGraphsPersistence.loadgraph6_mult(fio)
g6graphs = GraphIO.loadgraph6_mult(fio)
for (gname, g) in g6graphs
@test g == d[gnames]
end
Expand Down Expand Up @@ -178,10 +178,10 @@ end

for (i,g) in enumerate(graphs)
eprop = Dict{LightGraphs.Edge, Char}([(e, Char(i)) for e in LightGraphs.edges(g)])
net = LightGraphsPersistence.Network{LightGraphs.Graph, Int, Char}(g, 1:nv(g), eprop)
net = GraphIO.Network{LightGraphs.Graph, Int, Char}(g, 1:nv(g), eprop)
path = joinpath(testdir,"testdata", "test.$i.jld")
nsaved = write_readback(path, net)
@test LightGraphsPersistence.Network(nsaved) == net
@test GraphIO.Network(nsaved) == net
#delete the file (it gets left on test failure so you could debug it)
rm(path)
end
Expand Down
4 changes: 2 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using LightGraphsPersistence
using GraphIO
using LightGraphs
using Base.Test

testdir = dirname(@__FILE__)

# write your own tests here
include("persistence.jl")
include("graphio.jl")

0 comments on commit 55b476a

Please sign in to comment.