@@ -92,6 +92,55 @@ def test_pipeline_reads_hd_and_dv_inputs_together(self) -> None:
9292 result .attrs ["dv_example_path" ],
9393 )
9494
95+ def test_eye_flow_proxy_resolves_previous_pipeline_outputs (self ) -> None :
96+ with tempfile .TemporaryDirectory () as tmp_dir :
97+ tmp_path = Path (tmp_dir )
98+ hd_path = tmp_path / "sample_holodoppler.h5"
99+ dv_path = tmp_path / "sample_doppler_vision.h5"
100+ work_path = tmp_path / "work.h5"
101+
102+ with h5py .File (hd_path , "w" ) as hd_h5 :
103+ hd_h5 .create_dataset ("moment0" , data = np .array ([1.0 ], dtype = float ))
104+
105+ with h5py .File (dv_path , "w" ) as dv_h5 :
106+ dv_h5 .create_dataset ("Meta/example" , data = np .array ([2.0 ], dtype = float ))
107+
108+ with h5py .File (work_path , "w" ) as work_h5 :
109+ eye_flow = work_h5 .create_group ("EyeFlow" )
110+ previous = eye_flow .create_group ("first_pipeline" )
111+ previous .create_dataset (
112+ "summary/value" ,
113+ data = np .array ([11.0 ], dtype = float ),
114+ )
115+ latest = eye_flow .create_group ("second_pipeline" )
116+ latest .create_dataset (
117+ "summary/value" ,
118+ data = np .array ([22.0 ], dtype = float ),
119+ )
120+ latest .create_dataset (
121+ "other/path" ,
122+ data = np .array ([33.0 ], dtype = float ),
123+ )
124+
125+ with (
126+ h5py .File (work_path , "r" ) as work_h5 ,
127+ h5py .File (hd_path , "r" ) as hd_h5 ,
128+ h5py .File (dv_path , "r" ) as dv_h5 ,
129+ ):
130+ input_view = _PipelineInputView (
131+ work_h5 = work_h5 ,
132+ holodoppler_h5 = hd_h5 ,
133+ doppler_vision_h5 = dv_h5 ,
134+ )
135+
136+ latest_value = np .asarray (input_view .ef ["summary/value" ])
137+ explicit_value = np .asarray (
138+ input_view .ef ["second_pipeline/other/path" ]
139+ )
140+
141+ np .testing .assert_allclose (latest_value , np .array ([22.0 ], dtype = float ))
142+ np .testing .assert_allclose (explicit_value , np .array ([33.0 ], dtype = float ))
143+
95144
96145if __name__ == "__main__" :
97146 unittest .main ()
0 commit comments