[Builder / RenderPather] BREAKING remove aliases to old names

This commit is contained in:
Jan Petykiewicz 2026-04-08 23:08:26 -07:00
commit 778b3d9be7
18 changed files with 131 additions and 153 deletions

View file

@ -18,11 +18,17 @@ The biggest migration point is that the old routing verbs were renamed:
| `Pather.path(...)` | `Pather.trace(...)` |
| `Pather.path_to(...)` | `Pather.trace_to(...)` |
| `Pather.mpath(...)` | `Pather.trace(...)` / `Pather.trace_to(...)` with multiple ports |
| `Pather.pathS(...)` | `Pather.jog(...)` |
| `Pather.pathU(...)` | `Pather.uturn(...)` |
| `Pather.path_into(...)` | `Pather.trace_into(...)` |
| `RenderPather.path(...)` | `RenderPather.trace(...)` |
| `RenderPather.path_to(...)` | `RenderPather.trace_to(...)` |
| `RenderPather.mpath(...)` | `RenderPather.trace(...)` / `RenderPather.trace_to(...)` |
| `RenderPather.path_into(...)` | `RenderPather.trace_into(...)` |
| `Pather.path_from(src, dst)` | `Pather.at(src).trace_into(dst)` |
| `RenderPather.path(...)` | `Pather(..., auto_render=False).trace(...)` |
| `RenderPather.path_to(...)` | `Pather(..., auto_render=False).trace_to(...)` |
| `RenderPather.mpath(...)` | `Pather(..., auto_render=False).trace(...)` / `Pather(..., auto_render=False).trace_to(...)` |
| `RenderPather.pathS(...)` | `Pather(..., auto_render=False).jog(...)` |
| `RenderPather.pathU(...)` | `Pather(..., auto_render=False).uturn(...)` |
| `RenderPather.path_into(...)` | `Pather(..., auto_render=False).trace_into(...)` |
| `RenderPather.path_from(src, dst)` | `Pather(..., auto_render=False).at(src).trace_into(dst)` |
There are also new convenience wrappers:
@ -43,13 +49,19 @@ that still calls `pather.path(...)` must be renamed.
pather.path('VCC', False, 6_000)
pather.path_to('VCC', None, x=0)
pather.mpath(['GND', 'VCC'], True, xmax=-10_000, spacing=5_000)
pather.pathS('VCC', offset=-2_000, length=8_000)
pather.pathU('VCC', offset=4_000, length=5_000)
pather.path_into('src', 'dst')
pather.path_from('src', 'dst')
# new
pather.cw('VCC', 6_000)
pather.straight('VCC', x=0)
pather.ccw(['GND', 'VCC'], xmax=-10_000, spacing=5_000)
pather.jog('VCC', offset=-2_000, length=8_000)
pather.uturn('VCC', offset=4_000, length=5_000)
pather.trace_into('src', 'dst')
pather.at('src').trace_into('dst')
```
If you prefer the more explicit spelling, `trace(...)` and `trace_to(...)`
@ -73,11 +85,30 @@ Routing can now be written in a fluent style via `.at(...)`, which returns a
```
This is additive, not required for migration. Existing code can stay with the
non-fluent `Pather`/`RenderPather` methods after renaming the verbs above.
non-fluent `Pather` methods after renaming the verbs above.
Old `PortPather` helper names were also cleaned up:
| Old API | New API |
| --- | --- |
| `save_copy(...)` | `mark(...)` |
| `rename_to(...)` | `rename(...)` |
Example:
```python
# old
pp.save_copy('branch')
pp.rename_to('feed')
# new
pp.mark('branch')
pp.rename('feed')
```
## Imports and module layout
`Builder`, `Pather`, and `RenderPather` now live together in
`Pather` now provides the remaining builder/routing surface in
`masque/builder/pather.py`. The old module files
`masque/builder/builder.py` and `masque/builder/renderpather.py` were removed.
@ -89,14 +120,17 @@ from masque.builder.builder import Builder
from masque.builder.renderpather import RenderPather
# new
from masque.builder import Builder, RenderPather
from masque.builder import Pather
builder = Pather(...)
deferred = Pather(..., auto_render=False)
```
Top-level imports from `masque` also continue to work.
`Builder` is now a thin compatibility wrapper over the unified `Pather`
implementation with `auto_render=True`. `RenderPather` is the same wrapper with
`auto_render=False`.
`Pather` now defaults to `auto_render=True`, so plain construction replaces the
old `Builder` behavior. Use `Pather(..., auto_render=False)` where you
previously used `RenderPather`.
## `BasicTool` was replaced