feat(patterns): merge pattern styles and add mode support

Consolidate legacy pattern ids into meteor, particles, sparkle, chase,
and colour_cycle with n6/mode style selection; add pattern_modes helper,
self-contained tests/all.py, and preset mode alias on wire.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-16 21:14:54 +12:00
parent 794f1a2841
commit 55a97ac51c
44 changed files with 998 additions and 1539 deletions

26
dev.py
View File

@@ -67,27 +67,9 @@ for cmd in sys.argv[1:]:
print("Error: Port required for 'db' command")
case "test":
if port:
if "all" in sys.argv[1:]:
test_files = sorted(
str(path)
for path in Path("test").rglob("*.py")
if path.is_file()
)
failed = []
for test_file in test_files:
print(f"Running {test_file}")
code = subprocess.call(
[*mpremote_base(), "connect", port, "run", test_file]
)
if code != 0:
failed.append((test_file, code))
if failed:
print("Some tests failed:")
for test_file, code in failed:
print(f" {test_file} (exit {code})")
else:
subprocess.call(
[*mpremote_base(), "connect", port, "run", "test/all.py"]
)
# Single self-contained suite (tests/all.py); requires ``src`` on device first.
subprocess.call(
[*mpremote_base(), "connect", port, "run", "tests/all.py"]
)
else:
print("Error: Port required for 'test' command")