Skip to content

Commit 58b61ea

Browse files
committed
Merge origin/main into feature branch
Resolve conflicts between class rename PR (#38) and our functional fixes (epoch discovery, DID API, serialization helpers). Keep both the new MATLAB-mirror class names and all epoch/DAQ reconstruction improvements. https://claude.ai/code/session_01HbgrZ69hyXBhiCx9tcAuA6
2 parents ac79759 + ec5bdf1 commit 58b61ea

218 files changed

Lines changed: 5642 additions & 5455 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cursorrules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# NDI Cursor Rules
22

33
## 1. Project Context
4-
This is the NDI (Neuroscience Data Interface) Python port. It is a "Lead-Follow" project where the MATLAB codebase is the Source of Truth.
4+
This is the NDI (Neuroscience ndi_gui_Data Interface) Python port. It is a "Lead-Follow" project where the MATLAB codebase is the Source of Truth.
55

66
## 2. Core Instructions
77
Before proposing or writing any code, you MUST read and adhere to the following project-specific files:
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
name: Test Cross-Language Symmetry
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
workflow_dispatch:
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
symmetry:
16+
name: MATLAB ↔ Python symmetry tests
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
# ── Checkout both repos ────────────────────────────────────────────
21+
- name: Check out NDI-python
22+
uses: actions/checkout@v4
23+
with:
24+
path: NDI-python
25+
26+
- name: Check out NDI-matlab
27+
uses: actions/checkout@v4
28+
with:
29+
repository: VH-Lab/NDI-matlab
30+
path: NDI-matlab
31+
32+
# ── Runtime setup ──────────────────────────────────────────────────
33+
- name: Start virtual display server
34+
run: |
35+
sudo apt-get install -y xvfb
36+
Xvfb :99 &
37+
echo "DISPLAY=:99" >> $GITHUB_ENV
38+
39+
- name: Set up MATLAB
40+
uses: matlab-actions/setup-matlab@v2
41+
with:
42+
release: latest
43+
cache: true
44+
products: |
45+
Communications_Toolbox
46+
Statistics_and_Machine_Learning_Toolbox
47+
Signal_Processing_Toolbox
48+
49+
- name: Install MatBox
50+
uses: ehennestad/matbox-actions/install-matbox@v1
51+
52+
- name: Set up Python
53+
uses: actions/setup-python@v5
54+
with:
55+
python-version: "3.12"
56+
57+
- name: Install NDI-python
58+
working-directory: NDI-python
59+
run: |
60+
python -m pip install --upgrade pip
61+
python ndi_install.py --dev --no-validate --verbose
62+
63+
# ── Stage 1: MATLAB makeArtifacts ──────────────────────────────────
64+
- name: "Stage 1: MATLAB makeArtifacts"
65+
uses: matlab-actions/run-command@v2
66+
with:
67+
command: |
68+
cd("NDI-matlab");
69+
addpath(genpath("src"));
70+
addpath(genpath("tests"));
71+
addpath(genpath("tools"));
72+
matbox.installRequirements(fullfile(pwd, "tests"));
73+
74+
import matlab.unittest.TestSuite
75+
import matlab.unittest.TestRunner
76+
77+
suite = TestSuite.fromPackage("ndi.symmetry.makeArtifacts", "IncludingSubpackages", true);
78+
fprintf("\n=== MATLAB makeArtifacts: %d test(s) ===\n", numel(suite));
79+
assert(~isempty(suite), "No MATLAB makeArtifacts tests found.")
80+
81+
runner = TestRunner.withTextOutput("Verbosity", "Detailed");
82+
results = runner.run(suite);
83+
84+
fprintf("\n=== MATLAB makeArtifacts: %d passed, %d failed ===\n", ...
85+
nnz([results.Passed]), nnz([results.Failed]));
86+
assert(all(~[results.Failed]), "MATLAB makeArtifacts failed")
87+
88+
# ── Stage 2: Python makeArtifacts + readArtifacts ──────────────────
89+
- name: "Stage 2: Python symmetry tests (make + read)"
90+
working-directory: NDI-python
91+
run: |
92+
echo "=== Running Python makeArtifacts ==="
93+
pytest tests/symmetry/make_artifacts/ -v --tb=short
94+
95+
echo ""
96+
echo "=== Running Python readArtifacts (reads both MATLAB and Python artifacts) ==="
97+
pytest tests/symmetry/read_artifacts/ -v --tb=short
98+
99+
# ── Stage 3: MATLAB readArtifacts ──────────────────────────────────
100+
- name: "Stage 3: MATLAB readArtifacts (reads Python artifacts)"
101+
uses: matlab-actions/run-command@v2
102+
with:
103+
command: |
104+
cd("NDI-matlab");
105+
addpath(genpath("src"));
106+
addpath(genpath("tests"));
107+
addpath(genpath("tools"));
108+
matbox.installRequirements(fullfile(pwd, "tests"));
109+
110+
import matlab.unittest.TestSuite
111+
import matlab.unittest.TestRunner
112+
113+
suite = TestSuite.fromPackage("ndi.symmetry.readArtifacts", "IncludingSubpackages", true);
114+
fprintf("\n=== MATLAB readArtifacts: %d test(s) ===\n", numel(suite));
115+
assert(~isempty(suite), "No MATLAB readArtifacts tests found.")
116+
117+
runner = TestRunner.withTextOutput("Verbosity", "Detailed");
118+
results = runner.run(suite);
119+
120+
fprintf("\n=== MATLAB readArtifacts: %d passed, %d failed ===\n", ...
121+
nnz([results.Passed]), nnz([results.Failed]));
122+
assert(all(~[results.Failed]), "MATLAB readArtifacts failed")

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## 1. Role & Mission
44

5-
You are an AI Developer for the NDI (Neuroscience Data Interface) project. Your mission is to maintain 1:1 functional and semantic parity between the mature MATLAB (Source of Truth) codebase and the Python port.
5+
You are an AI Developer for the NDI (Neuroscience ndi_gui_Data Interface) project. Your mission is to maintain 1:1 functional and semantic parity between the mature MATLAB (Source of Truth) codebase and the Python port.
66

77
## 2. The Mandatory Knowledge Base
88

@@ -34,5 +34,5 @@ Every sub-package contains a file named `ndi_matlab_python_bridge.yaml`.
3434

3535
## 5. Directory Mapping Reference
3636

37-
- **MATLAB Source:** `VH-Lab/NDI-matlab` (GitHub)
37+
- **MATLAB Source:** `VH-ndi_gui_Lab/NDI-matlab` (GitHub)
3838
- **Python Target:** `src/ndi/[namespace]/` (Mirrors MATLAB `+namespace/`)

0 commit comments

Comments
 (0)