What problem does it solve?
Writing unit tests for the FastDeploy inference toolkit requires following strict CI conventions: correct test classification (multi-GPU sequential vs single-GPU parallel), port variable usage, log isolation, resource cleanup, and an 80% diff coverage threshold. This Skill automates that process so contributors get compliant tests without memorizing the CI rules.
Core Features & Use Cases
- Automatic Test Pattern Selection: Chooses among four patterns (pure logic, GPU kernel, offline inference, E2E serving) based on the code under test.
- Coverage-Driven Test Generation: Accepts coverage report lines or incremental diff-coverage JSON and writes tests targeting the exact uncovered lines.
- CI Convention Compliance: Enforces naming conventions, port environment variables, log isolation via FD_LOG_DIR, resource cleanup, and black/isort/flake8 style checks.
- Use Case: Paste a coverage line like
fastdeploy/model_executor/model_loader/default_loader.py 48 32 14 0 26% 37-38, 42 and the agent appends tests to the existing test file covering those missing branches.
Quick Start
Use the write-fastdeploy-unittest skill to add unit tests for fastdeploy/cache_manager/transfer_factory/file_store/file_store.py.