Repository navigation
v0.12.2
Patch changes
-
081c437: kgdiff reads GEXF (1.1 to 1.3), the format of Gephi, which NetworkX writes too (
write_gexf):kgdiff a.gexf b.gexf,parseGraph(text, { format: 'gexf' })andFormatId::Gexfin Rust, detected from the.gexfextension and from the content.Like GraphML, a GEXF document is read as node-link data and then as every JSON graph. A node's
labelis its label, unless it only repeats the id, as NetworkX writes it for a node without one. An edge has itsid,labeland numericweight; itskind(GEXF 1.3) is the relation, and so is atypethat does not name a direction, which is where NetworkX writes an edge attribute of that name.<attvalue>values are fields named by their attribute'stitleand typed by itstype, with the attribute's<default>where a node or an edge has none, within the same limit as GraphML. An undirected edge has its ends in one order. The numbers Gephi and NetworkX give edges are read as edge ids, which play no part in a comparison unless--edge-identity idasks for it.With a warning each:
viz:elements are dropped (gexf-ignored-viz), a dynamic graph is read as one static graph (gexf-dynamic), nodes inside other nodes are plain nodes (gexf-hierarchy), and a value that is not of its type stays text (gexf-invalid-value). Formats has the mapping.New in the types: the format
gexfand four warning codes; with GraphML,FormatId::ALLhas ten entries. GEXF read as RDF/XML says which format to read it with. With GraphML and GEXF read, the only formats kgdiff recognises and does not read are the OWL syntaxes other than RDF/XML.@kgdiff/cli·@kgdiff/core·@kgdiff/compute -
102ce48: kgdiff reads GraphML:
kgdiff a.graphml b.graphml,parseGraph(text, { format: 'graphml' })andFormatId::GraphMlin Rust, detected from the.graphmlextension and from the content. It is what NetworkX (write_graphml), igraph and yEd write, and what LightRAG keeps its graph in, so comparing two runs no longer needs an export to JSON first.A GraphML document is read as the node-link data NetworkX gives the same graph, and then as every JSON graph:
label,nameortitleis the label,typethe type,relationthe predicate, the rest attributes. Values are typed by their key'sattr.type(numbers, booleans, also Python'sTrueandFalse), and a key's<default>fills the elements that have no<data>for it. An undirected edge has its ends in one order, so thata – bin one run andb – ain the next are the same edge. yEd's node and edge labels, which it keeps in its drawing data, are the labels.With a warning each: nested graphs are merged into one (
graphml-merged-graphs),<hyperedge>and<port>are skipped (graphml-unsupported-elements), drawing data is dropped (graphml-ignored-data), a value that is not of its type stays text (graphml-invalid-value), and edge ids that edges share, as in a multigraph NetworkX writes, are not read (graphml-shared-edge-ids). A document whose<default>values would add more fields than it has bytes (a million for a small one) is refused. Formats has the mapping and says where a graph saved as GraphML and as node-link JSON still differ.New in the types: the format
graphml(FormatId,FORMAT_EXTENSIONS,--format graphml) and five warning codes (ParseWarningCode). Aswitchover either needs itsdefaultbranch, as Versioning says; in Rust the enums are#[non_exhaustive]. GraphML read as RDF/XML (--format rdfxml) now says which format to read it with.@kgdiff/cli·@kgdiff/core·@kgdiff/compute -
efc3b7c: Shell completions:
kgdiff completion <bash|zsh|fish>prints a completion script for the shell. It completes the options (long and short), the values of the options that take one of a fixed set (--format,--match,--edge-identity,--theme,--mode,--scope,--color,--localeand the two per-side formats), file names where a file is expected, and theapply,helpandcompletioncommands with their own options. Load it when the shell starts (eval "$(kgdiff completion bash)"in~/.bashrc,source <(kgdiff completion zsh)in~/.zshrcaftercompinit,kgdiff completion fish | sourceinconfig.fish), or write it once to a directory the shell reads completions from (docs/cli.md says which, for each shell). The scripts are generated from the tables the command line is parsed with, so they list exactly the options of the version that printed them;kgdiff help completionhas the details.completionis a command as the first argument, likeapplyandhelp: to compare a file of that name, write it as a path (./completion).@kgdiff/cli -
d512b4f: The graph canvas shows its focus ring. The canvas is the viewer's first tab stop, and the viewer's stylesheet draws a ring on it when the keyboard moves focus there, but the renderer set
outline: noneon the canvas inline, which beat that rule: focus on the canvas was invisible.@kgdiff/rendererno longer sets an inline outline. A page that uses the renderer on its own and makes the canvas focusable now gets the browser's default ring unless its styles say otherwise.@kgdiff/renderer·@kgdiff/viewer -
eeb078b:
<kgdiff-viewer>inside a page's own<main>(orrole="main") is a region named after the graph, not a second main landmark. A page has one main landmark and they do not nest, so an embedded viewer made a screen reader's list of landmarks say "main" twice, one inside the other. On a page without a main landmark around it, such as an HTML report, the viewer is the main landmark as before. It looks at its ancestors, through slots and shadow roots, when it is connected.@kgdiff/viewer
Every package is at 0.12.2: @kgdiff/cli · @kgdiff/core · @kgdiff/layout · @kgdiff/scene · @kgdiff/renderer · @kgdiff/viewer · @kgdiff/g6 · @kgdiff/compute.
GitHub Action: uses: iiwish/kgdiff@v0.12.2.