Skip to content

Commit cd33f6a

Browse files
fix
1 parent 71338c9 commit cd33f6a

36 files changed

Lines changed: 38 additions & 37 deletions

File tree

diffly/metrics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,5 +130,5 @@ def _quantile(left: pl.Expr, right: pl.Expr) -> pl.Expr:
130130
"Std": std,
131131
"Mean absolute deviation": mean_absolute_deviation,
132132
"Mean relative deviation": mean_relative_deviation,
133-
"ΔNull%": Metric(fn=null_fraction_change, selector=cs.all()),
133+
"Null%": Metric(fn=null_fraction_change, selector=cs.all()),
134134
}

tests/cli/test_cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@ def test_cli_null_fraction_metric(tmp_path: Path) -> None:
9494
"--primary-key",
9595
"id",
9696
"--metric",
97-
"ΔNull%",
97+
"Null%",
9898
],
9999
)
100100
assert result.exit_code == 0
101-
assert "ΔNull%" in result.output
101+
assert "Null%" in result.output
102102

103103

104104
def test_cli_unknown_metric(tmp_path: Path) -> None:

tests/summary/fixtures/metrics_null_fraction/gen/pretty_False_perfect_False_top_False_slim_False_sample_rows_False_sample_pk_False.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
Columns
2222
▔▔▔▔▔▔▔
2323
┏━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
24-
┃ Column ┃ Match Rate ┃ Mean ┃ ΔNull% ┃ str_len_delta ┃
24+
┃ Column ┃ Match Rate ┃ Mean ┃ Null% ┃ str_len_delta ┃
2525
┡━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
2626
│ price │ 40.00% │ 0.75 │ 20.0% -> 0.0% (-20.0%) │ │
2727
│ status │ 40.00% │ │ 0.0% -> 40.0% (+40.0%) │ 0 │

tests/summary/fixtures/metrics_null_fraction/gen/pretty_False_perfect_False_top_False_slim_False_sample_rows_True_sample_pk_False.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
Columns
2222
▔▔▔▔▔▔▔
2323
┏━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
24-
┃ Column ┃ Match Rate ┃ Mean ┃ ΔNull% ┃ str_len_delta ┃
24+
┃ Column ┃ Match Rate ┃ Mean ┃ Null% ┃ str_len_delta ┃
2525
┡━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
2626
│ price │ 40.00% │ 0.75 │ 20.0% -> 0.0% (-20.0%) │ │
2727
│ status │ 40.00% │ │ 0.0% -> 40.0% (+40.0%) │ 0 │

tests/summary/fixtures/metrics_null_fraction/gen/pretty_False_perfect_False_top_False_slim_True_sample_rows_False_sample_pk_False.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
Columns
1010
▔▔▔▔▔▔▔
1111
┏━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
12-
┃ Column ┃ Match Rate ┃ Mean ┃ ΔNull% ┃ str_len_delta ┃
12+
┃ Column ┃ Match Rate ┃ Mean ┃ Null% ┃ str_len_delta ┃
1313
┡━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
1414
│ price │ 40.00% │ 0.75 │ 20.0% -> 0.0% (-20.0%) │ │
1515
│ status │ 40.00% │ │ 0.0% -> 40.0% (+40.0%) │ 0 │

tests/summary/fixtures/metrics_null_fraction/gen/pretty_False_perfect_False_top_False_slim_True_sample_rows_True_sample_pk_False.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
Columns
1010
▔▔▔▔▔▔▔
1111
┏━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
12-
┃ Column ┃ Match Rate ┃ Mean ┃ ΔNull% ┃ str_len_delta ┃
12+
┃ Column ┃ Match Rate ┃ Mean ┃ Null% ┃ str_len_delta ┃
1313
┡━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
1414
│ price │ 40.00% │ 0.75 │ 20.0% -> 0.0% (-20.0%) │ │
1515
│ status │ 40.00% │ │ 0.0% -> 40.0% (+40.0%) │ 0 │

tests/summary/fixtures/metrics_null_fraction/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_False_sample_pk_False.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
Columns
2222
▔▔▔▔▔▔▔
2323
┏━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┓
24-
┃ Column ┃ Match Rate ┃ Mean ┃ ΔNull% ┃ str_len_delta ┃ Top Changes ┃
24+
┃ Column ┃ Match Rate ┃ Mean ┃ Null% ┃ str_len_delta ┃ Top Changes ┃
2525
┡━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━┩
2626
│ price │ 40.00% │ 0.75 │ 20.0% -> 0.0% │ │ None -> 30.0 │
2727
│ │ │ │ (-20.0%) │ │ (1x) │

tests/summary/fixtures/metrics_null_fraction/gen/pretty_False_perfect_False_top_True_slim_False_sample_rows_True_sample_pk_True.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
Columns
2222
▔▔▔▔▔▔▔
2323
┏━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┓
24-
┃ Column ┃ Match Rate ┃ Mean ┃ ΔNull% ┃ str_len_delta ┃ Top Changes ┃
24+
┃ Column ┃ Match Rate ┃ Mean ┃ Null% ┃ str_len_delta ┃ Top Changes ┃
2525
┡━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━┩
2626
│ price │ 40.00% │ 0.75 │ 20.0% -> 0.0% │ │ None -> 30.0 (1x, │
2727
│ │ │ │ (-20.0%) │ │ e.g. 3) │

tests/summary/fixtures/metrics_null_fraction/gen/pretty_False_perfect_False_top_True_slim_True_sample_rows_False_sample_pk_False.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
Columns
1010
▔▔▔▔▔▔▔
1111
┏━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┓
12-
┃ Column ┃ Match Rate ┃ Mean ┃ ΔNull% ┃ str_len_delta ┃ Top Changes ┃
12+
┃ Column ┃ Match Rate ┃ Mean ┃ Null% ┃ str_len_delta ┃ Top Changes ┃
1313
┡━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━┩
1414
│ price │ 40.00% │ 0.75 │ 20.0% -> 0.0% │ │ None -> 30.0 │
1515
│ │ │ │ (-20.0%) │ │ (1x) │

tests/summary/fixtures/metrics_null_fraction/gen/pretty_False_perfect_False_top_True_slim_True_sample_rows_True_sample_pk_True.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
Columns
1010
▔▔▔▔▔▔▔
1111
┏━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┓
12-
┃ Column ┃ Match Rate ┃ Mean ┃ ΔNull% ┃ str_len_delta ┃ Top Changes ┃
12+
┃ Column ┃ Match Rate ┃ Mean ┃ Null% ┃ str_len_delta ┃ Top Changes ┃
1313
┡━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━┩
1414
│ price │ 40.00% │ 0.75 │ 20.0% -> 0.0% │ │ None -> 30.0 (1x, │
1515
│ │ │ │ (-20.0%) │ │ e.g. 3) │

0 commit comments

Comments
 (0)