Skip to content

Add Schema dataclass, decouple constraints, and refactor TabularConfig into reusable preset. - #155

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
cl/970195519
Open

Add Schema dataclass, decouple constraints, and refactor TabularConfig into reusable preset.#155
copybara-service[bot] wants to merge 1 commit into
mainfrom
cl/970195519

Conversation

@copybara-service

Copy link
Copy Markdown

Add Schema dataclass, decouple constraints, and refactor TabularConfig into reusable preset.

  • Introduce dpsynth.domain.Schema dataclass implementing Mapping[str, AttributeType] to encapsulate column attribute domains and cross-attribute constraints with YAML serialization support.
  • Decouple dpsynth.constraints.Constraint so attribute_domains is optional, adding bind_schema() and to_mbi(schema) for automatic type resolution.
  • Refactor dpsynth.TabularConfig into a reusable algorithm preset: remove the unused initializers field, make schema/domains optional in the constructor, and support passing schema and constraints directly to configure() and calibrate().
  • Re-export Schema and Constraint at the top level dpsynth package.
  • Update in-memory documentation and add unit tests across domain, constraints, and tabular mechanisms.

…g into reusable preset.

- Introduce `dpsynth.domain.Schema` dataclass implementing `Mapping[str, AttributeType]` to encapsulate column attribute domains and cross-attribute constraints with YAML serialization support.
- Decouple `dpsynth.constraints.Constraint` so `attribute_domains` is optional, adding `bind_schema()` and `to_mbi(schema)` for automatic type resolution.
- Refactor `dpsynth.TabularConfig` into a reusable algorithm preset: remove the unused `initializers` field, make `schema`/`domains` optional in the constructor, and support passing `schema` and `constraints` directly to `configure()` and `calibrate()`.
- Re-export `Schema` and `Constraint` at the top level `dpsynth` package.
- Update in-memory documentation and add unit tests across domain, constraints, and tabular mechanisms.

PiperOrigin-RevId: 970195519
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.

0 participants