Group scripts into pad/, shows/ and anim/ folders.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jimmyandClaude Opus 5.5 committed 2026-10-22 11:54:36 +13:00
1 parent 5f593b973c
commit 647cfa3a75
26 files changed
+68 -66

No files matched your search

+2 -2
View File
@@ -10,7 +10,7 @@ import unittest
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(ROOT / "scripts"))
sys.path.insert(0, str(ROOT / "scripts" / "shows"))
import make_chataigne # noqa: E402
@@ -35,7 +35,7 @@ class ChataigneExportTest(unittest.TestCase):
def test_writes_project_and_script(self) -> None:
with tempfile.TemporaryDirectory() as tmp:
subprocess.run(
[sys.executable, str(ROOT / "scripts" / "make_chataigne.py"), str(ROOT / "shows" / "test.show.json"), tmp],
[sys.executable, str(ROOT / "scripts" / "shows" / "make_chataigne.py"), str(ROOT / "shows" / "test.show.json"), tmp],
check=True,
capture_output=True,
)
+1 -1
View File
@@ -7,7 +7,7 @@ import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
spec = importlib.util.spec_from_file_location("pad_colours", ROOT / "scripts" / "pad_colours.py")
spec = importlib.util.spec_from_file_location("pad_colours", ROOT / "scripts" / "pad" / "pad_colours.py")
colours = importlib.util.module_from_spec(spec)
assert spec.loader is not None
sys.modules["pad_colours"] = colours
+1 -1
View File
@@ -2,7 +2,7 @@ import sys
import unittest
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "scripts"))
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "scripts" / "pad"))
from pad_layer import PlayLayer # noqa: E402
+1 -1
View File
@@ -155,7 +155,7 @@ def test_last_pad_keeps_its_short_tail():
def test_factory_image_reads_as_midisuite_shows_it():
# Captured from MidiSuite's Reset with scripts/decode_usbmon.py.
# Captured from MidiSuite's Reset with scripts/pad/decode_usbmon.py.
raw = (ROOT / "tests" / "data" / "smc_pad_factory.bin").read_bytes()
doc = unpack(raw)
assert pack(doc) == raw
+4 -4
View File
@@ -290,12 +290,12 @@ class ShowFileTest(unittest.TestCase):
target.unlink(missing_ok=True)
def test_animation_script_dry_run(self):
show = load_show(ROOT / "scripts" / "anim_eight.py")
show = load_show(ROOT / "scripts" / "anim" / "anim_eight.py")
frames = [show_frame(show, t) for t in (0, 2000)]
self.assertNotEqual(frames[0]["m1"][2], frames[1]["m1"][2])
self.assertEqual(frames[0]["m1"][8], 255)
completed = subprocess.run(
[sys.executable, "-m", "showfile", "run", "scripts/anim_eight.py", "--seconds", "0.1"],
[sys.executable, "-m", "showfile", "run", "scripts/anim/anim_eight.py", "--seconds", "0.1"],
cwd=ROOT,
check=False,
capture_output=True,
@@ -329,7 +329,7 @@ class ShowFileTest(unittest.TestCase):
def test_stage_map_drives_the_whole_rig(self):
stage = json.loads((ROOT / "stage" / "map.json").read_text(encoding="utf-8"))
show = load_show(ROOT / "scripts" / "anim_stage.py")
show = load_show(ROOT / "scripts" / "anim" / "anim_stage.py")
self.assertEqual([fx.key for fx in show.fixtures], list(stage["fixtures"]))
for key, raw in stage["fixtures"].items():
fixture = show.fixtures_by_key[key]
@@ -370,7 +370,7 @@ class ShowFileTest(unittest.TestCase):
outside = validate_show({"stage": "/etc/passwd"})
self.assertFalse(outside["ok"])
completed = subprocess.run(
[sys.executable, "-m", "showfile", "run", "scripts/anim_stage.py", "--seconds", "0.1"],
[sys.executable, "-m", "showfile", "run", "scripts/anim/anim_stage.py", "--seconds", "0.1"],
cwd=ROOT,
check=False,
capture_output=True,