@@ -140,13 +140,15 @@ class ValidToolTestDict(TypedDict):
140140 error : Literal [False ]
141141 tool_id : str
142142 tool_version : str
143+ profile : NotRequired [Optional [str ]]
143144 test_index : int
144145
145146
146147class InvalidToolTestDict (TypedDict ):
147148 error : Literal [True ]
148149 tool_id : str
149150 tool_version : str
151+ profile : NotRequired [Optional [str ]]
150152 test_index : int
151153 inputs : Any
152154 exception : str
@@ -303,7 +305,13 @@ def get_tool_tests(self, tool_id: str, tool_version: Optional[str] = None) -> Li
303305 return response .json ()
304306
305307 def verify_output_collection (
306- self , output_collection_def , output_collection_id , history , tool_id , tool_version = None
308+ self ,
309+ output_collection_def ,
310+ output_collection_id ,
311+ history ,
312+ tool_id ,
313+ tool_version = None ,
314+ profile : Optional [str ] = None ,
307315 ):
308316 data_collection = self ._get (
309317 f"dataset_collections/{ output_collection_id } " , data = {"instance_type" : "history" }
@@ -319,6 +327,7 @@ def verify_dataset(element, element_attrib, element_outfile):
319327 attributes = element_attrib ,
320328 tool_id = tool_id ,
321329 tool_version = tool_version ,
330+ profile = profile ,
322331 )
323332 except AssertionError as e :
324333 raise AssertionError (
@@ -327,7 +336,17 @@ def verify_dataset(element, element_attrib, element_outfile):
327336
328337 verify_collection (output_collection_def , data_collection , verify_dataset )
329338
330- def verify_output (self , history_id , jobs , output_data , output_testdef , tool_id , maxseconds , tool_version = None ):
339+ def verify_output (
340+ self ,
341+ history_id ,
342+ jobs ,
343+ output_data ,
344+ output_testdef ,
345+ tool_id ,
346+ maxseconds ,
347+ tool_version = None ,
348+ profile : Optional [str ] = None ,
349+ ):
331350 outfile = output_testdef .outfile
332351 attributes = output_testdef .attributes
333352 name = output_testdef .name
@@ -342,6 +361,7 @@ def verify_output(self, history_id, jobs, output_data, output_testdef, tool_id,
342361 attributes = attributes ,
343362 tool_id = tool_id ,
344363 tool_version = tool_version ,
364+ profile = profile ,
345365 )
346366 except AssertionError as e :
347367 raise AssertionError (f"Output { name } : { str (e )} " )
@@ -378,6 +398,7 @@ def verify_output(self, history_id, jobs, output_data, output_testdef, tool_id,
378398 primary_attributes ,
379399 tool_id = tool_id ,
380400 tool_version = tool_version ,
401+ profile = profile ,
381402 )
382403 except AssertionError as e :
383404 raise AssertionError (f"Primary output { name } : { str (e )} " )
@@ -386,7 +407,9 @@ def wait_for_jobs(self, history_id, jobs, maxseconds):
386407 for job in jobs :
387408 self .wait_for_job (job ["id" ], history_id , maxseconds )
388409
389- def verify_output_dataset (self , history_id , hda_id , outfile , attributes , tool_id , tool_version = None ):
410+ def verify_output_dataset (
411+ self , history_id , hda_id , outfile , attributes , tool_id , tool_version = None , profile : Optional [str ] = None
412+ ):
390413 fetcher = self .__dataset_fetcher (history_id )
391414 test_data_downloader = self .__test_data_downloader (tool_id , tool_version , attributes )
392415 verify_hid (
@@ -396,6 +419,7 @@ def verify_output_dataset(self, history_id, hda_id, outfile, attributes, tool_id
396419 dataset_fetcher = fetcher ,
397420 test_data_downloader = test_data_downloader ,
398421 keep_outputs_dir = self .keep_outputs_dir ,
422+ profile = profile ,
399423 )
400424 self ._verify_metadata (history_id , hda_id , attributes )
401425
@@ -1300,6 +1324,7 @@ def verify_hid(
13001324 test_data_downloader ,
13011325 dataset_fetcher = None ,
13021326 keep_outputs_dir : Optional [str ] = None ,
1327+ profile : Optional [str ] = None ,
13031328):
13041329 assert dataset_fetcher is not None
13051330
@@ -1322,6 +1347,7 @@ def verify_extra_files(extra_files):
13221347 get_filecontent = test_data_downloader ,
13231348 keep_outputs_dir = keep_outputs_dir ,
13241349 verify_extra_files = verify_extra_files ,
1350+ profile = profile ,
13251351 )
13261352
13271353
@@ -1757,6 +1783,7 @@ def register_exception(e: Exception):
17571783 tool_id = job ["tool_id" ],
17581784 maxseconds = maxseconds ,
17591785 tool_version = testdef .tool_version ,
1786+ profile = testdef .profile ,
17601787 )
17611788 except Exception as e :
17621789 register_exception (e )
@@ -1816,7 +1843,11 @@ def register_exception(e: Exception):
18161843 # the job completed so re-hit the API for more information.
18171844 data_collection_id = data_collection_list [name ]["id" ]
18181845 galaxy_interactor .verify_output_collection (
1819- output_collection_def , data_collection_id , history , job ["tool_id" ]
1846+ output_collection_def ,
1847+ data_collection_id ,
1848+ history ,
1849+ job ["tool_id" ],
1850+ profile = testdef .profile ,
18201851 )
18211852 except Exception as e :
18221853 register_exception (e )
@@ -1993,6 +2024,7 @@ class ToolTestDescription:
19932024 name : str
19942025 tool_id : str
19952026 tool_version : Optional [str ]
2027+ profile : Optional [str ]
19962028 test_index : int
19972029 num_outputs : Optional [int ]
19982030 stdout : Optional [AssertionList ]
@@ -2041,6 +2073,7 @@ def __init__(self, json_dict: ToolTestDescriptionDict):
20412073 self .request_schema = json_dict .get ("request_schema" , None )
20422074 self .tool_id = json_dict ["tool_id" ]
20432075 self .tool_version = json_dict .get ("tool_version" )
2076+ self .profile = json_dict .get ("profile" )
20442077 self .maxseconds = json_dict .get ("maxseconds" )
20452078
20462079 def test_data (self ):
@@ -2067,6 +2100,7 @@ def to_dict(self) -> ToolTestDescriptionDict:
20672100 "test_index" : self .test_index ,
20682101 "tool_id" : self .tool_id ,
20692102 "tool_version" : self .tool_version ,
2103+ "profile" : self .profile ,
20702104 "required_files" : self .required_files ,
20712105 "required_data_tables" : self .required_data_tables ,
20722106 "required_loc_files" : self .required_loc_files ,
0 commit comments