{"id":23628,"library":"doroutes","title":"DoRoutes","description":"DoRoutes is an advanced routing library for GDSFactory, providing optimized wire routing and placement algorithms for photonic integrated circuit design. Current version is 0.5.0, with a monthly release cadence.","status":"active","version":"0.5.0","language":"python","source_language":"en","source_url":"https://github.com/gdsfactory/doroutes","tags":["photonics","routing","gdsfactory","pcb-routing","pic"],"install":[{"cmd":"pip install doroutes","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for all routing operations; DoRoutes is built on top of GDSFactory.","package":"gdsfactory","optional":false},{"reason":"Used for array operations and coordinate math.","package":"numpy","optional":false}],"imports":[{"note":"The core module is internal; use top-level import.","wrong":"from doroutes.core import route","symbol":"route","correct":"from doroutes import route"},{"note":"Route class is exposed at package level.","wrong":"from doroutes.routing import Route","symbol":"Route","correct":"from doroutes import Route"},{"note":"Place function is at top level.","wrong":"from doroutes.placement import place","symbol":"place","correct":"from doroutes import place"}],"quickstart":{"code":"import gdsfactory as gf\nfrom doroutes import route\n\n# Create a simple circuit with two components\nc = gf.Component()\n\n# Add a waveguide and a taper (simplified for example)\nwg = c.add_ref(gf.c.waveguide(length=5))\ntaper = c.add_ref(gf.c.taper(length=3))\ntaper.move((10, 0))\n\n# Route between the ports\nports = [wg.ports['opt1'], taper.ports['opt2']]\nroute(c, ports, layer=(1, 0))\n\nc.show()","lang":"python","description":"Basic usage: create a component, add references, then route between ports."},"warnings":[{"fix":"Upgrade Python to 3.12 or later.","message":"DoRoutes 0.5.0 requires Python >=3.12.0. Older Python versions are not supported.","severity":"breaking","affected_versions":"0.5.0"},{"fix":"Use `from doroutes import route` instead of `from doroutes.routing import route`.","message":"The `doroutes.routing` module is deprecated as of 0.5.0. Import functions from the top-level package instead.","severity":"deprecated","affected_versions":">=0.5.0"},{"fix":"Ensure your components have ports with `width` defined (either via GDSFactory's port system or manually).","message":"DoRoutes expects ports to have a 'width' attribute. If missing, route may fail or produce unexpected results.","severity":"gotcha","affected_versions":"all"},{"fix":"Use the `avoid` parameter or manually check for overlaps.","message":"Routing multiple paths in sequence can cause collisions if not carefully planned. DoRoutes does not auto-avoid existing routes by default.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Add width to ports: e.g., `port.width = 0.5` or use GDSFactory's built-in port creation with width.","cause":"Ports passed to route() lack a 'width' property, required for the routing algorithm.","error":"RuntimeError: Port .* has no width attribute"},{"fix":"Import from the top-level package: `from doroutes import route`.","cause":"Trying to import from internal submodules that are not exposed.","error":"AttributeError: module 'doroutes' has no attribute 'core'"},{"fix":"Use `from doroutes import Route`.","cause":"The public API moved; submodule no longer exports core classes.","error":"ImportError: cannot import name 'Route' from 'doroutes.routing'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}