Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a06ca9c
Refactor interface to make more abstract; have `AbstractDataGraph` su…
jack-dunham Dec 3, 2025
c9eaeb0
Fix method overwrites
jack-dunham Dec 3, 2025
692b7b6
Remove `NamedGraphs` ext and move code to core module
jack-dunham Dec 3, 2025
accfdcb
Make `rename_vertices` generic by making use of `similar_graph` from …
jack-dunham Dec 4, 2025
b282355
Get `vertex_data_eltype` and `edge_data_eltype` directly from type pa…
jack-dunham Dec 4, 2025
8e85d6b
Add `Vertex/EdgeDataView` wrappers that lazily act like Dictionaries
jack-dunham Dec 4, 2025
e5e8860
The underlying graph type of `DataGraph` now must be a `AbstractNamed…
jack-dunham Dec 4, 2025
7c07b7f
Make `Base.reverse` method `AbstractDataGraph` more generic.
jack-dunham Dec 4, 2025
6b48268
Remove surplus code
jack-dunham Dec 4, 2025
f0e5bce
`PartitionedGraphs` extension for `DataGraphs`.
jack-dunham Nov 24, 2025
1fcb8e6
Write interface in terms of `vertex_data` and `edge_data` rather than…
jack-dunham Nov 25, 2025
925e77b
Interface is now defined in terms of `getindex`.
jack-dunham Dec 1, 2025
b48acab
Add `setindex!` fallback methods.
jack-dunham Dec 2, 2025
ae97f77
DataViews now use a lazy filter to construct keys
jack-dunham Dec 11, 2025
bb9e47c
Remove redundant methods
jack-dunham Dec 11, 2025
f51f127
Improve and reorganise indexing interface
jack-dunham Dec 11, 2025
58f0c89
Apply new interface to PartitionedGraphs extension
jack-dunham Dec 11, 2025
9406bf0
Use `quotient_index` function to wrap vertices and edges
jack-dunham Dec 12, 2025
3fd47f4
Move non-abstract function to `abstractdatagraph.jl`
jack-dunham Jan 5, 2026
05ed524
Update PartitionedGraphs extensions
jack-dunham Jan 5, 2026
be9c19a
Fix tokenized setindex! for data view objects.
jack-dunham Jan 9, 2026
1cad908
Version bump and NamedGraphs compat.
jack-dunham Jan 9, 2026
260035a
Use correct `to_quotient_index` instead of `quotient_index`.
jack-dunham Jan 12, 2026
61e2f1d
Indexing with `AbstractGraphIndices` now returns a subgraph.
jack-dunham Jan 12, 2026
f70e95d
Fix: `getindex` now constructs a `edge_subgraph` when given edges
jack-dunham Jan 12, 2026
446a0e2
Indexing with multiple edges is now undefined, throwing a method error
jack-dunham Jan 13, 2026
ebe0e93
Remove duplicate method by using union type QuotientVertexOrVerticesV…
jack-dunham Jan 13, 2026
f25331d
Rename `vertex_data_eltype` -> `vertex_data_type`, and similarly for …
jack-dunham Jan 13, 2026
90cf068
Can now assign to `VertexDataView` and `EdgeDataView` using `.=` syntax.
jack-dunham Jan 13, 2026
cccea6c
Interface overhaul
jack-dunham Jan 27, 2026
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
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "DataGraphs"
uuid = "b5a273c3-7e6c-41f6-98bd-8d7f1525a36a"
authors = ["Matthew Fishman <mfishman@flatironinstitute.org> and contributors"]
version = "0.2.13"
version = "0.3.0"

[deps]
Dictionaries = "85a47980-9c8c-11e8-2b9f-f7ca1fa99fb4"
Expand All @@ -19,7 +19,7 @@ DataGraphsGraphsFlowsExt = "GraphsFlows"
Dictionaries = "0.4"
Graphs = "1"
GraphsFlows = "0.1.1"
NamedGraphs = "0.8.2"
NamedGraphs = "0.9.0"
SimpleTraits = "0.9"
julia = "1.7"

Expand Down
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"

[compat]
DataGraphs = "0.2.6"
DataGraphs = "0.3.0"
Documenter = "1.10.0"
Literate = "2.20.1"
4 changes: 2 additions & 2 deletions examples/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
NamedGraphs = "678767b0-92e7-4007-89e4-4527a8725b19"

[compat]
DataGraphs = "0.2.6"
DataGraphs = "0.3.0"
Graphs = "1.12"
NamedGraphs = "0.6.5, 0.7, 0.8"
NamedGraphs = "0.9.0"
18 changes: 10 additions & 8 deletions examples/datagraph.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
using DataGraphs: DataGraph
using Graphs: Edge, grid, has_edge, has_vertex
using Graphs: has_edge, has_vertex
using NamedGraphs: NamedEdge
using NamedGraphs.NamedGraphGenerators: named_grid

g = grid((4,))
dg = DataGraph(g; vertex_data_eltype = String, edge_data_eltype = Symbol)
@show !isassigned(dg, Edge(1, 2))
g = named_grid((4))
dg = DataGraph(g; vertex_data_type = String, edge_data_type = Symbol)
@show !isassigned(dg, NamedEdge(1, 2))
@show !isassigned(dg, 1 => 2)
@show !isassigned(dg, Edge(1 => 2))
@show !isassigned(dg, NamedEdge(1 => 2))
@show !isassigned(dg, 1 => 3)
@show !isassigned(dg, 1)
@show !isassigned(dg, 2)
Expand Down Expand Up @@ -33,10 +35,10 @@ dg[4] = "V4"

dg[1 => 2] = :E12
dg[2 => 3] = :E23
dg[Edge(3, 4)] = :E34
dg[NamedEdge(3, 4)] = :E34
#@show isassigned(dg, (1, 2))
@show isassigned(dg, Edge(2, 3))
@show isassigned(dg, NamedEdge(2, 3))
@show isassigned(dg, 3 => 4)
@show dg[Edge(1, 2)] == :E12
@show dg[NamedEdge(1, 2)] == :E12
@show dg[2 => 3] == :E23
@show dg[3 => 4] == :E34
2 changes: 1 addition & 1 deletion examples/disjoint_union.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ using NamedGraphs.GraphsExtensions: ⊔
using NamedGraphs.NamedGraphGenerators: named_grid
using DataGraphs: DataGraph

g = DataGraph(named_grid((2, 2)); vertex_data_eltype = String, edge_data_eltype = String)
g = DataGraph(named_grid((2, 2)); vertex_data_type = String, edge_data_type = String)

for v in vertices(g)
g[v] = "V$v"
Expand Down
2 changes: 1 addition & 1 deletion examples/multidimdatagraph_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ using Graphs: grid, has_edge, has_vertex
using NamedGraphs: NamedGraph, NamedEdge

g = NamedGraph(grid((4,)), ["A", "B", "C", "D"])
dg = DataGraph(g; vertex_data_eltype = String, edge_data_eltype = Symbol)
dg = DataGraph(g; vertex_data_type = String, edge_data_type = Symbol)

@show has_vertex(dg, "A")
@show has_vertex(dg, "D")
Expand Down
2 changes: 1 addition & 1 deletion examples/multidimdatagraph_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ using NamedGraphs: NamedEdge
using NamedGraphs.NamedGraphGenerators: named_grid

g = named_grid((2, 2))
dg = DataGraph(g; vertex_data_eltype = String, edge_data_eltype = String)
dg = DataGraph(g; vertex_data_type = String, edge_data_type = String)

dg[1, 1] = "X11"

Expand Down
2 changes: 1 addition & 1 deletion examples/slicing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ using NamedGraphs.NamedGraphGenerators: named_grid
using Graphs: ne, nv

g = named_grid((2, 2))
dg = DataGraph(g; vertex_data_eltype = String, edge_data_eltype = String)
dg = DataGraph(g; vertex_data_type = String, edge_data_type = String)

dg[1, 1] = "V11"
dg[1, 2] = "V12"
Expand Down
40 changes: 0 additions & 40 deletions ext/DataGraphsNamedGraphsExt/DataGraphsNamedGraphsExt.jl

This file was deleted.

7 changes: 4 additions & 3 deletions src/DataGraphs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ module DataGraphs

include("utils.jl")
include("traits/isunderlyinggraph.jl")
include("dataview.jl")
include("abstractdatagraph.jl")
include("indexing.jl")
include("datagraph.jl")
# TODO: Turn into a weak dependency once `GraphsExtensions`
# is split off from `NamedGraphs`.
include("../ext/DataGraphsNamedGraphsExt/DataGraphsNamedGraphsExt.jl")
# TODO: Turn into an extension once `PartitionedGraphs` is excised.
include("lib/DataGraphsPartitionedGraphsExt/src/DataGraphsPartitionedGraphsExt.jl")

export AbstractDataGraph, DataGraph

Expand Down
Loading
Loading