Integration with IDEs

Robosim installs editable (pip install -e .) and puts a set of vendored packages from pkg/ on the import path via setup.py. At runtime everything resolves, but a static analyzer that reads only the project config — not the editable install's import finder — can fail to locate the vendored pkg/ packages and flag phantom "unresolved import" errors. Each IDE below has a one-time fix.

A few things that shape the setup:

  • Install editable (with -e) — the runtime reads maps/resources/plugins from the checkout, so the package must stay in place.
  • The server and client have different dependencies and can run in separate environments on different machines.
  • We vendor packages under pkg/ (third-party ones plus a few we built for this project); setup.py puts them on the import path. The editable .pth covers src/ (so robolib, plugins, robosim resolve), but not the per-package pkg/ dirs — those are the ones analyzers miss.

VSCode

If Pylance/Pyright flags the vendored imports (microspec, microecs, loggez, colorama, overrides) as unresolved, add the pkg/ dirs to the analyzer path in .vscode/settings.json:

{
  "python.analysis.extraPaths": ["pkg/colorama", "pkg/loggez", "pkg/microecs", "pkg/microspec", "pkg/overrides"]
}

Each listed dir is the parent of a vendored package (e.g. pkg/microspec/ contains microspec/), so the analyzer resolves import microspec the same way the editable install does at runtime.

Rider

_Not documented yet — planned (tracked as point 4 of task 183)._