From 6cfe26d933841f8d5b4e38cb1ef88be9924f31ce Mon Sep 17 00:00:00 2001 From: Moritz Potthoff Date: Fri, 23 Oct 2026 23:09:48 +0200 Subject: [PATCH 1/4] init --- diffly/cli.py | 10 ++++++++ diffly/comparison.py | 4 ++++ diffly/summary.py | 32 +++++++++++++++++--------- diffly/testing.py | 8 +++++++ tests/cli/test_cli.py | 21 +++++++++++++++++ tests/summary/test_summary.py | 43 +++++++++++++++++++++++++++-------- 6 files changed, 98 insertions(+), 20 deletions(-) diff --git a/diffly/cli.py b/diffly/cli.py index ea4c605..8ce53a3 100644 --- a/diffly/cli.py +++ b/diffly/cli.py @@ -159,6 +159,15 @@ def main( ) ), ] = [], + percentage_decimals: Annotated[ + int, + typer.Option( + help=( + "The number of decimal places to show for percentages in the summary, " + "e.g. column match rates." + ) + ), + ] = 2, ) -> None: """Compare two `parquet` files and print the comparison result.""" if hidden_columns: @@ -202,6 +211,7 @@ def main( hidden_columns=hidden_column, data_metrics=data_metrics, change_metrics=change_metrics, + percentage_decimals=percentage_decimals, ) if output_json: typer.echo(summary.to_json()) diff --git a/diffly/comparison.py b/diffly/comparison.py index 3512e25..2402706 100644 --- a/diffly/comparison.py +++ b/diffly/comparison.py @@ -942,6 +942,7 @@ def summary( hidden_columns: list[str] | None = None, data_metrics: Mapping[str, DataMetricFn | DataMetric] | None = None, change_metrics: Mapping[str, ChangeMetricFn | ChangeMetric] | None = None, + percentage_decimals: int = 2, ) -> Summary: """Generate a summary of all aspects of the comparison. @@ -995,6 +996,8 @@ def summary( (default), no metrics are computed; presets are not applied automatically. Prefer short labels — the summary has a fixed width and many or long labels degrade rendering. + percentage_decimals: The number of decimal places to show for percentages + in the summary, e.g. column match rates. Returns: A summary which can be printed or written to a file. @@ -1033,6 +1036,7 @@ def summary( hidden_columns=hidden_columns, data_metrics=resolved_data_metrics, change_metrics=resolved_change_metrics, + percentage_decimals=percentage_decimals, ) # ----------------------------------- UTILITIES ----------------------------------- # diff --git a/diffly/summary.py b/diffly/summary.py index 4cc8816..dacb486 100644 --- a/diffly/summary.py +++ b/diffly/summary.py @@ -64,8 +64,10 @@ def __init__( hidden_columns: list[str] | None, data_metrics: Mapping[str, DataMetric] | None, change_metrics: Mapping[str, ChangeMetric] | None, + percentage_decimals: int, ): self.slim = slim + self.percentage_decimals = percentage_decimals self._data = _compute_summary_data( comparison, show_perfect_column_matches=show_perfect_column_matches, @@ -392,9 +394,13 @@ def _section_row_counts(self) -> RenderableType: if rows.n_left > 0: fraction_rows_right = rows.n_right / rows.n_left if fraction_rows_right > 1: - gain_loss = f"(+{(fraction_rows_right - 1):.2%})" + gain_loss = ( + f"(+{(fraction_rows_right - 1):.{self.percentage_decimals}%})" + ) elif fraction_rows_right < 1: - gain_loss = f"(-{(1 - fraction_rows_right):.2%})" + gain_loss = ( + f"(-{(1 - fraction_rows_right):.{self.percentage_decimals}%})" + ) else: gain_loss = "(no change)" @@ -424,6 +430,7 @@ def _section_row_matches(self) -> RenderableType: assert rows.n_joined_unequal is not None assert rows.n_right_only is not None n_joined = rows.n_joined_equal + rows.n_joined_unequal + decimals = self.percentage_decimals columns: list[RenderableType] = [] num_dummy_cols = 5 @@ -512,7 +519,7 @@ def _section_row_matches(self) -> RenderableType: grid.add_row( f"{rows.n_left_only:,}", f"{self._data._truncated_left_name} only", - f"({_format_fraction_as_percentage(fraction_left_only)})", + f"({_format_fraction_as_percentage(fraction_left_only, decimals)})", ) grid.add_section() if rows.n_joined_equal > 0: @@ -520,7 +527,7 @@ def _section_row_matches(self) -> RenderableType: grid.add_row( f"{rows.n_joined_equal:,}", "equal", - f"({_format_fraction_as_percentage(fraction_equal)})", + f"({_format_fraction_as_percentage(fraction_equal, decimals)})", ) grid.add_section() if rows.n_joined_unequal > 0: @@ -528,7 +535,7 @@ def _section_row_matches(self) -> RenderableType: grid.add_row( f"{rows.n_joined_unequal:,}", "unequal", - f"({_format_fraction_as_percentage(fraction_unequal)})", + f"({_format_fraction_as_percentage(fraction_unequal, decimals)})", ) grid.add_section() if rows.n_right_only > 0: @@ -536,7 +543,7 @@ def _section_row_matches(self) -> RenderableType: grid.add_row( f"{rows.n_right_only:,}", f"{self._data._truncated_right_name} only", - f"({_format_fraction_as_percentage(fraction_right_only)})", + f"({_format_fraction_as_percentage(fraction_right_only, decimals)})", ) columns.append(grid) @@ -594,10 +601,11 @@ def _section_columns(self) -> RenderableType: if has_top_changes_column: matches.add_column("Top Changes", justify="right") max_col_len = max(len(c.name) for c in columns) + decimals = self.percentage_decimals for col in columns: row_items: list[RenderableType] = [ Text(col.name, style="cyan"), - f"{_format_fraction_as_percentage(col.match_rate)}", + f"{_format_fraction_as_percentage(col.match_rate, decimals)}", ] for label in self._data._change_metric_labels: value = ( @@ -1228,13 +1236,14 @@ def _format_colname(name: str) -> str: return f"[cyan]{name}[/cyan]" -def _format_fraction_as_percentage(fraction: float) -> str: - """Format a fraction as a percentage with two decimal places. +def _format_fraction_as_percentage(fraction: float, decimals: int) -> str: + """Format a fraction as a percentage with the given number of decimal places. Only shows 0%/100% if the fraction is exactly 0 or 1, respectively. Args: fraction: The fraction to format as a percentage. Must be in the range [0, 1]. + decimals: The number of decimal places to show. Returns: The formatted percentage, including a percent sign. @@ -1242,8 +1251,9 @@ def _format_fraction_as_percentage(fraction: float) -> str: assert 0 <= fraction <= 1, "Fraction must be between 0 and 1" percentage = fraction * 100 if percentage not in [0, 100]: - percentage = min(max(percentage, 0.01), 99.99) - return f"{percentage:.2f}%" + smallest = 10**-decimals + percentage = min(max(percentage, smallest), 100 - smallest) + return f"{percentage:.{decimals}f}%" def _yellow(raw: Any) -> str: diff --git a/diffly/testing.py b/diffly/testing.py index 7b98393..a63dd80 100644 --- a/diffly/testing.py +++ b/diffly/testing.py @@ -104,6 +104,7 @@ def assert_collection_equal( hidden_columns: list[str] | None = None, data_metrics: Mapping[str, DataMetricFn | DataMetric] | None = None, change_metrics: Mapping[str, ChangeMetricFn | ChangeMetric] | None = None, + percentage_decimals: int = 2, ) -> None: """Assert that two :mod:`dataframely` collections are equal. @@ -159,6 +160,8 @@ def assert_collection_equal( target other column types, construct the metric explicitly with a column selector. See :mod:`diffly.metrics` for presets. When ``None`` (default), no change metrics are computed. + percentage_decimals: The number of decimal places to show for percentages in + the summary, e.g. column match rates. Raises: CollectionComparisonAssertionError: If the collections are not equal. @@ -217,6 +220,7 @@ def assert_collection_equal( hidden_columns=hidden_columns, data_metrics=data_metrics, change_metrics=change_metrics, + percentage_decimals=percentage_decimals, ) ) }""" @@ -251,6 +255,7 @@ def assert_frame_equal( hidden_columns: list[str] | None = None, data_metrics: Mapping[str, DataMetricFn | DataMetric] | None = None, change_metrics: Mapping[str, ChangeMetricFn | ChangeMetric] | None = None, + percentage_decimals: int = 2, ) -> None: """Assert that two :mod:`polars` data frames are equal. @@ -313,6 +318,8 @@ def assert_frame_equal( target other column types, construct the metric explicitly with a column selector. See :mod:`diffly.metrics` for presets. When ``None`` (default), no change metrics are computed. + percentage_decimals: The number of decimal places to show for percentages in + the summary, e.g. column match rates. Raises: FrameComparisonAssertionError: If the data frames are not equal. @@ -360,6 +367,7 @@ def assert_frame_equal( hidden_columns=hidden_columns, data_metrics=data_metrics, change_metrics=change_metrics, + percentage_decimals=percentage_decimals, ) text = textwrap.indent(str(summary), " " * 2) raise FrameComparisonAssertionError( diff --git a/tests/cli/test_cli.py b/tests/cli/test_cli.py index c4973a5..9fa3e2b 100644 --- a/tests/cli/test_cli.py +++ b/tests/cli/test_cli.py @@ -103,6 +103,27 @@ def test_cli_hidden_columns_alias_warns(tmp_path: Path) -> None: assert result.exit_code == 0 +def test_cli_percentage_decimals(tmp_path: Path) -> None: + left = pl.DataFrame({"id": [1, 2, 3], "x": [1, 2, 3]}) + right = pl.DataFrame({"id": [1, 2, 3], "x": [1, 2, 4]}) + left.write_parquet(tmp_path / "left.parquet") + right.write_parquet(tmp_path / "right.parquet") + + result = runner.invoke( + app, + [ + str(tmp_path / "left.parquet"), + str(tmp_path / "right.parquet"), + "--primary-key", + "id", + "--percentage-decimals", + "3", + ], + ) + assert result.exit_code == 0 + assert "66.667%" in result.output + + @pytest.mark.parametrize( "flag, name, expected", [ diff --git a/tests/summary/test_summary.py b/tests/summary/test_summary.py index 3fb7d4c..02c6440 100644 --- a/tests/summary/test_summary.py +++ b/tests/summary/test_summary.py @@ -65,18 +65,43 @@ def test_summary_all_columns_join_cols( @pytest.mark.parametrize( - "fraction, expected", + "fraction, decimals, expected", [ - (0.5, "50.00%"), - (0.123456, "12.35%"), - (0.000001, "0.01%"), - (0.999999, "99.99%"), - (0, "0.00%"), - (1, "100.00%"), + (0.5, 2, "50.00%"), + (0.123456, 2, "12.35%"), + (0.000001, 2, "0.01%"), + (0.999999, 2, "99.99%"), + (0, 2, "0.00%"), + (1, 2, "100.00%"), + (0.123456, 0, "12%"), + (0.000001, 0, "1%"), + (0.999999, 0, "99%"), + (0, 0, "0%"), + (1, 0, "100%"), + (0.123456, 4, "12.3456%"), + (0.0000001, 4, "0.0001%"), + (0.9999999, 4, "99.9999%"), ], ) -def test__format_fraction_as_percentage(fraction: float, expected: str) -> None: - assert _format_fraction_as_percentage(fraction) == expected +def test__format_fraction_as_percentage( + fraction: float, decimals: int, expected: str +) -> None: + assert _format_fraction_as_percentage(fraction, decimals) == expected + + +def test_summary_percentage_decimals() -> None: + left = pl.DataFrame({"id": [1, 2, 3], "x": [1, 2, 3]}) + right = pl.DataFrame({"id": [1, 2, 3, 4], "x": [1, 2, 4, 5]}) + comp = compare_frames(left, right, primary_key="id") + + default = str(comp.summary()) + assert "66.67%" in default + assert "(+33.33%)" in default + + summary = str(comp.summary(percentage_decimals=4)) + assert "66.6667%" in summary + assert "(+33.3333%)" in summary + assert "(25.0000%)" in summary def test_validate_primary_key_hidden_columns() -> None: From c8dc4c623e68bddc7b3b3d050f2a44674b203942 Mon Sep 17 00:00:00 2001 From: Moritz Potthoff <160181542+MoritzPotthoffQC@users.noreply.github.com> Date: Fri, 23 Oct 2026 23:38:20 +0200 Subject: [PATCH 2/4] Fix indentation for percentage_decimals option Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- diffly/cli.py | 1 + 1 file changed, 1 insertion(+) diff --git a/diffly/cli.py b/diffly/cli.py index 8ce53a3..94871a4 100644 --- a/diffly/cli.py +++ b/diffly/cli.py @@ -162,6 +162,7 @@ def main( percentage_decimals: Annotated[ int, typer.Option( + min=0, help=( "The number of decimal places to show for percentages in the summary, " "e.g. column match rates." From ffe36f15860fc7aadac132866a8d607e141d2ff0 Mon Sep 17 00:00:00 2001 From: Moritz Potthoff Date: Fri, 23 Oct 2026 23:58:01 +0200 Subject: [PATCH 3/4] lint --- diffly/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diffly/cli.py b/diffly/cli.py index 94871a4..f5e37b1 100644 --- a/diffly/cli.py +++ b/diffly/cli.py @@ -166,7 +166,7 @@ def main( help=( "The number of decimal places to show for percentages in the summary, " "e.g. column match rates." - ) + ), ), ] = 2, ) -> None: From c0cac343eb22bc9a73051cb32c7df4705dcf5e03 Mon Sep 17 00:00:00 2001 From: Moritz Potthoff Date: Mon, 26 Oct 2026 10:14:39 +0100 Subject: [PATCH 4/4] review --- ...alse_sample_rows_False_sample_pk_False.txt | 27 ++++++++++++++ ...False_sample_rows_True_sample_pk_False.txt | 37 +++++++++++++++++++ ...True_sample_rows_False_sample_pk_False.txt | 18 +++++++++ ..._True_sample_rows_True_sample_pk_False.txt | 28 ++++++++++++++ ...alse_sample_rows_False_sample_pk_False.txt | 27 ++++++++++++++ ..._False_sample_rows_True_sample_pk_True.txt | 37 +++++++++++++++++++ ...True_sample_rows_False_sample_pk_False.txt | 18 +++++++++ ...m_True_sample_rows_True_sample_pk_True.txt | 28 ++++++++++++++ ...alse_sample_rows_False_sample_pk_False.txt | 27 ++++++++++++++ ...False_sample_rows_True_sample_pk_False.txt | 37 +++++++++++++++++++ ...True_sample_rows_False_sample_pk_False.txt | 18 +++++++++ ..._True_sample_rows_True_sample_pk_False.txt | 28 ++++++++++++++ ...alse_sample_rows_False_sample_pk_False.txt | 27 ++++++++++++++ ..._False_sample_rows_True_sample_pk_True.txt | 37 +++++++++++++++++++ ...True_sample_rows_False_sample_pk_False.txt | 18 +++++++++ ...m_True_sample_rows_True_sample_pk_True.txt | 28 ++++++++++++++ ...alse_sample_rows_False_sample_pk_False.txt | 27 ++++++++++++++ ...False_sample_rows_True_sample_pk_False.txt | 37 +++++++++++++++++++ ...True_sample_rows_False_sample_pk_False.txt | 18 +++++++++ ..._True_sample_rows_True_sample_pk_False.txt | 28 ++++++++++++++ ...alse_sample_rows_False_sample_pk_False.txt | 27 ++++++++++++++ ..._False_sample_rows_True_sample_pk_True.txt | 37 +++++++++++++++++++ ...True_sample_rows_False_sample_pk_False.txt | 18 +++++++++ ...m_True_sample_rows_True_sample_pk_True.txt | 28 ++++++++++++++ ...alse_sample_rows_False_sample_pk_False.txt | 27 ++++++++++++++ ...False_sample_rows_True_sample_pk_False.txt | 37 +++++++++++++++++++ ...True_sample_rows_False_sample_pk_False.txt | 18 +++++++++ ..._True_sample_rows_True_sample_pk_False.txt | 28 ++++++++++++++ ...alse_sample_rows_False_sample_pk_False.txt | 27 ++++++++++++++ ..._False_sample_rows_True_sample_pk_True.txt | 37 +++++++++++++++++++ ...True_sample_rows_False_sample_pk_False.txt | 18 +++++++++ ...m_True_sample_rows_True_sample_pk_True.txt | 28 ++++++++++++++ .../test_percentage_decimals.py | 28 ++++++++++++++ tests/summary/test_summary.py | 15 -------- 34 files changed, 908 insertions(+), 15 deletions(-) create mode 100644 tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_False_top_False_slim_False_sample_rows_False_sample_pk_False.txt create mode 100644 tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_False_top_False_slim_False_sample_rows_True_sample_pk_False.txt create mode 100644 tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_False_top_False_slim_True_sample_rows_False_sample_pk_False.txt create mode 100644 tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_False_top_False_slim_True_sample_rows_True_sample_pk_False.txt create mode 100644 tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_False_sample_pk_False.txt create mode 100644 tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_True_sample_pk_True.txt create mode 100644 tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_False_top_True_slim_True_sample_rows_False_sample_pk_False.txt create mode 100644 tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_False_top_True_slim_True_sample_rows_True_sample_pk_True.txt create mode 100644 tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_True_top_False_slim_False_sample_rows_False_sample_pk_False.txt create mode 100644 tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_True_top_False_slim_False_sample_rows_True_sample_pk_False.txt create mode 100644 tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_True_top_False_slim_True_sample_rows_False_sample_pk_False.txt create mode 100644 tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_True_top_False_slim_True_sample_rows_True_sample_pk_False.txt create mode 100644 tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_True_top_True_slim_False_sample_rows_False_sample_pk_False.txt create mode 100644 tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_True_top_True_slim_False_sample_rows_True_sample_pk_True.txt create mode 100644 tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_True_top_True_slim_True_sample_rows_False_sample_pk_False.txt create mode 100644 tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_True_top_True_slim_True_sample_rows_True_sample_pk_True.txt create mode 100644 tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_False_top_False_slim_False_sample_rows_False_sample_pk_False.txt create mode 100644 tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_False_top_False_slim_False_sample_rows_True_sample_pk_False.txt create mode 100644 tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_False_top_False_slim_True_sample_rows_False_sample_pk_False.txt create mode 100644 tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_False_top_False_slim_True_sample_rows_True_sample_pk_False.txt create mode 100644 tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_False_top_True_slim_False_sample_rows_False_sample_pk_False.txt create mode 100644 tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_False_top_True_slim_False_sample_rows_True_sample_pk_True.txt create mode 100644 tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_False_top_True_slim_True_sample_rows_False_sample_pk_False.txt create mode 100644 tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_False_top_True_slim_True_sample_rows_True_sample_pk_True.txt create mode 100644 tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_True_top_False_slim_False_sample_rows_False_sample_pk_False.txt create mode 100644 tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_True_top_False_slim_False_sample_rows_True_sample_pk_False.txt create mode 100644 tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_True_top_False_slim_True_sample_rows_False_sample_pk_False.txt create mode 100644 tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_True_top_False_slim_True_sample_rows_True_sample_pk_False.txt create mode 100644 tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_True_top_True_slim_False_sample_rows_False_sample_pk_False.txt create mode 100644 tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_True_top_True_slim_False_sample_rows_True_sample_pk_True.txt create mode 100644 tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_True_top_True_slim_True_sample_rows_False_sample_pk_False.txt create mode 100644 tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_True_top_True_slim_True_sample_rows_True_sample_pk_True.txt create mode 100644 tests/summary/fixtures/percentage_decimals/test_percentage_decimals.py diff --git a/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_False_top_False_slim_False_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_False_top_False_slim_False_sample_rows_False_sample_pk_False.txt new file mode 100644 index 0000000..773d641 --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_False_top_False_slim_False_sample_rows_False_sample_pk_False.txt @@ -0,0 +1,27 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃ Diffly Summary ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + Primary key: key + + Schemas + ▔▔▔▔▔▔▔ + Schemas match exactly (column count: 2). + + Rows + ▔▔▔▔ + Left count Right count + 100,000 (+0.0030%) 100,003 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 99,999 equal (99.9990%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 100,000 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 1 unequal (0.0010%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + ┃+│+│+│+│+┃ 3 right only (0.0030%) + ┗━┷━┷━┷━┷━┛ + + Columns + ▔▔▔▔▔▔▔ + ┌───────┬──────────┐ + │ value │ 99.9990% │ + └───────┴──────────┘ diff --git a/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_False_top_False_slim_False_sample_rows_True_sample_pk_False.txt b/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_False_top_False_slim_False_sample_rows_True_sample_pk_False.txt new file mode 100644 index 0000000..cbad4fe --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_False_top_False_slim_False_sample_rows_True_sample_pk_False.txt @@ -0,0 +1,37 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃ Diffly Summary ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + Primary key: key + + Schemas + ▔▔▔▔▔▔▔ + Schemas match exactly (column count: 2). + + Rows + ▔▔▔▔ + Left count Right count + 100,000 (+0.0030%) 100,003 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 99,999 equal (99.9990%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 100,000 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 1 unequal (0.0010%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + ┃+│+│+│+│+┃ 3 right only (0.0030%) + ┗━┷━┷━┷━┷━┛ + + Columns + ▔▔▔▔▔▔▔ + ┌───────┬──────────┐ + │ value │ 99.9990% │ + └───────┴──────────┘ + + Rows right only + ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ + ┏━━━━━━━━┓ + ┃ key ┃ + ┡━━━━━━━━┩ + │ 100000 │ + │ 100001 │ + │ 100002 │ + └────────┘ diff --git a/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_False_top_False_slim_True_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_False_top_False_slim_True_sample_rows_False_sample_pk_False.txt new file mode 100644 index 0000000..747af2e --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_False_top_False_slim_True_sample_rows_False_sample_pk_False.txt @@ -0,0 +1,18 @@ + Rows + ▔▔▔▔ + Left count Right count + 100,000 (+0.0030%) 100,003 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 99,999 equal (99.9990%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 100,000 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 1 unequal (0.0010%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + ┃+│+│+│+│+┃ 3 right only (0.0030%) + ┗━┷━┷━┷━┷━┛ + + Columns + ▔▔▔▔▔▔▔ + ┌───────┬──────────┐ + │ value │ 99.9990% │ + └───────┴──────────┘ diff --git a/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_False_top_False_slim_True_sample_rows_True_sample_pk_False.txt b/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_False_top_False_slim_True_sample_rows_True_sample_pk_False.txt new file mode 100644 index 0000000..4959fd2 --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_False_top_False_slim_True_sample_rows_True_sample_pk_False.txt @@ -0,0 +1,28 @@ + Rows + ▔▔▔▔ + Left count Right count + 100,000 (+0.0030%) 100,003 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 99,999 equal (99.9990%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 100,000 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 1 unequal (0.0010%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + ┃+│+│+│+│+┃ 3 right only (0.0030%) + ┗━┷━┷━┷━┷━┛ + + Columns + ▔▔▔▔▔▔▔ + ┌───────┬──────────┐ + │ value │ 99.9990% │ + └───────┴──────────┘ + + Rows right only + ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ + ┏━━━━━━━━┓ + ┃ key ┃ + ┡━━━━━━━━┩ + │ 100000 │ + │ 100001 │ + │ 100002 │ + └────────┘ diff --git a/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_False_sample_pk_False.txt new file mode 100644 index 0000000..759d4ad --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_False_sample_pk_False.txt @@ -0,0 +1,27 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃ Diffly Summary ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + Primary key: key + + Schemas + ▔▔▔▔▔▔▔ + Schemas match exactly (column count: 2). + + Rows + ▔▔▔▔ + Left count Right count + 100,000 (+0.0030%) 100,003 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 99,999 equal (99.9990%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 100,000 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 1 unequal (0.0010%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + ┃+│+│+│+│+┃ 3 right only (0.0030%) + ┗━┷━┷━┷━┷━┛ + + Columns + ▔▔▔▔▔▔▔ + ┌───────┬──────────┬─────────────┐ + │ value │ 99.9990% │ 0 -> 1 (1x) │ + └───────┴──────────┴─────────────┘ diff --git a/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_True_sample_pk_True.txt b/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_True_sample_pk_True.txt new file mode 100644 index 0000000..29f6839 --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_True_sample_pk_True.txt @@ -0,0 +1,37 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃ Diffly Summary ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + Primary key: key + + Schemas + ▔▔▔▔▔▔▔ + Schemas match exactly (column count: 2). + + Rows + ▔▔▔▔ + Left count Right count + 100,000 (+0.0030%) 100,003 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 99,999 equal (99.9990%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 100,000 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 1 unequal (0.0010%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + ┃+│+│+│+│+┃ 3 right only (0.0030%) + ┗━┷━┷━┷━┷━┛ + + Columns + ▔▔▔▔▔▔▔ + ┌───────┬──────────┬─────────────────────┐ + │ value │ 99.9990% │ 0 -> 1 (1x, e.g. 0) │ + └───────┴──────────┴─────────────────────┘ + + Rows right only + ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ + ┏━━━━━━━━┓ + ┃ key ┃ + ┡━━━━━━━━┩ + │ 100000 │ + │ 100001 │ + │ 100002 │ + └────────┘ diff --git a/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_False_top_True_slim_True_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_False_top_True_slim_True_sample_rows_False_sample_pk_False.txt new file mode 100644 index 0000000..9b43dcc --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_False_top_True_slim_True_sample_rows_False_sample_pk_False.txt @@ -0,0 +1,18 @@ + Rows + ▔▔▔▔ + Left count Right count + 100,000 (+0.0030%) 100,003 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 99,999 equal (99.9990%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 100,000 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 1 unequal (0.0010%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + ┃+│+│+│+│+┃ 3 right only (0.0030%) + ┗━┷━┷━┷━┷━┛ + + Columns + ▔▔▔▔▔▔▔ + ┌───────┬──────────┬─────────────┐ + │ value │ 99.9990% │ 0 -> 1 (1x) │ + └───────┴──────────┴─────────────┘ diff --git a/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_False_top_True_slim_True_sample_rows_True_sample_pk_True.txt b/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_False_top_True_slim_True_sample_rows_True_sample_pk_True.txt new file mode 100644 index 0000000..6171fe9 --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_False_top_True_slim_True_sample_rows_True_sample_pk_True.txt @@ -0,0 +1,28 @@ + Rows + ▔▔▔▔ + Left count Right count + 100,000 (+0.0030%) 100,003 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 99,999 equal (99.9990%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 100,000 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 1 unequal (0.0010%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + ┃+│+│+│+│+┃ 3 right only (0.0030%) + ┗━┷━┷━┷━┷━┛ + + Columns + ▔▔▔▔▔▔▔ + ┌───────┬──────────┬─────────────────────┐ + │ value │ 99.9990% │ 0 -> 1 (1x, e.g. 0) │ + └───────┴──────────┴─────────────────────┘ + + Rows right only + ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ + ┏━━━━━━━━┓ + ┃ key ┃ + ┡━━━━━━━━┩ + │ 100000 │ + │ 100001 │ + │ 100002 │ + └────────┘ diff --git a/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_True_top_False_slim_False_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_True_top_False_slim_False_sample_rows_False_sample_pk_False.txt new file mode 100644 index 0000000..773d641 --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_True_top_False_slim_False_sample_rows_False_sample_pk_False.txt @@ -0,0 +1,27 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃ Diffly Summary ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + Primary key: key + + Schemas + ▔▔▔▔▔▔▔ + Schemas match exactly (column count: 2). + + Rows + ▔▔▔▔ + Left count Right count + 100,000 (+0.0030%) 100,003 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 99,999 equal (99.9990%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 100,000 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 1 unequal (0.0010%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + ┃+│+│+│+│+┃ 3 right only (0.0030%) + ┗━┷━┷━┷━┷━┛ + + Columns + ▔▔▔▔▔▔▔ + ┌───────┬──────────┐ + │ value │ 99.9990% │ + └───────┴──────────┘ diff --git a/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_True_top_False_slim_False_sample_rows_True_sample_pk_False.txt b/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_True_top_False_slim_False_sample_rows_True_sample_pk_False.txt new file mode 100644 index 0000000..cbad4fe --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_True_top_False_slim_False_sample_rows_True_sample_pk_False.txt @@ -0,0 +1,37 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃ Diffly Summary ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + Primary key: key + + Schemas + ▔▔▔▔▔▔▔ + Schemas match exactly (column count: 2). + + Rows + ▔▔▔▔ + Left count Right count + 100,000 (+0.0030%) 100,003 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 99,999 equal (99.9990%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 100,000 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 1 unequal (0.0010%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + ┃+│+│+│+│+┃ 3 right only (0.0030%) + ┗━┷━┷━┷━┷━┛ + + Columns + ▔▔▔▔▔▔▔ + ┌───────┬──────────┐ + │ value │ 99.9990% │ + └───────┴──────────┘ + + Rows right only + ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ + ┏━━━━━━━━┓ + ┃ key ┃ + ┡━━━━━━━━┩ + │ 100000 │ + │ 100001 │ + │ 100002 │ + └────────┘ diff --git a/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_True_top_False_slim_True_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_True_top_False_slim_True_sample_rows_False_sample_pk_False.txt new file mode 100644 index 0000000..747af2e --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_True_top_False_slim_True_sample_rows_False_sample_pk_False.txt @@ -0,0 +1,18 @@ + Rows + ▔▔▔▔ + Left count Right count + 100,000 (+0.0030%) 100,003 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 99,999 equal (99.9990%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 100,000 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 1 unequal (0.0010%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + ┃+│+│+│+│+┃ 3 right only (0.0030%) + ┗━┷━┷━┷━┷━┛ + + Columns + ▔▔▔▔▔▔▔ + ┌───────┬──────────┐ + │ value │ 99.9990% │ + └───────┴──────────┘ diff --git a/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_True_top_False_slim_True_sample_rows_True_sample_pk_False.txt b/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_True_top_False_slim_True_sample_rows_True_sample_pk_False.txt new file mode 100644 index 0000000..4959fd2 --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_True_top_False_slim_True_sample_rows_True_sample_pk_False.txt @@ -0,0 +1,28 @@ + Rows + ▔▔▔▔ + Left count Right count + 100,000 (+0.0030%) 100,003 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 99,999 equal (99.9990%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 100,000 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 1 unequal (0.0010%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + ┃+│+│+│+│+┃ 3 right only (0.0030%) + ┗━┷━┷━┷━┷━┛ + + Columns + ▔▔▔▔▔▔▔ + ┌───────┬──────────┐ + │ value │ 99.9990% │ + └───────┴──────────┘ + + Rows right only + ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ + ┏━━━━━━━━┓ + ┃ key ┃ + ┡━━━━━━━━┩ + │ 100000 │ + │ 100001 │ + │ 100002 │ + └────────┘ diff --git a/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_True_top_True_slim_False_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_True_top_True_slim_False_sample_rows_False_sample_pk_False.txt new file mode 100644 index 0000000..759d4ad --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_True_top_True_slim_False_sample_rows_False_sample_pk_False.txt @@ -0,0 +1,27 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃ Diffly Summary ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + Primary key: key + + Schemas + ▔▔▔▔▔▔▔ + Schemas match exactly (column count: 2). + + Rows + ▔▔▔▔ + Left count Right count + 100,000 (+0.0030%) 100,003 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 99,999 equal (99.9990%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 100,000 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 1 unequal (0.0010%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + ┃+│+│+│+│+┃ 3 right only (0.0030%) + ┗━┷━┷━┷━┷━┛ + + Columns + ▔▔▔▔▔▔▔ + ┌───────┬──────────┬─────────────┐ + │ value │ 99.9990% │ 0 -> 1 (1x) │ + └───────┴──────────┴─────────────┘ diff --git a/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_True_top_True_slim_False_sample_rows_True_sample_pk_True.txt b/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_True_top_True_slim_False_sample_rows_True_sample_pk_True.txt new file mode 100644 index 0000000..29f6839 --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_True_top_True_slim_False_sample_rows_True_sample_pk_True.txt @@ -0,0 +1,37 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃ Diffly Summary ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + Primary key: key + + Schemas + ▔▔▔▔▔▔▔ + Schemas match exactly (column count: 2). + + Rows + ▔▔▔▔ + Left count Right count + 100,000 (+0.0030%) 100,003 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 99,999 equal (99.9990%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 100,000 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 1 unequal (0.0010%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + ┃+│+│+│+│+┃ 3 right only (0.0030%) + ┗━┷━┷━┷━┷━┛ + + Columns + ▔▔▔▔▔▔▔ + ┌───────┬──────────┬─────────────────────┐ + │ value │ 99.9990% │ 0 -> 1 (1x, e.g. 0) │ + └───────┴──────────┴─────────────────────┘ + + Rows right only + ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ + ┏━━━━━━━━┓ + ┃ key ┃ + ┡━━━━━━━━┩ + │ 100000 │ + │ 100001 │ + │ 100002 │ + └────────┘ diff --git a/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_True_top_True_slim_True_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_True_top_True_slim_True_sample_rows_False_sample_pk_False.txt new file mode 100644 index 0000000..9b43dcc --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_True_top_True_slim_True_sample_rows_False_sample_pk_False.txt @@ -0,0 +1,18 @@ + Rows + ▔▔▔▔ + Left count Right count + 100,000 (+0.0030%) 100,003 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 99,999 equal (99.9990%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 100,000 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 1 unequal (0.0010%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + ┃+│+│+│+│+┃ 3 right only (0.0030%) + ┗━┷━┷━┷━┷━┛ + + Columns + ▔▔▔▔▔▔▔ + ┌───────┬──────────┬─────────────┐ + │ value │ 99.9990% │ 0 -> 1 (1x) │ + └───────┴──────────┴─────────────┘ diff --git a/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_True_top_True_slim_True_sample_rows_True_sample_pk_True.txt b/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_True_top_True_slim_True_sample_rows_True_sample_pk_True.txt new file mode 100644 index 0000000..6171fe9 --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/gen/pretty_False_perfect_True_top_True_slim_True_sample_rows_True_sample_pk_True.txt @@ -0,0 +1,28 @@ + Rows + ▔▔▔▔ + Left count Right count + 100,000 (+0.0030%) 100,003 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 99,999 equal (99.9990%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 100,000 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 1 unequal (0.0010%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + ┃+│+│+│+│+┃ 3 right only (0.0030%) + ┗━┷━┷━┷━┷━┛ + + Columns + ▔▔▔▔▔▔▔ + ┌───────┬──────────┬─────────────────────┐ + │ value │ 99.9990% │ 0 -> 1 (1x, e.g. 0) │ + └───────┴──────────┴─────────────────────┘ + + Rows right only + ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ + ┏━━━━━━━━┓ + ┃ key ┃ + ┡━━━━━━━━┩ + │ 100000 │ + │ 100001 │ + │ 100002 │ + └────────┘ diff --git a/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_False_top_False_slim_False_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_False_top_False_slim_False_sample_rows_False_sample_pk_False.txt new file mode 100644 index 0000000..0b727c2 --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_False_top_False_slim_False_sample_rows_False_sample_pk_False.txt @@ -0,0 +1,27 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃  Diffly Summary  ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + Primary key: key + + Schemas + ▔▔▔▔▔▔▔ + Schemas match exactly (column count: 2). + + Rows + ▔▔▔▔ + Left count Right count + 100,000 (+0.0030%) 100,003 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 99,999 equal (99.9990%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 100,000 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 1 unequal (0.0010%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + ┃+│+│+│+│+┃ 3 right only (0.0030%) + ┗━┷━┷━┷━┷━┛ + + Columns + ▔▔▔▔▔▔▔ + ┌───────┬──────────┐ + │ value │ 99.9990% │ + └───────┴──────────┘ diff --git a/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_False_top_False_slim_False_sample_rows_True_sample_pk_False.txt b/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_False_top_False_slim_False_sample_rows_True_sample_pk_False.txt new file mode 100644 index 0000000..d52e5bf --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_False_top_False_slim_False_sample_rows_True_sample_pk_False.txt @@ -0,0 +1,37 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃  Diffly Summary  ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + Primary key: key + + Schemas + ▔▔▔▔▔▔▔ + Schemas match exactly (column count: 2). + + Rows + ▔▔▔▔ + Left count Right count + 100,000 (+0.0030%) 100,003 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 99,999 equal (99.9990%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 100,000 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 1 unequal (0.0010%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + ┃+│+│+│+│+┃ 3 right only (0.0030%) + ┗━┷━┷━┷━┷━┛ + + Columns + ▔▔▔▔▔▔▔ + ┌───────┬──────────┐ + │ value │ 99.9990% │ + └───────┴──────────┘ + + Rows right only + ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ + ┏━━━━━━━━┓ + ┃ key  ┃ + ┡━━━━━━━━┩ + │ 100000 │ + │ 100001 │ + │ 100002 │ + └────────┘ diff --git a/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_False_top_False_slim_True_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_False_top_False_slim_True_sample_rows_False_sample_pk_False.txt new file mode 100644 index 0000000..fd63444 --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_False_top_False_slim_True_sample_rows_False_sample_pk_False.txt @@ -0,0 +1,18 @@ + Rows + ▔▔▔▔ + Left count Right count + 100,000 (+0.0030%) 100,003 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 99,999 equal (99.9990%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 100,000 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 1 unequal (0.0010%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + ┃+│+│+│+│+┃ 3 right only (0.0030%) + ┗━┷━┷━┷━┷━┛ + + Columns + ▔▔▔▔▔▔▔ + ┌───────┬──────────┐ + │ value │ 99.9990% │ + └───────┴──────────┘ diff --git a/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_False_top_False_slim_True_sample_rows_True_sample_pk_False.txt b/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_False_top_False_slim_True_sample_rows_True_sample_pk_False.txt new file mode 100644 index 0000000..1630d53 --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_False_top_False_slim_True_sample_rows_True_sample_pk_False.txt @@ -0,0 +1,28 @@ + Rows + ▔▔▔▔ + Left count Right count + 100,000 (+0.0030%) 100,003 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 99,999 equal (99.9990%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 100,000 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 1 unequal (0.0010%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + ┃+│+│+│+│+┃ 3 right only (0.0030%) + ┗━┷━┷━┷━┷━┛ + + Columns + ▔▔▔▔▔▔▔ + ┌───────┬──────────┐ + │ value │ 99.9990% │ + └───────┴──────────┘ + + Rows right only + ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ + ┏━━━━━━━━┓ + ┃ key  ┃ + ┡━━━━━━━━┩ + │ 100000 │ + │ 100001 │ + │ 100002 │ + └────────┘ diff --git a/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_False_top_True_slim_False_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_False_top_True_slim_False_sample_rows_False_sample_pk_False.txt new file mode 100644 index 0000000..17a6305 --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_False_top_True_slim_False_sample_rows_False_sample_pk_False.txt @@ -0,0 +1,27 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃  Diffly Summary  ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + Primary key: key + + Schemas + ▔▔▔▔▔▔▔ + Schemas match exactly (column count: 2). + + Rows + ▔▔▔▔ + Left count Right count + 100,000 (+0.0030%) 100,003 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 99,999 equal (99.9990%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 100,000 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 1 unequal (0.0010%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + ┃+│+│+│+│+┃ 3 right only (0.0030%) + ┗━┷━┷━┷━┷━┛ + + Columns + ▔▔▔▔▔▔▔ + ┌───────┬──────────┬─────────────┐ + │ value │ 99.9990% │ 0 -> 1 (1x) │ + └───────┴──────────┴─────────────┘ diff --git a/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_False_top_True_slim_False_sample_rows_True_sample_pk_True.txt b/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_False_top_True_slim_False_sample_rows_True_sample_pk_True.txt new file mode 100644 index 0000000..0fe9268 --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_False_top_True_slim_False_sample_rows_True_sample_pk_True.txt @@ -0,0 +1,37 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃  Diffly Summary  ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + Primary key: key + + Schemas + ▔▔▔▔▔▔▔ + Schemas match exactly (column count: 2). + + Rows + ▔▔▔▔ + Left count Right count + 100,000 (+0.0030%) 100,003 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 99,999 equal (99.9990%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 100,000 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 1 unequal (0.0010%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + ┃+│+│+│+│+┃ 3 right only (0.0030%) + ┗━┷━┷━┷━┷━┛ + + Columns + ▔▔▔▔▔▔▔ + ┌───────┬──────────┬─────────────────────┐ + │ value │ 99.9990% │ 0 -> 1 (1x, e.g. 0) │ + └───────┴──────────┴─────────────────────┘ + + Rows right only + ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ + ┏━━━━━━━━┓ + ┃ key  ┃ + ┡━━━━━━━━┩ + │ 100000 │ + │ 100001 │ + │ 100002 │ + └────────┘ diff --git a/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_False_top_True_slim_True_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_False_top_True_slim_True_sample_rows_False_sample_pk_False.txt new file mode 100644 index 0000000..4556cd5 --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_False_top_True_slim_True_sample_rows_False_sample_pk_False.txt @@ -0,0 +1,18 @@ + Rows + ▔▔▔▔ + Left count Right count + 100,000 (+0.0030%) 100,003 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 99,999 equal (99.9990%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 100,000 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 1 unequal (0.0010%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + ┃+│+│+│+│+┃ 3 right only (0.0030%) + ┗━┷━┷━┷━┷━┛ + + Columns + ▔▔▔▔▔▔▔ + ┌───────┬──────────┬─────────────┐ + │ value │ 99.9990% │ 0 -> 1 (1x) │ + └───────┴──────────┴─────────────┘ diff --git a/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_False_top_True_slim_True_sample_rows_True_sample_pk_True.txt b/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_False_top_True_slim_True_sample_rows_True_sample_pk_True.txt new file mode 100644 index 0000000..f1a6d9e --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_False_top_True_slim_True_sample_rows_True_sample_pk_True.txt @@ -0,0 +1,28 @@ + Rows + ▔▔▔▔ + Left count Right count + 100,000 (+0.0030%) 100,003 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 99,999 equal (99.9990%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 100,000 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 1 unequal (0.0010%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + ┃+│+│+│+│+┃ 3 right only (0.0030%) + ┗━┷━┷━┷━┷━┛ + + Columns + ▔▔▔▔▔▔▔ + ┌───────┬──────────┬─────────────────────┐ + │ value │ 99.9990% │ 0 -> 1 (1x, e.g. 0) │ + └───────┴──────────┴─────────────────────┘ + + Rows right only + ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ + ┏━━━━━━━━┓ + ┃ key  ┃ + ┡━━━━━━━━┩ + │ 100000 │ + │ 100001 │ + │ 100002 │ + └────────┘ diff --git a/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_True_top_False_slim_False_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_True_top_False_slim_False_sample_rows_False_sample_pk_False.txt new file mode 100644 index 0000000..0b727c2 --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_True_top_False_slim_False_sample_rows_False_sample_pk_False.txt @@ -0,0 +1,27 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃  Diffly Summary  ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + Primary key: key + + Schemas + ▔▔▔▔▔▔▔ + Schemas match exactly (column count: 2). + + Rows + ▔▔▔▔ + Left count Right count + 100,000 (+0.0030%) 100,003 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 99,999 equal (99.9990%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 100,000 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 1 unequal (0.0010%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + ┃+│+│+│+│+┃ 3 right only (0.0030%) + ┗━┷━┷━┷━┷━┛ + + Columns + ▔▔▔▔▔▔▔ + ┌───────┬──────────┐ + │ value │ 99.9990% │ + └───────┴──────────┘ diff --git a/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_True_top_False_slim_False_sample_rows_True_sample_pk_False.txt b/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_True_top_False_slim_False_sample_rows_True_sample_pk_False.txt new file mode 100644 index 0000000..d52e5bf --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_True_top_False_slim_False_sample_rows_True_sample_pk_False.txt @@ -0,0 +1,37 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃  Diffly Summary  ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + Primary key: key + + Schemas + ▔▔▔▔▔▔▔ + Schemas match exactly (column count: 2). + + Rows + ▔▔▔▔ + Left count Right count + 100,000 (+0.0030%) 100,003 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 99,999 equal (99.9990%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 100,000 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 1 unequal (0.0010%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + ┃+│+│+│+│+┃ 3 right only (0.0030%) + ┗━┷━┷━┷━┷━┛ + + Columns + ▔▔▔▔▔▔▔ + ┌───────┬──────────┐ + │ value │ 99.9990% │ + └───────┴──────────┘ + + Rows right only + ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ + ┏━━━━━━━━┓ + ┃ key  ┃ + ┡━━━━━━━━┩ + │ 100000 │ + │ 100001 │ + │ 100002 │ + └────────┘ diff --git a/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_True_top_False_slim_True_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_True_top_False_slim_True_sample_rows_False_sample_pk_False.txt new file mode 100644 index 0000000..fd63444 --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_True_top_False_slim_True_sample_rows_False_sample_pk_False.txt @@ -0,0 +1,18 @@ + Rows + ▔▔▔▔ + Left count Right count + 100,000 (+0.0030%) 100,003 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 99,999 equal (99.9990%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 100,000 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 1 unequal (0.0010%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + ┃+│+│+│+│+┃ 3 right only (0.0030%) + ┗━┷━┷━┷━┷━┛ + + Columns + ▔▔▔▔▔▔▔ + ┌───────┬──────────┐ + │ value │ 99.9990% │ + └───────┴──────────┘ diff --git a/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_True_top_False_slim_True_sample_rows_True_sample_pk_False.txt b/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_True_top_False_slim_True_sample_rows_True_sample_pk_False.txt new file mode 100644 index 0000000..1630d53 --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_True_top_False_slim_True_sample_rows_True_sample_pk_False.txt @@ -0,0 +1,28 @@ + Rows + ▔▔▔▔ + Left count Right count + 100,000 (+0.0030%) 100,003 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 99,999 equal (99.9990%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 100,000 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 1 unequal (0.0010%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + ┃+│+│+│+│+┃ 3 right only (0.0030%) + ┗━┷━┷━┷━┷━┛ + + Columns + ▔▔▔▔▔▔▔ + ┌───────┬──────────┐ + │ value │ 99.9990% │ + └───────┴──────────┘ + + Rows right only + ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ + ┏━━━━━━━━┓ + ┃ key  ┃ + ┡━━━━━━━━┩ + │ 100000 │ + │ 100001 │ + │ 100002 │ + └────────┘ diff --git a/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_True_top_True_slim_False_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_True_top_True_slim_False_sample_rows_False_sample_pk_False.txt new file mode 100644 index 0000000..17a6305 --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_True_top_True_slim_False_sample_rows_False_sample_pk_False.txt @@ -0,0 +1,27 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃  Diffly Summary  ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + Primary key: key + + Schemas + ▔▔▔▔▔▔▔ + Schemas match exactly (column count: 2). + + Rows + ▔▔▔▔ + Left count Right count + 100,000 (+0.0030%) 100,003 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 99,999 equal (99.9990%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 100,000 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 1 unequal (0.0010%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + ┃+│+│+│+│+┃ 3 right only (0.0030%) + ┗━┷━┷━┷━┷━┛ + + Columns + ▔▔▔▔▔▔▔ + ┌───────┬──────────┬─────────────┐ + │ value │ 99.9990% │ 0 -> 1 (1x) │ + └───────┴──────────┴─────────────┘ diff --git a/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_True_top_True_slim_False_sample_rows_True_sample_pk_True.txt b/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_True_top_True_slim_False_sample_rows_True_sample_pk_True.txt new file mode 100644 index 0000000..0fe9268 --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_True_top_True_slim_False_sample_rows_True_sample_pk_True.txt @@ -0,0 +1,37 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃  Diffly Summary  ┃ +┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ + Primary key: key + + Schemas + ▔▔▔▔▔▔▔ + Schemas match exactly (column count: 2). + + Rows + ▔▔▔▔ + Left count Right count + 100,000 (+0.0030%) 100,003 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 99,999 equal (99.9990%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 100,000 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 1 unequal (0.0010%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + ┃+│+│+│+│+┃ 3 right only (0.0030%) + ┗━┷━┷━┷━┷━┛ + + Columns + ▔▔▔▔▔▔▔ + ┌───────┬──────────┬─────────────────────┐ + │ value │ 99.9990% │ 0 -> 1 (1x, e.g. 0) │ + └───────┴──────────┴─────────────────────┘ + + Rows right only + ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ + ┏━━━━━━━━┓ + ┃ key  ┃ + ┡━━━━━━━━┩ + │ 100000 │ + │ 100001 │ + │ 100002 │ + └────────┘ diff --git a/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_True_top_True_slim_True_sample_rows_False_sample_pk_False.txt b/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_True_top_True_slim_True_sample_rows_False_sample_pk_False.txt new file mode 100644 index 0000000..4556cd5 --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_True_top_True_slim_True_sample_rows_False_sample_pk_False.txt @@ -0,0 +1,18 @@ + Rows + ▔▔▔▔ + Left count Right count + 100,000 (+0.0030%) 100,003 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 99,999 equal (99.9990%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 100,000 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 1 unequal (0.0010%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + ┃+│+│+│+│+┃ 3 right only (0.0030%) + ┗━┷━┷━┷━┷━┛ + + Columns + ▔▔▔▔▔▔▔ + ┌───────┬──────────┬─────────────┐ + │ value │ 99.9990% │ 0 -> 1 (1x) │ + └───────┴──────────┴─────────────┘ diff --git a/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_True_top_True_slim_True_sample_rows_True_sample_pk_True.txt b/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_True_top_True_slim_True_sample_rows_True_sample_pk_True.txt new file mode 100644 index 0000000..f1a6d9e --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/gen/pretty_True_perfect_True_top_True_slim_True_sample_rows_True_sample_pk_True.txt @@ -0,0 +1,28 @@ + Rows + ▔▔▔▔ + Left count Right count + 100,000 (+0.0030%) 100,003 + + ┏━┯━┯━┯━┯━┓╌╌╌┏━┯━┯━┯━┯━┓╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮ + ┃ │ │ │ │ ┃ = ┃ │ │ │ │ ┃ 99,999 equal (99.9990%) │ + ┠─┼─┼─┼─┼─┨╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌├╴ 100,000 joined + ┃ │ │ │ │ ┃ ≠ ┃ │ │ │ │ ┃ 1 unequal (0.0010%) │ + ┗━┷━┷━┷━┷━┛╌╌╌┠─┼─┼─┼─┼─┨╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ + ┃+│+│+│+│+┃ 3 right only (0.0030%) + ┗━┷━┷━┷━┷━┛ + + Columns + ▔▔▔▔▔▔▔ + ┌───────┬──────────┬─────────────────────┐ + │ value │ 99.9990% │ 0 -> 1 (1x, e.g. 0) │ + └───────┴──────────┴─────────────────────┘ + + Rows right only + ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ + ┏━━━━━━━━┓ + ┃ key  ┃ + ┡━━━━━━━━┩ + │ 100000 │ + │ 100001 │ + │ 100002 │ + └────────┘ diff --git a/tests/summary/fixtures/percentage_decimals/test_percentage_decimals.py b/tests/summary/fixtures/percentage_decimals/test_percentage_decimals.py new file mode 100644 index 0000000..fe1d623 --- /dev/null +++ b/tests/summary/fixtures/percentage_decimals/test_percentage_decimals.py @@ -0,0 +1,28 @@ +# Copyright (c) QuantCo 2025-2026 +# SPDX-License-Identifier: BSD-3-Clause + +from pathlib import Path + +import polars as pl +import pytest + +from diffly import compare_frames +from tests.utils import generate_summaries + + +@pytest.mark.generate +def test_generate() -> None: + num_rows = 100_000 + num_rows_add = 3 + left = pl.DataFrame({"key": range(num_rows), "value": [0] * num_rows}) + right = pl.DataFrame( + { + "key": range(num_rows + num_rows_add), + "value": [1] + [0] * (num_rows - 1) + [1] * num_rows_add, + } + ) + comparison = compare_frames(left, right, primary_key=["key"]) + + generate_summaries( + comparison, outdir=Path(__file__).parent / "gen", percentage_decimals=4 + ) diff --git a/tests/summary/test_summary.py b/tests/summary/test_summary.py index 02c6440..0c3bca8 100644 --- a/tests/summary/test_summary.py +++ b/tests/summary/test_summary.py @@ -89,21 +89,6 @@ def test__format_fraction_as_percentage( assert _format_fraction_as_percentage(fraction, decimals) == expected -def test_summary_percentage_decimals() -> None: - left = pl.DataFrame({"id": [1, 2, 3], "x": [1, 2, 3]}) - right = pl.DataFrame({"id": [1, 2, 3, 4], "x": [1, 2, 4, 5]}) - comp = compare_frames(left, right, primary_key="id") - - default = str(comp.summary()) - assert "66.67%" in default - assert "(+33.33%)" in default - - summary = str(comp.summary(percentage_decimals=4)) - assert "66.6667%" in summary - assert "(+33.3333%)" in summary - assert "(25.0000%)" in summary - - def test_validate_primary_key_hidden_columns() -> None: df = pl.DataFrame({"id": ["a", "b", "c"]}) comp = compare_frames(