---
title: "ChecksConfig"
description: "Configuration for design checks."
canonical_url: "https://www.rosette.dev/docs/api-reference/ChecksConfig"
markdown_url: "https://www.rosette.dev/docs/api-reference/ChecksConfig.md"
source_url: "https://github.com/PreFab-Photonics/rosette/blob/f086d7670645fd36c05362d696d442a2b2e74850/www/content/docs/api-reference/ChecksConfig.mdx"
docs_channel: "main"
docs_revision: "f086d7670645fd36c05362d696d442a2b2e74850"
---

# ChecksConfig

Configuration for design checks.

Import with `from rosette.checks import ChecksConfig`.

Controls tolerances for port connectivity checks (position, angle, width)
and bend radius validation. Pass to `run_checks()` to customize checking
behavior.

```python
config = ChecksConfig(
    position_tolerance=0.001,
    angle_tolerance=0.1,
    width_tolerance=1e-6,
    check_widths=True,
    min_bend_radius=5.0,
    severity="error",
)
result = run_checks(cell, config=config)
```

## Methods



### `__init__`

```python
__init__(position_tolerance=0.001, angle_tolerance=0.1, width_tolerance=1e-6, check_widths=True, min_bend_radius=None, severity='error') -> None
```

Create a new checks configuration.



- **`position_tolerance`** (`float`, default `0.001`)

  Maximum gap between port centres (in design units) to count as connected.
  Ports closer than this distance are considered a valid connection.
  Must be finite and nonnegative.





- **`angle_tolerance`** (`float`, default `0.1`)

  Maximum angular deviation from anti-parallel (in degrees) to count as
  a valid connection. Two ports must face each other within this tolerance.
  Must be finite and between 0 and 180 degrees.





- **`width_tolerance`** (`float`, default `1e-6`)

  Maximum absolute width difference, in design units, before connected ports
  produce a width-mismatch violation. Must be finite and nonnegative.





- **`check_widths`** (`bool`, default `True`)

  Whether to flag width mismatches between connected ports. When enabled,
  connected ports with different widths generate a violation.





- **`min_bend_radius`** (`float | None`, default `None`)

  Minimum allowed bend radius in design units. Set to `None` to skip bend
  radius checking. When set, bend diagnostics produced by `Route` are validated
  against this limit. Rosette retains those diagnostics privately alongside
  Cells created by `Route.to_cell()` and in `rosette-layout` JSON; generic Cell
  metadata is not inspected.
  
  The value must be finite and positive. Cells with local polygon or path geometry
  must have an explicit route-annotation entry while this check is enabled; an
  empty entry means that the cell is known to contain no annotated bends.





- **`severity`** (`str`, default `"error"`)

  Default severity for configurable violations: `"error"` or `"warning"`.
  Warning-only results still pass.





**Returns:** `None`