diff --git a/Project.toml b/Project.toml index 76b9265..5444acf 100644 --- a/Project.toml +++ b/Project.toml @@ -1,15 +1,15 @@ name = "MetaGraphs" uuid = "626554b9-1ddb-594c-aa3c-2596fe9399a5" -version = "0.6.8" +version = "0.7.0" [deps] +Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6" JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819" -LightGraphs = "093fc24a-ae57-5d10-9952-331d41423f4d" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" [compat] +Graphs = "1.4" JLD2 = "0.1.11, 0.2, 0.3, 0.4" -LightGraphs = "1.3.5" julia = "1" [extras] diff --git a/README.md b/README.md index 749e45e..cb3e589 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,7 @@ [![Codecov branch][codecov-img]][codecov-url] [![](https://img.shields.io/badge/docs-latest-blue.svg)](https://juliagraphs.github.io/MetaGraphs.jl/latest) -**Project Status:** As of 8 October 2021 MetaGraphs is no longer under active development. It will remain available on Github at [sbromberger/MetaGraphs.jl](/~https://github.com/sbromberger/MetaGraphs.jl). The JuliaGraphs organization will continue to maintain packages that use MetaGraphs and transition development over the long term. - -[LightGraphs.jl](/~https://github.com/JuliaGraphs/LightGraphs.jl) graphs with arbitrary metadata. +[MetaGraphs.jl](/~https://github.com/JuliaGraphs/MetaGraphs.jl) graphs with arbitrary metadata. [build-img]: /~https://github.com/JuliaGraphs/Metagraphs.jl/workflows/CI/badge.svg?branch=master [build-url]: /~https://github.com/JuliaGraphs/Metagraphs.jl/actions?query=workflow%3ACI @@ -25,7 +23,7 @@ add MetaGraphs ## Example Usage ```julia -julia> using LightGraphs, MetaGraphs +julia> using Graphs, MetaGraphs # create a standard simplegraph julia> g = path_graph(5) @@ -87,7 +85,7 @@ Dict{Symbol,Any} with 0 entries julia> props(mg, 2) Dict{Symbol,Any} with 0 entries -# all LightGraphs analytics work +# all Graphs.jl analytics work julia> betweenness_centrality(mg) 5-element Array{Float64,1}: 0.0 diff --git a/docs/oldmkdocsyml b/docs/oldmkdocsyml index 0c6a363..3de8d0b 100644 --- a/docs/oldmkdocsyml +++ b/docs/oldmkdocsyml @@ -1,6 +1,6 @@ site_name: MetaGraphs.jl repo_url: /~https://github.com/JuliaGraphs/MetaGraphs.jl -site_description: Metadata for LightGraphs +site_description: Metadata for Graphs.jl site_author: Seth Bromberger theme: readthedocs diff --git a/src/MetaGraphs.jl b/src/MetaGraphs.jl index 368868e..e3ef01e 100644 --- a/src/MetaGraphs.jl +++ b/src/MetaGraphs.jl @@ -1,5 +1,5 @@ module MetaGraphs -using LightGraphs +using Graphs using JLD2 import Base: @@ -9,7 +9,7 @@ import Base: import Random: randstring, seed! -import LightGraphs: +import Graphs: AbstractGraph, src, dst, edgetype, nv, ne, vertices, edges, is_directed, add_vertex!, add_edge!, rem_vertex!, rem_edge!, @@ -19,7 +19,7 @@ import LightGraphs: loadgraph, savegraph, AbstractGraphFormat, reverse -import LightGraphs.SimpleGraphs: +import Graphs.SimpleGraphs: AbstractSimpleGraph, SimpleGraph, SimpleDiGraph, SimpleEdge, fadj, badj @@ -194,7 +194,7 @@ MetaWeights(g::AbstractMetaGraph) = MetaWeights{eltype(g),eltype(g.defaultweight function getindex(w::MetaWeights{T,U}, u::Integer, v::Integer)::U where T <: Integer where U <: Real _e = Edge(u, v) - e = !w.directed && !LightGraphs.is_ordered(_e) ? reverse(_e) : _e + e = !w.directed && !Graphs.is_ordered(_e) ? reverse(_e) : _e !haskey(w.eprops, e) && return w.defaultweight return U(get(w.eprops[e], w.weightfield, w.defaultweight)) end diff --git a/src/metagraph.jl b/src/metagraph.jl index 94453cb..967a0d7 100644 --- a/src/metagraph.jl +++ b/src/metagraph.jl @@ -55,12 +55,12 @@ is_directed(g::MetaGraph) = false weighttype(g::MetaGraph{T,U}) where T where U = U function props(g::MetaGraph, _e::SimpleEdge) - e = LightGraphs.is_ordered(_e) ? _e : reverse(_e) + e = Graphs.is_ordered(_e) ? _e : reverse(_e) get(PropDict, g.eprops, e) end function set_props!(g::MetaGraph, _e::SimpleEdge, d::Dict) - e = LightGraphs.is_ordered(_e) ? _e : reverse(_e) + e = Graphs.is_ordered(_e) ? _e : reverse(_e) if has_edge(g, e) if !_hasdict(g, e) g.eprops[e] = d diff --git a/test/dotformat.jl b/test/dotformat.jl index 3a3843d..fad114a 100644 --- a/test/dotformat.jl +++ b/test/dotformat.jl @@ -1,6 +1,6 @@ using MetaGraphs using Test -using LightGraphs +using Graphs property_set=[ (src="thirty",dst="inf",color="missing",penwidth="missing",style="missing",), diff --git a/test/metagraphs.jl b/test/metagraphs.jl index 2fcb5dd..7de7bd1 100644 --- a/test/metagraphs.jl +++ b/test/metagraphs.jl @@ -1,5 +1,5 @@ using MetaGraphs -import LightGraphs: SimpleGraphs +import Graphs: SimpleGraphs import Base64: stringmime @@ -32,8 +32,8 @@ import Base64: @test eltype(@inferred(MetaGraph{UInt8,Float16}(mg))) == UInt8 @test weighttype(@inferred(MetaGraph{UInt8,Float16}(mg))) == Float16 - @test @inferred(MetaGraphs.fadj(mg, 2)) == LightGraphs.SimpleGraphs.fadj(g, 2) - @test @inferred(MetaGraphs.badj(mg, 2)) == LightGraphs.SimpleGraphs.badj(g, 2) + @test @inferred(MetaGraphs.fadj(mg, 2)) == Graphs.SimpleGraphs.fadj(g, 2) + @test @inferred(MetaGraphs.badj(mg, 2)) == Graphs.SimpleGraphs.badj(g, 2) @test @inferred(edgetype(mg)) == edgetype(mg.graph) @@ -88,8 +88,8 @@ import Base64: @test eltype(@inferred(MetaDiGraph{UInt8,Float16}(mg))) == UInt8 @test weighttype(@inferred(MetaDiGraph{UInt8,Float16}(mg))) == Float16 - @test @inferred(MetaGraphs.fadj(mg, 2)) == LightGraphs.SimpleGraphs.fadj(g, 2) - @test @inferred(MetaGraphs.badj(mg, 2)) == LightGraphs.SimpleGraphs.badj(g, 2) + @test @inferred(MetaGraphs.fadj(mg, 2)) == Graphs.SimpleGraphs.fadj(g, 2) + @test @inferred(MetaGraphs.badj(mg, 2)) == Graphs.SimpleGraphs.badj(g, 2) @test @inferred(edgetype(mg)) == edgetype(mg.graph) diff --git a/test/runtests.jl b/test/runtests.jl index db4731c..d562e53 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,8 +1,8 @@ -using LightGraphs +using Graphs using MetaGraphs using Test -import LightGraphs.SimpleGraphs: SimpleGraph, SimpleDiGraph +import Graphs.SimpleGraphs: SimpleGraph, SimpleDiGraph const testdir = @__DIR__