Skip to content

v0.15.0

Choose a tag to compare

@github-actions github-actions released this 19 Feb 19:09
· 36 commits to master since this release
519770d

MultiScaleTreeGraph v0.15.0

Diff since v0.14.4

Breaking Changes

  • symbol and link are now represented as Symbol internally and in accessors.
  • Code that compared against strings must be updated (example: "Leaf" -> :Leaf).
  • read_mtg now always uses the typed columnar attribute backend (ColumnarAttrs).
  • The old “choose any attribute container backend at read time” workflow is removed.
  • Table output was streamlined:
  • to_table is now the main public table entrypoint.
  • Root metadata fields :description, :symbols, :scales are no longer regular columns in to_table(...) output.
  • If you relied on those columns, migrate to root attributes/metadata access.
  • type= in descendants / descendants! / ancestors / ancestors! is deprecated (not removed yet).
  • insert_node! is deprecated in favor of insert_parent!.

Migration Guide

  • Symbol/link comparisons and filters:
# Before
symbol(node) == "Leaf"
descendants(mtg, :Length, symbol="Leaf", link="<")

# After
symbol(node) == :Leaf
descendants(mtg, :Length, symbol=:Leaf, link=:<)
  • Attribute access/update:
# Before
node_attributes(node)[:Width]
node_attributes(node)[:Width] = 1.0

# After
node[:Width]
node[:Width] = 1.0

# Also available
attribute(node, :Width)
attribute!(node, :Width, 1.0)
attributes(node, format=:dict)
attribute_names(node)
  • Traversal return typing:
# Before
descendants(mtg, :Length, type=Union{Nothing, Float64})

# After
descendants(mtg, :Length)  # type inferred automatically
  • Table conversion:
# Preferred public API
tbl = to_table(mtg)                         # unified
leaf_tbl = to_table(mtg, symbol=:Leaf)      # per-symbol
small_tbl = to_table(mtg, vars=[:Length])   # selected vars
  • If you use DataFrames:
using DataFrames
df = DataFrame(mtg)                 # via Tables.jl interface
df2 = to_table(mtg, sink=DataFrame) # explicit sink

All Changes

Performance and traversal

  • Major tree traversal/query optimization work.
  • Improved descendants/ancestors performance and type stability.
  • Hybrid descendants strategy support (descendants_strategy, descendants_strategy!) for growth-heavy vs query-heavy workflows.
  • PR: #80
  • PR: #88

Core API/data model

  • symbol and link moved to Symbol-based representation for faster comparisons and lower allocation pressure.

  • PR: #81

  • Attributes moved to typed table-backed storage (columnar, per symbol).

  • New/expanded attribute APIs:

  • attribute, attribute!, attributes, attribute_names

  • add_column!, drop_column!, rename_column!

  • PR: #82

Tables integration and tabular workflows

  • MTG now cleanly exposes Tables.jl interface.
  • to_table is the public generic entrypoint with optional symbol, vars, and sink.
  • DataFrames is no longer a hard dependency of the package; DataFrame(mtg) still works when DataFrames is loaded.
  • Table pretty-printing improved.
  • Metadata (symbols, scales) displayed as metadata/headers, not as regular data columns.

Benchmarks and CI

  • Benchmark suite cleanup and simplification after API consolidation.

  • PR: #89

  • GitHub Actions dependency updates:

  • julia-actions/cache v1 -> v2 (#83)

  • actions/checkout v4 -> v6 (#84)

  • codecov/codecov-action v4 -> v5 (#85)

  • julia-actions/setup-julia v1 -> v2 (#86)

  • MetaGraphsNext compat extended to include 0.8 (#87)

New Contributors

Full Changelog

Merged pull requests:

  • Optimization of tree traversal (#80) (@VEZY)
  • Use symbols for mtg link and symbol (#81) (@VEZY)
  • Attributes as table (#82) (@VEZY)
  • Bump julia-actions/cache from 1 to 2 (#83) (@dependabot[bot])
  • Bump actions/checkout from 4 to 6 (#84) (@dependabot[bot])
  • Bump codecov/codecov-action from 4 to 5 (#85) (@dependabot[bot])
  • Bump julia-actions/setup-julia from 1 to 2 (#86) (@dependabot[bot])
  • Update MetaGraphsNext requirement from 0.5, 0.6, 0.7 to 0.5, 0.6, 0.7, 0.8 (#87) (@dependabot[bot])
  • Optimize traversal and queries (#88) (@VEZY)
  • Update benchmarks.jl -> remove dead code (#89) (@VEZY)

Closed issues:

  • Use traversal_cache for descendants (#42)
  • Ensure type stability in the MTG traversal (#51)
  • Add Tables.jl interface instead of DataFrame (#65)
  • Use symbols for MTG description (#74)
  • Add doc on traversal (#75)
  • MultiScaleTreeGraph.traverse too slow (#78)
  • Non-recursive traversal (#79)