rendering
rendering
¶
Rendering preview engine for enhanced validation.
Generates previews of how sheets will be rendered at execution time,
including expanded prompts, validation paths, and fan-out metadata.
Used by mzt validate to show what each sheet will look like
before actually running the job.
Attributes¶
Classes¶
ExpandedValidation
dataclass
¶
ExpandedValidation(index, type, description, raw_path, expanded_path, pattern, condition, applicable)
A single validation rule with expanded paths and applicability.
SheetPreview
dataclass
¶
SheetPreview(sheet_num, item_range, rendered_prompt, prompt_snippet, expanded_validations, stage, instance, fan_count, render_error)
Preview of a single sheet's rendered state.
RenderingPreview
dataclass
¶
Complete rendering preview for all sheets in a job.
Functions¶
generate_preview
¶
Generate a rendering preview for all sheets in a job.
Builds each sheet's context, renders its prompt, expands validation paths, and evaluates condition applicability — all without executing anything.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
JobConfig
|
Parsed job configuration. |
required |
config_path
|
Path
|
Path to the YAML config file (for relative path resolution). |
required |
max_sheets
|
int | None
|
Cap the number of sheets to preview. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
A |
RenderingPreview
|
class: |
Source code in src/marianne/validation/rendering.py
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 | |