Skip to content
Merged
Show file tree
Hide file tree
Changes from 56 commits
Commits
Show all changes
60 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
f5571b0
Interface cleanup
jack-dunham Feb 2, 2026
152df4c
fix type in partitioned graphs extension
jack-dunham Feb 2, 2026
39f24e2
Fix missing `throw` function calls
jack-dunham Feb 2, 2026
cf6942f
Fix implementation forwarding
jack-dunham Feb 2, 2026
99da89f
Remove unnecessary type param
jack-dunham Feb 2, 2026
1c8616e
Fix filling of data using .= when graph is empty
jack-dunham Feb 2, 2026
06eb7cc
DataViews now use #undef to indicate missing data; fixed some bugs re…
jack-dunham Feb 2, 2026
c1a8e6d
Add `DataViewSlice` object
jack-dunham Feb 3, 2026
74df9a3
Tests
jack-dunham Feb 3, 2026
3d4472e
Bug fixes regarding `keys` wrapper.
jack-dunham Feb 3, 2026
9dcfcb6
Remove support for unset! rename has_x_data -> is_x_assigned
jack-dunham Feb 5, 2026
9323b72
Add data graph indexing for PartitionedGraph type
jack-dunham Feb 5, 2026
ebd5a1e
Fix rem_x! return types
jack-dunham Feb 5, 2026
c4d8c07
Make AbstractDataView not insertable
jack-dunham Feb 5, 2026
7744d19
Rename is_index_assigned -> is_graph_index_assigned
jack-dunham Feb 5, 2026
61dc816
Improve default behaviour of data indexing with quotients.
jack-dunham Feb 5, 2026
b863965
Fix methods involving setindex! returning wrong type.
jack-dunham Feb 5, 2026
14b82c9
Remove `vertices_data_eltype` and `edges_data_eltype` functions.
jack-dunham Feb 6, 2026
0e8dff6
Remove some methods for `AbstractDataGraph` that have existing sensib…
jack-dunham Feb 6, 2026
54daba5
Remove some commented-out code
jack-dunham Feb 6, 2026
64a79cc
Add code comment regarding branch in `departition(::DataGraph)`
jack-dunham Feb 6, 2026
118e03f
Remove `is_vertices_assigned` etc
jack-dunham Feb 6, 2026
f5320fc
Remove trailing .0 in compat entries
jack-dunham Feb 6, 2026
ad863d3
Improve codestyle of some functions that check for exceptional cases.
jack-dunham Feb 6, 2026
14257ac
Remove data tranformation kwargs to `quotient_graph` function.
jack-dunham Feb 6, 2026
1fd424e
Improve consistency of graph and dataview indexing with `Indices`; fi…
jack-dunham Feb 6, 2026
5d376d1
Return value codestyle
jack-dunham Feb 6, 2026
59be2b8
Indexing into `AbstractDataView` with `Indices` no longer constructs …
jack-dunham Feb 6, 2026
bb845f4
Rename `DataViewSlice` -> `SubDataView`
jack-dunham Feb 6, 2026
51cfcb8
Merge branch 'main' into partitions
mtfishman Feb 6, 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"
version = "0.3.0"
authors = ["Matthew Fishman <mfishman@flatironinstitute.org> and contributors"]
version = "0.2.13"

[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.10"
SimpleTraits = "0.9"
julia = "1.7"

Expand Down
4 changes: 2 additions & 2 deletions 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"
Documenter = "1.10.0"
DataGraphs = "0.3"
Documenter = "1.10"
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"
Graphs = "1.12"
NamedGraphs = "0.6.5, 0.7, 0.8"
NamedGraphs = "0.10"
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