Separate user guides, benchmarks, and routing internals

This commit is contained in:
Jan Petykiewicz 2026-11-26 21:14:29 -08:00
commit e4d5952677

View file

@ -2,6 +2,10 @@
Use Inire to connect fixed ports on a photonic or RF layout with straight segments, 90-degree bends, and S-bends. Supply the device placement, keepouts, and allowed bend radii. The router checks the finished geometry for clearance and returns partial paths to help you diagnose unfinished nets.
<a id="develop-inire"></a>
[User guide](DOCS.md) · [Developer guide](docs/development.md) · [Benchmarks](docs/benchmarks.md)
## Install
From a checkout with Python 3.11 or newer, run `pip install .`. For development, `uv sync` also installs the test and lint tools.
@ -9,11 +13,17 @@ From a checkout with Python 3.11 or newer, run `pip install .`. For development,
## Route a net
```python
from inire import NetSpec, Port, RoutingProblem, route
from inire import (
NetSpec, Port, RoutingProblem,
route,
)
start = Port(50, 100, 0)
target = Port(250, 100, 0)
net = NetSpec("input", start, target)
problem = RoutingProblem(
bounds=(0, 0, 1000, 1000),
nets=(NetSpec("input", Port(50, 100, 0), Port(250, 100, 0), width=2),),
nets=(net,),
clearance=2,
)
@ -25,17 +35,15 @@ else:
print(result.outcome)
```
This example prints `200.0`, the length in the layout's coordinate unit. The branch that prints `outcome` is where you can report an unfinished or colliding net. [Interpret results and diagnose failures](DOCS.md#read-the-result)
![A short solid waveguide connects the start at (50, 100) and target at (250, 100). Both port arrows point east.](docs/figures/first-route.png)
Use a unit fine enough to preserve your port spacing on an integer grid. A heading of 0 points east. Both ports in the example have heading 0 because the waveguide travels east when it leaves the start and when it reaches the target. [Describe a layout](DOCS.md#describe-a-layout)
The example prints `200.0` in the layout's coordinate unit. Both ports have heading 0 because the path travels east at departure and arrival. The plot shows the area around the first route. [Read the result](docs/user/tune-and-troubleshoot.md#read-the-result)
## Route your own layout
Place crossing devices before routing and describe their external legs as separate nets. Use the [examples](examples/README.md) to try multi-net routing, locked paths, or custom bends, and the [tuning guide](DOCS.md#tune-a-run) to decide which settings to change.
## Develop Inire
Run `python -m pytest` for the correctness suite. Use `python -m pytest -m "not routing_corpus"` for a shorter local run. Start with the [architecture](docs/architecture.md) to find where a change belongs, then use the [benchmark guide](docs/topological-routing.md) and [diagnostics](docs/routing-diagnostics.md) to check its effect.
- [Define your ports and keepouts](docs/user/route-a-layout.md), including access to preplaced crossing cells.
- [Choose what to try after a partial route](docs/user/tune-and-troubleshoot.md#why-a-net-stopped-short).
- [Browse visual examples](examples/README.md) of multi-net routing, locked paths, and bend geometry.
## License