Skip to content
Novus Examples
graphml1.4 KB

Service Dependency Graph (GraphML, directed)

A directed service-dependency graph in GraphML — ten microservices (web, api, auth, db, cache, queue, worker, …) with their call/dependency edges. A fixture for testing directed-graph importers, cycle detection, and topological sorting.

Preview — first 30 linesgraphml
<?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns">
  <key id="d_label" for="node" attr.name="label" attr.type="string"/>
  <graph id="deps" edgedefault="directed">
    <node id="n0"><data key="d_label">web</data></node>
    <node id="n1"><data key="d_label">api</data></node>
    <node id="n2"><data key="d_label">auth</data></node>
    <node id="n3"><data key="d_label">db</data></node>
    <node id="n4"><data key="d_label">cache</data></node>
    <node id="n5"><data key="d_label">queue</data></node>
    <node id="n6"><data key="d_label">worker</data></node>
    <node id="n7"><data key="d_label">mailer</data></node>
    <node id="n8"><data key="d_label">storage</data></node>
    <node id="n9"><data key="d_label">metrics</data></node>
    <edge id="e0" source="n0" target="n1"/>
    <edge id="e1" source="n0" target="n2"/>
    <edge id="e2" source="n1" target="n2"/>
    <edge id="e3" source="n1" target="n3"/>
    <edge id="e4" source="n1" target="n4"/>
    <edge id="e5" source="n1" target="n5"/>
    <edge id="e6" source="n5" target="n6"/>
    <edge id="e7" source="n6" target="n3"/>
    <edge id="e8" source="n6" target="n7"/>
    <edge id="e9" source="n6" target="n8"/>
    <edge id="e10" source="n1" target="n9"/>
    <edge id="e11" source="n6" target="n9"/>
    <edge id="e12" source="n2" target="n3"/>
  </graph>
</graphml>

Specifications

Nodes
10
Edges
13
Directed
true
Domain
software architecture

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

“Service Dependency Graph (GraphML, directed)” is a deterministic Novus Examples fixture for Graph data, 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: 10 nodes · 13 edges. 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.

Data fixtures document their exact quirks — delimiters, encodings, null handling, schema, and row counts — in the spec table. Point your parser or importer at the file and assert it handles the documented edge cases; clean and deliberately-messy siblings make before/after diffs straightforward.

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/data_graphs.py. Free for any use, no attribution required — license.