一键导入
dev-workflow
Use when setting up the FastStream dev environment, running tests/linters/static analysis, managing docker brokers, or preparing a PR.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when setting up the FastStream dev environment, running tests/linters/static analysis, managing docker brokers, or preparing a PR.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when writing or editing documentation under docs/ — page layout, docs_src snippet embedding, snippet tests, link conventions, and FastStream example-code rules.
Use when writing or modifying FastStream library source code under faststream/ — package layout, broker package anatomy, typing rules, configs, and public API conventions.
Use when writing or modifying tests under tests/ — base testcase inheritance, pytest markers, fixtures, in-memory vs real-broker testing, and how to run the suite.
| name | dev-workflow |
| description | Use when setting up the FastStream dev environment, running tests/linters/static analysis, managing docker brokers, or preparing a PR. |
uv for Python deps + just as the task runner + docker compose for brokers. Never use bare pip. Run just with no args to list all recipes.
just init [python-version] — build the dev environment (default Python 3.10).just up / just stop / just down — start / stop / remove all containers (brokers + the faststream dev container the test recipes exec into).just kafka-up, rabbit-up, nats-up, redis-up, redis-cluster-up (+ matching -stop and -logs recipes). MQTT has no local just recipes — it is tested in CI only.All just test* recipes execute inside the dev container (docker compose exec faststream) — run just up first.
| Command | Selection |
|---|---|
just test [path] | fast: not slow and not connected, parallel -n auto |
just test-all [path] | full suite (-m "all") — all brokers must be up |
just test-<broker> [path] | broker-marked tests excluding connected and slow (kafka, confluent, rabbit, redis, redis-cluster, nats) |
just test-<broker>-all [path] | every broker-marked test incl. slow/connected — needs that broker up |
just test-coverage [path] / test-coverage-all | with coverage |
Extra pytest args pass through: just test tests/brokers/kafka -vv. Run pytest directly when needed (uv run pytest ... — no container required, but bare pytest excludes only slow by default) — never via the rtk proxy.
just linter — runs ruff format (rewrites files in place), then ruff check --exit-non-zero-on-fix (reports fixable issues without applying them), then codespell (alias: just lint). Expect formatting changes in your working tree after running it.just mypy — strict mode over faststream/ and tests/mypy/.just static-analysis — mypy + bandit + semgrep; just zizmor separately for GitHub Actions workflows.just pre-commit — pre-commit hooks on modified files (just pre-commit-all for the whole tree).just docs-serve — live server; just docs-build — static build (details in the documentation-writing skill)..github/workflows/pr_tests.yaml): core jobs run everything except connected (-m "(slow and not connected) or not connected"); per-broker jobs run <broker> and not connected, plus dedicated jobs with real broker services for connected tests.faststream/, tests/, docs/docs_src/, and examples/.