Alpasim is a lightweight, data-driven research simulator for autonomous vehicle testing using a microservice architecture with gRPC communication. The runtime orchestrates physics simulation, traffic, neural rendering, and ego vehicle policy evaluation.
- User docs → docs/ONBOARDING.md, docs/TUTORIAL.md, docs/OPERATIONS.md
- Design and data → docs/DESIGN.md, docs/DATA_PIPELINE.md
- Coordinate frames, coding style, contributing → CONTRIBUTING.md
- Environment:
source setup_local_env.sh(or./setup_local_env.sh). The project uses uv for dependencies and scripts; useuv runfor commands (e.g.uv run pytest,uv run alpasim_wizard ...). - Internal configs: before using
plugins/internalconfigs such asdeploy=iad, runuv sync --all-packages --extra internalfrom the repo root. Prefer repo-root commands likeuv run alpasim_wizard ...; if usinguv run --project src/wizard, make sure that project env can see thealpasim-internalentry point, otherwise Hydra will not find internal config groups. - After changing
.protofiles:cd src/grpc && uv run compile-protos - Run simulation locally (from repo root or
src/wizard):uv run alpasim_wizard deploy=local topology=1gpu driver=vavam wizard.log_dir=./my_run(deploy configs live insrc/wizard/configs/deploy/.) - Tests:
uv run pytest(e.g.uv run pytest src/runtime/tests) - Static checks:
pre-commit run --all-files
- Prefer readability over flexibility. Add an abstraction only when it reduces net complexity or removes meaningful duplication.
- Keep one canonical path for each behavior. Avoid compatibility shims, silent fallbacks, aliases, and parallel old/new code unless there is a current requirement.
- Keep behavior local. Avoid one-line wrappers, gratuitous delegation, and class hierarchies unless the extra hop makes the code easier to understand or enables real reuse.
- Fail fast on unexpected input. Prefer direct required access over defensive
getattr/.get(..., default)patterns that hide broken invariants. - Reuse existing project helpers and upstream libraries before adding local equivalents.
- Keep dependency direction clear: generic/shared modules must not import from specific deployment, policy, or test modules.
- Comments and docstrings must describe the current code. Do not add change-history comments, restatements of obvious code, or speculative notes about future support.
- Tests should prove behavior and regressions, not mirror implementation details or lock down defaults already obvious at the call site.
Environment variables and external repository URLs are project- or environment-specific; see CONTRIBUTING and your setup for local development.
- Keep commits focused and imperative. Rebase onto
mainbefore submitting; force-pushes are expected after rebases. - Changelogs are append-only: add new entries, but never change previous entries.
- Pipelines auto-bump versions for touched packages; allow the bot-generated commit to land and re-trigger CI if needed.
- PRs should explain scenario impact, reference issue IDs, and attach logs/screens for wizard/runtime regressions. Confirm tests and
pre-commitpass before requesting review. - When pushing to a branch that has the auto-bump commit "Alpasim automatic version bump", force push over it if that's the only commit you'd overwrite. Do not manually update docker container versions; that is done by the CI pipeline.
- Coordinate frame conventions: CONTRIBUTING.md
When asked to access any of the following services, check if you have access to the corresponding MCP server:
- Linar
- Gitlab (especially relevant for MRs)