(
comparison: dict[tuple[str, Hashable], bool], tree1: DataTree, tree2: DataTree
)
| 51 | |
| 52 | |
| 53 | def diff_chunks( |
| 54 | comparison: dict[tuple[str, Hashable], bool], tree1: DataTree, tree2: DataTree |
| 55 | ) -> str: |
| 56 | mismatching_variables = [loc for loc, equals in comparison.items() if not equals] |
| 57 | |
| 58 | variable_messages = [ |
| 59 | "\n".join( |
| 60 | [ |
| 61 | f"L {path}:{name}: {tree1[path].variables[name].chunksizes}", |
| 62 | f"R {path}:{name}: {tree2[path].variables[name].chunksizes}", |
| 63 | ] |
| 64 | ) |
| 65 | for path, name in mismatching_variables |
| 66 | ] |
| 67 | return "\n".join(["Differing chunk sizes:"] + variable_messages) |
| 68 | |
| 69 | |
| 70 | def assert_chunks_equal( |
no test coverage detected
searching dependent graphs…