Generate lane size configurations for testing. Args: lane_count: Number of lanes presets: List of preset names from LANE_SIZE_PRESETS custom_configs: Custom lane size arrays to include Returns: List of lane size configurations to test
(
lane_count: int,
presets: list[str] | None = None,
custom_configs: list[list[int]] | None = None,
)
| 55 | |
| 56 | |
| 57 | def generate_lane_configs( |
| 58 | lane_count: int, |
| 59 | presets: list[str] | None = None, |
| 60 | custom_configs: list[list[int]] | None = None, |
| 61 | ) -> list[list[int]]: |
| 62 | """Generate lane size configurations for testing. |
| 63 | |
| 64 | Args: |
| 65 | lane_count: Number of lanes |
| 66 | presets: List of preset names from LANE_SIZE_PRESETS |
| 67 | custom_configs: Custom lane size arrays to include |
| 68 | |
| 69 | Returns: |
| 70 | List of lane size configurations to test |
| 71 | """ |
| 72 | configs: list[list[int]] = [] |
| 73 | |
| 74 | # Add preset configurations |
| 75 | if presets: |
| 76 | for preset_name in presets: |
| 77 | if preset_name in LANE_SIZE_PRESETS: |
| 78 | configs.append(LANE_SIZE_PRESETS[preset_name](lane_count)) |
| 79 | |
| 80 | # Add custom configurations |
| 81 | if custom_configs: |
| 82 | for custom in custom_configs: |
| 83 | if len(custom) == lane_count: |
| 84 | configs.append(custom) |
| 85 | |
| 86 | # Default: uniform medium if nothing specified |
| 87 | if not configs: |
| 88 | configs.append([100] * lane_count) |
| 89 | |
| 90 | return configs |
| 91 | |
| 92 | |
| 93 | def run_autoresearch_loop( |
no test coverage detected