Development¶
Contributing to rampa and understanding its internals.
Setup¶
$ git clone https://github.com/tony/rampa.git
$ cd rampa && uv sync --all-extras --all-groups
Quality gates¶
Run before every commit:
$ rm -rf docs/_build; uv run ruff check . --fix --show-fixes; \
uv run ruff format .; uv run ty check; \
uv run py.test --reruns 0 -vvv; just build-docs;
Test suite¶
$ uv run pytest
Continuous testing with pytest-watcher:
$ uv run ptw .
Architecture¶
User script (@scenario)
│
Loader ──→ TestPlan
│
Engine ──→ RunController
│ │ │
│ │ EventBus ──→ CLI / MCP / pytest / JSONL
│ │
│ └──→ Executors (6 types)
│ │
│ Workers ──→ HttpClient ──→ target
│ │
└──→ MetricEngine (thread)
│
SinkProtocol ──→ Thresholds ──→ exit code
The engine is headless — it owns execution and cleanup. Frontends
own presentation, format, and exit behavior. The EventBus
broadcasts typed events to concurrent subscribers.
The metric engine runs in a dedicated threading.Thread, draining
samples from a queue.SimpleQueue on a 50ms timer. The
SinkProtocol is a structural protocol (not ABC) designed as the
future Rust/PyO3 seam.
Benchmarks
Throughput, scheduling, metric engine, and HTTP benchmarks.
ADRs
Architecture decision records — significant design choices and rationale.