Skip to content

fix: include seed dataset in builder repr for seed-only configs#361

Merged
johnnygreco merged 1 commit intomainfrom
johnny/fix/builder-repr-seed-only
Mar 2, 2026
Merged

fix: include seed dataset in builder repr for seed-only configs#361
johnnygreco merged 1 commit intomainfrom
johnny/fix/builder-repr-seed-only

Conversation

@johnnygreco
Copy link
Contributor

📋 Summary

Fixes DataDesignerConfigBuilder repr behavior so seed-only configurations no longer appear empty in interactive use. Adds a regression test to ensure seed datasets remain visible when no columns are configured.

🔄 Changes

🐛 Fixed

  • Updated DataDesignerConfigBuilder.__repr__ to return DataDesignerConfigBuilder() only when both no columns and no seed dataset are configured.
  • Preserves seed dataset visibility in notebook/REPL output after calling with_seed_dataset(...).

🧪 Tests

🔍 Attention Areas

⚠️ Reviewers: Please pay special attention to the following:


🤖 Generated with AI

@johnnygreco johnnygreco requested a review from a team as a code owner March 2, 2026 00:50
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 2, 2026

Greptile Summary

Fixed DataDesignerConfigBuilder.__repr__ to display seed dataset information in seed-only configurations (no columns). Previously, the repr would return an empty DataDesignerConfigBuilder() string when no columns were configured, even if a seed dataset was present, making it invisible in notebooks and REPL environments.

  • Changed condition from checking only len(self._column_configs) == 0 to len(self._column_configs) == 0 and self._seed_config is None
  • Added regression test test_repr_includes_seed_dataset_when_no_columns to verify seed datasets remain visible

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • Single-line bug fix with clear logic improvement and comprehensive test coverage - changes only affect repr output visibility without altering functionality
  • No files require special attention

Important Files Changed

Filename Overview
packages/data-designer-config/src/data_designer/config/config_builder.py Fixed __repr__ method to check both no columns AND no seed config before returning empty representation
packages/data-designer-config/tests/config/test_config_builder.py Added regression test to verify seed dataset is shown in repr when no columns are configured

Last reviewed commit: 7af89c1

@johnnygreco johnnygreco merged commit d5b9850 into main Mar 2, 2026
47 checks passed
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.

2 participants