@@ -152,24 +152,12 @@ def __run_indexer(
152152 def __assert_indexer_outputs (
153153 self , root : Path , workflow_config : dict [str , dict [str , Any ]]
154154 ):
155- outputs_path = root / "output"
156- output_entries = list (outputs_path .iterdir ())
157- # Sort the output folders by creation time, most recent
158- output_entries .sort (key = lambda entry : entry .stat ().st_ctime , reverse = True )
159-
160- if not debug :
161- assert len (output_entries ) == 1 , (
162- f"Expected one output folder, found { len (output_entries )} "
163- )
155+ output_path = root / workflow_config ["storage" ]["base_dir" ]
164156
165- output_path = output_entries [0 ]
166157 assert output_path .exists (), "output folder does not exist"
167158
168- artifacts = output_path / "artifacts"
169- assert artifacts .exists (), "artifact folder does not exist"
170-
171159 # Check stats for all workflow
172- stats = json .loads ((artifacts / "stats.json" ).read_bytes ().decode ("utf-8" ))
160+ stats = json .loads ((output_path / "stats.json" ).read_bytes ().decode ("utf-8" ))
173161
174162 # Check all workflows run
175163 expected_artifacts = 0
@@ -193,7 +181,7 @@ def __assert_indexer_outputs(
193181 )
194182
195183 # Check artifacts
196- artifact_files = os .listdir (artifacts )
184+ artifact_files = os .listdir (output_path )
197185
198186 # check that the number of workflows matches the number of artifacts
199187 assert len (artifact_files ) == (expected_artifacts + 3 ), (
@@ -202,7 +190,7 @@ def __assert_indexer_outputs(
202190
203191 for artifact in artifact_files :
204192 if artifact .endswith (".parquet" ):
205- output_df = pd .read_parquet (artifacts / artifact )
193+ output_df = pd .read_parquet (output_path / artifact )
206194 artifact_name = artifact .split ("." )[0 ]
207195
208196 try :
0 commit comments