diff --git a/setup.py b/setup.py index d45981d..de0dacf 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup( name="sri-test-harness", - version="0.1.15", + version="0.1.16", author="Max Wang", author_email="max@covar.com", url="https://github.com/TranslatorSRI/TestHarness", diff --git a/test_harness/result_collector.py b/test_harness/result_collector.py index 43eefe8..33cc547 100644 --- a/test_harness/result_collector.py +++ b/test_harness/result_collector.py @@ -35,14 +35,15 @@ def collect_result(self, test: TestCase, asset: TestAsset, result: dict, url: st # add result to stats for agent in result["result"]: query_type = asset.expected_output - result_type = self.result_types.get( - get_tag(result["result"][agent]), "Test Error" - ) - self.stats[agent][query_type][result_type] += 1 + if agent in self.agents: + result_type = self.result_types.get( + get_tag(result["result"][agent]), "Test Error" + ) + self.stats[agent][query_type][result_type] += 1 # add result to csv agent_results = ",".join( - get_tag(result["result"][agent]) for agent in self.agents + get_tag(result["result"].get(agent, {"status": "Not queried"})) for agent in self.agents ) ars_pk = result["pks"].get("parent_pk", None) pk_url = f"https://arax.ncats.io/?r={ars_pk}" if ars_pk is not None else "" diff --git a/test_harness/run.py b/test_harness/run.py index b943237..428e9ca 100644 --- a/test_harness/run.py +++ b/test_harness/run.py @@ -207,7 +207,7 @@ async def run_tests( try: await reporter.upload_log( test_id, - f"Failed to parse results: {json.dumps(ars_result)}", + f"Failed to parse results: {json.dumps(ars_result, indent=4)}", ) except Exception as e: logger.error(f"[{test.id}] failed to upload failure log.")