-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_all.py
More file actions
58 lines (50 loc) · 1.79 KB
/
run_all.py
File metadata and controls
58 lines (50 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
"""
Master script: Re-runs all tests and generates all figures
Steps:
1. Main KBD encoder (LicorDeCalandraca.wav)
2. SIN window test
3. Piano2 test
4. Generate all figures
"""
import subprocess
import sys
import os
import time
PROJECT_DIR = os.path.dirname(os.path.abspath(__file__))
os.chdir(PROJECT_DIR)
def run_step(label, cmd, cwd=None):
print(f"\n{'='*70}")
print(f" {label}")
print(f"{'='*70}\n")
t0 = time.time()
result = subprocess.run(
[sys.executable] + cmd,
cwd=cwd or PROJECT_DIR,
capture_output=False
)
dt = time.time() - t0
print(f"\n [{label}] Finished in {dt:.1f}s (exit code: {result.returncode})")
return result.returncode
# ================================================================
# STEP 1: Main KBD Encoder
# ================================================================
rc = run_step("STEP 1: Main KBD Encoder",
["aac_level3.py"],
cwd=os.path.join(PROJECT_DIR, "level_3"))
# ================================================================
# STEP 2: SIN Window Test
# ================================================================
rc = run_step("STEP 2: SIN Window Test",
["test_sin_window.py"])
# ================================================================
# STEP 3: Piano2 Test
# ================================================================
rc = run_step("STEP 3: Piano2 Test", ["_run_piano2.py"])
# ================================================================
# STEP 4: Regenerate ALL figures (original 4 + 4 new advanced)
# ================================================================
rc = run_step("STEP 4: Regenerate ALL Figures (9 total)",
["generate_figures.py"])
print(f"\n{'='*70}")
print(f" ALL STEPS COMPLETE!")
print(f"{'='*70}")