Skip to content

Conversation

@rich-iannone
Copy link
Member

@rich-iannone rich-iannone commented Feb 2, 2026

This PR adds a test data generation system that creates realistic synthetic datasets from schema definitions. It supports typed field constraints (integers, floats, strings, booleans, dates), preset-based generation for realistic data like names, emails, and addresses, regex patterns for custom formats, and locale-aware data for 50 countries worldwide. Related fields maintain coherence as emails match names, and addresses have consistent city/postcode/coordinates.

Here's an example:

import pointblank as pb

schema = pb.Schema(
    user_id=pb.int_field(min_val=1, unique=True),
    name=pb.string_field(preset="name"),
    email=pb.string_field(preset="email"),
    age=pb.int_field(min_val=18, max_val=80),
    status=pb.string_field(allowed=["active", "pending", "inactive"]),
)

pb.preview(pb.generate_dataset(schema, n=100, seed=23))
image

For country-specific data:

schema = pb.Schema(
    name=pb.string_field(preset="name"),
    city=pb.string_field(preset="city"),
    address=pb.string_field(preset="address"),
)

pb.preview(pb.generate_dataset(schema, n=50, seed=23, country="DE"))
image

@github-actions github-actions bot temporarily deployed to pr-348 February 3, 2026 01:51 Destroyed
@github-actions github-actions bot temporarily deployed to pr-348 February 3, 2026 03:52 Destroyed
@github-actions github-actions bot temporarily deployed to pr-348 February 3, 2026 04:35 Destroyed
@rich-iannone rich-iannone marked this pull request as ready for review February 3, 2026 13:31
@github-actions github-actions bot temporarily deployed to pr-348 February 3, 2026 13:52 Destroyed
@rich-iannone rich-iannone merged commit 8c38d05 into main Feb 3, 2026
9 checks passed
@rich-iannone rich-iannone deleted the feat-test-data-generation branch February 3, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant