MCPcopy Create free account
hub / github.com/FastLED/FastLED / run_autoresearch_loop

Function run_autoresearch_loop

ci/autoresearch_loop.py:93–293  ·  view source on GitHub ↗

Run comprehensive autoresearch loop across all configurations. Args: port: Serial port drivers: List of drivers to test (None = auto-detect) lane_size_configs: List of lane size arrays, e.g., [[100, 100], [300, 200, 100]] Each inner array specif

(
    port: str,
    drivers: list[str] | None = None,
    lane_size_configs: list[list[int]] | None = None,
    patterns: list[str] | None = None,
    iterations: int = 1,
    strip_size_preset: str | None = None,
    test_large_strips: bool = False,
)

Source from the content-addressed store, hash-verified

91
92
93def run_autoresearch_loop(
94 port: str,
95 drivers: list[str] | None = None,
96 lane_size_configs: list[list[int]] | None = None,
97 patterns: list[str] | None = None,
98 iterations: int = 1,
99 strip_size_preset: str | None = None,
100 test_large_strips: bool = False,
101) -> dict[str, Any]:
102 """Run comprehensive autoresearch loop across all configurations.
103
104 Args:
105 port: Serial port
106 drivers: List of drivers to test (None = auto-detect)
107 lane_size_configs: List of lane size arrays, e.g., [[100, 100], [300, 200, 100]]
108 Each inner array specifies per-lane LED counts
109 patterns: List of patterns to test
110 iterations: Number of test iterations per configuration
111 strip_size_preset: Strip size preset name (e.g., "small", "medium", "large")
112 test_large_strips: Enable large strip testing (default: False)
113
114 Returns:
115 Summary of all test results
116 """
117 agent = AutoResearchAgent(port)
118
119 try:
120 # Get available drivers if not specified
121 if drivers is None:
122 drivers = agent.get_drivers()
123 if drivers:
124 print(f"Auto-detected drivers: {', '.join(drivers)}")
125
126 # Default lane configurations: test various asymmetric setups
127 if lane_size_configs is None:
128 lane_size_configs = [
129 [100], # 1 lane
130 [100, 100], # 2 lanes, uniform
131 [300, 100], # 2 lanes, asymmetric
132 [100, 100, 100, 100], # 4 lanes, uniform
133 [300, 200, 100, 50], # 4 lanes, decreasing
134 [1, 300], # Edge case: 1 LED + 300 LEDs
135 ]
136
137 patterns = patterns or ["MSB_LSB_A", "SOLID_RGB"]
138
139 # Apply strip size preset if specified (NEW - Phase 7)
140 if strip_size_preset and strip_size_preset in STRIP_SIZE_PRESETS:
141 short_size, long_size = STRIP_SIZE_PRESETS[strip_size_preset]
142 print(
143 f"Applying strip size preset '{strip_size_preset}': short={short_size}, long={long_size}"
144 )
145 agent.set_strip_size_values(short_size, long_size)
146
147 # Apply large strip testing flag (NEW - Phase 7)
148 if test_large_strips:
149 print("Enabling large strip testing")
150 agent.set_strip_sizes_enabled(small=True, large=True)

Callers 1

Calls 13

get_driversMethod · 0.95
set_strip_size_valuesMethod · 0.95
configureMethod · 0.95
run_testMethod · 0.95
resetMethod · 0.95
closeMethod · 0.95
AutoResearchAgentClass · 0.90
TestConfigClass · 0.90
printFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected