Skip to content

chore: export ConstraintType and InequalityOperator from config init#308

Open
johnnygreco wants to merge 2 commits intomainfrom
johnny/chore/add-constraint-types-to-config-init
Open

chore: export ConstraintType and InequalityOperator from config init#308
johnnygreco wants to merge 2 commits intomainfrom
johnny/chore/add-constraint-types-to-config-init

Conversation

@johnnygreco
Copy link
Contributor

📋 Summary

Exports ConstraintType and InequalityOperator from the data_designer.config public API so users can access these constraint-related types directly via import data_designer.config as dd.

🔄 Changes

✨ Added

  • ConstraintType and InequalityOperator to the TYPE_CHECKING imports in config/__init__.py for IDE support
  • ConstraintType and InequalityOperator to the _LAZY_IMPORTS dict for runtime lazy loading

🤖 Generated with AI

Made with Cursor

@johnnygreco johnnygreco requested a review from a team as a code owner February 6, 2026 20:26
@greptile-apps
Copy link

greptile-apps bot commented Feb 6, 2026

Greptile Overview

Greptile Summary

  • Updates the config public API layer to lazily export ConstraintType and InequalityOperator from data_designer.config.sampler_constraints, matching the existing __getattr__ lazy-load pattern.
  • Adds these symbols to the TYPE_CHECKING import block so IDE/type-checkers see them without incurring runtime imports.
  • Also AGENTS.md documentation to list EmbeddingColumnConfig and CustomColumnConfig among column configuration types.
  • PR metadata appears inconsistent with the head commit content, so verify the branch/commit range actually includes the intended config/__init__.py changes.

Confidence Score: 3/5

  • This PR is likely safe code-wise, but the commit/PR metadata mismatch needs to be resolved before merging to ensure the intended changes are actually included.
  • The config/__init__.py additions follow the established lazy-export pattern and reference symbols that exist in sampler_constraints.py. However, the head SHA shown only contains an AGENTS.md change, so there is a concrete risk the PR as currently formed won't include the described API export change unless the correct commits are present.
  • AGENTS.md and the PR commit range/changed-files list (ensure packages/data-designer-config/src/data_designer/config/init.py is actually part of the PR).

Important Files Changed

Filename Overview
AGENTS.md Updates the guidance list of column configuration types (adds EmbeddingColumnConfig and CustomColumnConfig), but the PR metadata/description claims unrelated config public API exports.
packages/data-designer-config/src/data_designer/config/init.py Adds lazy exports for ConstraintType and InequalityOperator plus TYPE_CHECKING imports; change itself is straightforward and consistent with existing lazy import pattern.

Sequence Diagram

sequenceDiagram
  participant User as User code
  participant Config as data_designer.config (__init__)
  participant Importlib as importlib
  participant SC as data_designer.config.sampler_constraints

  User->>Config: import data_designer.config as dd
  User->>Config: access dd.ConstraintType
  Config->>Config: __getattr__("ConstraintType")
  Config->>Importlib: import_module("data_designer.config.sampler_constraints")
  Importlib-->>SC: load module
  SC-->>Config: module object
  Config->>SC: getattr(ConstraintType)
  SC-->>User: ConstraintType Enum
Loading

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment on lines 507 to 509
- **`ExpressionColumnConfig`**: Expression-based derived columns (Python eval or Jinja2)
- **`ValidationColumnConfig`**: Validation results (Python, SQL, Code, Remote validators)
- **`SeedDatasetColumnConfig`**: Data from seed datasets
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR metadata mismatch

This PR is described as exporting ConstraintType/InequalityOperator from config/__init__.py, but this commit only changes AGENTS.md (and even git show for the head SHA lists only AGENTS.md). If this is the intended PR content, please update the PR title/description and changed-files list; otherwise, the actual code change for packages/data-designer-config/src/data_designer/config/__init__.py is missing from the head commit(s) and needs to be included before merge.

Prompt To Fix With AI
This is a comment left during a code review.
Path: AGENTS.md
Line: 507:509

Comment:
**PR metadata mismatch**

This PR is described as exporting `ConstraintType`/`InequalityOperator` from `config/__init__.py`, but this commit only changes `AGENTS.md` (and even `git show` for the head SHA lists only `AGENTS.md`). If this is the intended PR content, please update the PR title/description and changed-files list; otherwise, the actual code change for `packages/data-designer-config/src/data_designer/config/__init__.py` is missing from the head commit(s) and needs to be included before merge.

How can I resolve this? If you propose a fix, please make it concise.

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