generate#
Canary Generate Pipeline#
This module implements the generateion lifecycle for converting generator output into fully resolved
test specs. The central orchestrator is the Generator object, which progresses through
validation, resolution, and finally hook-driven post-processing.
The canary_generate(generator) function coordinates the entire process using Pluggy hooks. Plugins
may observe or modify the generate at specific stages.
Flow Diagram#
The following diagram illustrates the full lifecycle:
Generator(s)
Produces [Un]resolved test specs
↓
Generator(generators)
Generate JobSpecIR from generator outputs
↓
canary_generate(generators)
• pluginmanager.hook.canary_generatestart()
• generator.run()
• validate(...)
• resolve(...)
• pluginmanager.hook.canary_generate_modifiyitems()
• pluginmanager.hook.canary_generate_report()
→ generator.resolved_specs()
- class Generator(generators: list[AbstractTestGenerator], workspace: Path, on_options: Iterable[str] = ())#
Bases:
object
- generate_from_one(file: AbstractTestGenerator, on_options: list[str] | None) list[JobSpecIR | JobSpec]#
- generate_jobspecs(generators: list[AbstractTestGenerator], on_options: list[str]) list[JobSpecIR | JobSpec]#
- generate_jobspecs_parallel(generators: list[AbstractTestGenerator], on_options: list[str]) list[JobSpecIR | JobSpec]#
- worker_init(snapshot: dict[str, Any])#
- generate_jobspecs_serial(generators: list[AbstractTestGenerator], on_options: list[str]) list[JobSpecIR | JobSpec]#