Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 1.08 KB

File metadata and controls

32 lines (24 loc) · 1.08 KB

Contributing to Synthdata

Adding a new template

  1. Create skills/synthdata-generate/templates/<name>.yaml
  2. Follow the schema format in references/schema-spec.md
  3. Test: python scripts/generate.py --template <name> --effort quick --output /tmp/test.xlsx
  4. Add an entry to the "Templates" table in README.md

Adding a new field type

  1. Edit scripts/engine/schema.py to register the type
  2. Add generator logic to the appropriate module:
    • Faker-backed: engine/faker_fields.py
    • Distribution-based: engine/distributions.py
  3. Document in references/schema-spec.md and references/faker-fields.md

Adding a new output writer

  1. Create scripts/engine/writers/<format>.py
  2. Implement write(tables: dict[str, DataFrame], path: str, **kwargs)
  3. Register in scripts/engine/writers/__init__.py

Testing changes

# Smoke test: generate every template at quick effort
for t in skills/synthdata-generate/templates/*.yaml; do
  python skills/synthdata-generate/scripts/generate.py \
    --template "$(basename "$t" .yaml)" --effort quick --output /tmp/
done