Volantic Systems
Repo Room

Specimen 07 of 09

Test Data Workbench

Point it at a database, get working test-data generators back: dependency-ordered, referentially intact, and shipped as Python you own instead of rows behind an API. Published on PyPI, 403 tests, built to degrade rather than fail.

Overview

Realistic test data is a chore every team has and nobody enjoys. Hand-writing generators that respect foreign keys is tedious; copying from production is a privacy incident waiting to happen. Test Data Workbench takes a third path: give it a database connection string and it reflects the schema, works out what each table represents, and writes per-table Python generators that produce realistic, referentially consistent data in dependency order.

The decision that sets it apart is that the generated code is the product. It does not hand you rows from behind an API; it hands you readable generator source you can diff, edit, and commit. When the tool guesses a column wrong, you fix one obvious line instead of wrestling a configuration DSL. Install it from PyPI, run tdw deploy, and a typical schema becomes a working generator set in well under a second.

Technical

The pipeline is schema reflection, classification, generation, then validation. A Schema Analyzer reflects tables, columns, keys, and foreign-key relationships through SQLAlchemy, then classifies each table’s entity type with scored name heuristics. A Generator Factory turns that analysis into per-table generator classes, topologically sorted so parents generate before children, with cycle detection so a cyclic schema degrades gracefully instead of hanging. After generation, a constraint check verifies the output satisfies primary-key uniqueness, not-null, and foreign-key integrity.

Three properties make it safe to rely on:

  • Degrade, never fail. Every generation path has a four-level fallback ladder (specialized, generic, simple, minimal). An unrecognized table gets a plainer generator, not a stack trace, and failures are isolated per table rather than cascaded.
  • Determinism on demand. --seed makes any run exactly reproducible: the same seed and schema produce byte-identical artifacts and identical generated records, so CI fixtures stay stable across machines.
  • Metadata-only privacy mode. By default the analyzer samples a bounded number of rows to detect value patterns. Pass --metadata-only and it issues zero SQL that reads table data: no SELECT, no COUNT, no sampling. This is enforced by a test that captures every executed statement and asserts none touch a user table. It also flags likely-PII columns from their names, which works even in metadata-only mode.

Two interfaces ship: a tdw CLI and a FastAPI REST service. SQLite and PostgreSQL are supported today; MySQL is on the roadmap.

Why You Should Care

This is a real, published product, not a demo. It is on PyPI at version 1.0.0 under Apache-2.0, backed by 403 tests that run on every push across Python 3.10, 3.11, and 3.12 on both Linux and Windows, plus an integration job against a real PostgreSQL database. The tests execute the generated code rather than merely compiling it: every template type is generated, run, and checked for shape, nullability, referential integrity, and seed determinism. The suite encodes regressions found the hard way, among them cycle detection in dependency sorting and cross-process determinism.

What it deliberately is not is as clear as what it is: not ML-based statistical synthesis, not production-data masking, not an ETL pipeline. Those are different products with different risk profiles. Keeping the scope small is exactly why what it claims, it does every time. That judgment, knowing where to draw the line so the tool stays trustworthy, is the part worth hiring for.

It was built AI-accelerated on human-owned architecture. The original build prompt that seeded it is preserved in the repository under docs/history/, owned openly rather than hidden.

Status

Published and stable at 1.0.0. Original work under the VolanticSystems org. This project also backs a separate portfolio entry on its documentation engineering; the two are distinct competencies that happen to share a repository.

Repo: https://github.com/VolanticSystems/test-data-workbench Package: https://pypi.org/project/test-data-workbench/

pypi.org/project/test-data-workbench