diff --git a/tests/integration/integration_test_parse_logs.py b/tests/integration/integration_test_parse_logs.py index 8f71ccf5..a3084216 100644 --- a/tests/integration/integration_test_parse_logs.py +++ b/tests/integration/integration_test_parse_logs.py @@ -254,21 +254,39 @@ def find_run(base_path: str, run: str) -> Path: raise FileNotFoundError(f"Could not find match for {run=} in {base_path=}") -def fuzzy_merge(dfA, dfB, keyA, keyB, threshold=80, limit=1): +def fuzzy_merge(dfA, dfB, keyA, keyB, threshold=1): from rapidfuzz import fuzz, process matches_A = [] matches_B = [] + + + def preproc(x): + x = x.split('/')[-1] + x = re.sub(r'(?{{ heading }}
-

{{scene['name']}}

+

{{scene['name_A']}}

{{scene['stats_A']}}

-

{{scene['name']}}

+

{{scene['name_B']}}

{{scene['stats_B']}}

@@ -141,14 +141,14 @@

{{ heading }}

-

{{scene['name']}}

+

{{scene['name_A']}}

{{scene['stats_A']}}

-

{{scene['name']}}

+

{{scene['name_B']}}

{{scene['stats_B']}}

@@ -170,14 +170,14 @@

{{ heading }}

-

{{object['name']}}

+

{{object['name_A']}}

{{object['stats_A']}}

-

{{object['name']}}

+

{{object['name_B']}}

{{object['stats_B']}}

@@ -200,14 +200,14 @@

{{ heading }}

-

{{object['name']}}

+

{{object['name_A']}}

{{object['stats_A']}}

-

{{object['name']}}

+

{{object['name_B']}}

{{object['stats_B']}}

@@ -229,14 +229,14 @@

{{ heading }}

-

{{material['name']}}

+

{{material['name_A']}}

{{material['stats_A']}}

-

{{material['name']}}

+

{{material['name_B']}}

{{material['stats_B']}}

@@ -258,14 +258,14 @@

{{ heading }}

-

{{material['name']}}

+

{{material['name_A']}}

{{material['stats_A']}}

-

{{material['name']}}

+

{{material['name_B']}}

{{material['stats_B']}}