Skip to content
Novus Examples
graphml3.8 KB

Dependency Graph (GraphML)

The dependency graph in GraphML, with typed attribute keys for node version, licence and depth and for edge range — the interchange format graph databases and analysis tools import. Every package, version, hash and licence is fictional — the tree describes nothing real.

Preview — first 50 linesgraphml
<?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
  <!-- SAMPLE — fictional supply-chain data. Every package, registry, version, hash, licence, advisory identifier and signature in this document is invented. -->
  <key id="version" for="node" attr.name="version" attr.type="string"/>
  <key id="license" for="node" attr.name="license" attr.type="string"/>
  <key id="depth" for="node" attr.name="depth" attr.type="int"/>
  <key id="range" for="edge" attr.name="range" attr.type="string"/>
  <graph id="orchard-gateway" edgedefault="directed">
    <node id="@orchard-example/gateway">
      <data key="version">4.2.0</data>
      <data key="license">Apache-2.0</data>
      <data key="depth">0</data>
    </node>
    <node id="@orchard-example/router">
      <data key="version">2.1.3</data>
      <data key="license">Apache-2.0</data>
      <data key="depth">1</data>
    </node>
    <node id="@orchard-example/http-core">
      <data key="version">1.8.0</data>
      <data key="license">MIT</data>
      <data key="depth">1</data>
    </node>
    <node id="example-metrics">
      <data key="version">4.0.0</data>
      <data key="license">MIT</data>
      <data key="depth">1</data>
    </node>
    <node id="example-cache">
      <data key="version">0.9.2</data>
      <data key="license">BSD-3-Clause</data>
      <data key="depth">1</data>
    </node>
    <node id="example-crypto-shim">
      <data key="version">1.2.0</data>
      <data key="license">MIT</data>
      <data key="depth">1</data>
    </node>
    <node id="example-logger">
      <data key="version">3.4.1</data>
      <data key="license">MIT</data>
      <data key="depth">2</data>
    </node>
    <node id="example-retry">
      <data key="version">1.0.4</data>
      <data key="license">ISC</data>
      <data key="depth">2</data>
    </node>
99 lines total — download for the full file.

Specifications

Seed
51200
Sample Only
true
Format
GraphML
Nodes
10
Edges
10
Node Attributes
3
Edge Attributes
1
Edgedefault
directed
Line Endings
LF

Testing contract

Expected to pass
Scenario
Import a dependency graph into a graph-analysis tool and query it.
Expected result
Import yields 10 nodes and 10 directed edges with typed attributes; the depth attribute loads as an integer, not as a string.

What is a .graphml file?

GraphML is an XML-based format for describing graphs — nodes, edges, and typed attributes (keys) on either. It supports directed and undirected graphs, and is widely read by network tools such as Gephi, NetworkX, and yEd. Being plain XML, it is human-readable and easy to transform.

How to use this file

Use an example GraphML file to test graph and network importers, layout tools, and converters between GraphML, GEXF, and adjacency formats, or to verify that node and edge attributes survive a round-trip.

How to use this file for testing

“Dependency Graph (GraphML)” is a deterministic Novus Examples fixture for Graph data, Conversion testing, Data import. Node/edge datasets in GraphML and GEXF (directed and undirected, with attributes and weights) — for testing network importers, layout tools, and graph converters.

Documented properties for this file: seed 51200 · 10 nodes · 10 edges · LF. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.

Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.

SBOM, lockfile, provenance, and advisory fixtures describe the same fabricated component tree across formats, so a converter or scanner can be diffed against a known answer. Every package name, version, hash, and advisory ID is invented — never treat a finding here as real.

Code examples

import networkx as nx  # pip install networkx

G = nx.read_graphml("dependency-graph.graphml")
print(G.number_of_nodes(), "nodes", G.number_of_edges(), "edges")

Generated by generation/supply_chain.py. Free for any use, no attribution required — license.