diff --git a/features/tabular-statistics-tool/src/polus/tabular/features/tabular_statistics/tabular_statistics.py b/features/tabular-statistics-tool/src/polus/tabular/features/tabular_statistics/tabular_statistics.py index dfe2f19..49261f8 100644 --- a/features/tabular-statistics-tool/src/polus/tabular/features/tabular_statistics/tabular_statistics.py +++ b/features/tabular-statistics-tool/src/polus/tabular/features/tabular_statistics/tabular_statistics.py @@ -411,6 +411,7 @@ def preview(out_dir: Path, file_pattern: str) -> None: out_json: dict[str, Any] = { "filepattern": file_pattern, "outDir": str(out_name), + } with Path(out_dir, "preview.json").open("w") as jfile: json.dump(out_json, jfile, indent=2) diff --git a/features/tabular-statistics-tool/tests/test_main.py b/features/tabular-statistics-tool/tests/test_main.py index 024643b..26a6b4e 100644 --- a/features/tabular-statistics-tool/tests/test_main.py +++ b/features/tabular-statistics-tool/tests/test_main.py @@ -87,7 +87,9 @@ def test_apply_statistics() -> None: d1 = Generatedata(file_pattern=i, out_name=f"data_1{i}") d1() table = pa.table(d1.df) - numeric_table = table.drop([col for col in table.column_names if pa.types.is_string(table[col].type)]) + numeric_table = table.drop( + [col for col in table.column_names if pa.types.is_string(table[col].type)] + ) statistics_list = list(ts.STATS.keys()) # Test applying each statistic in STATS to the table @@ -113,7 +115,9 @@ def test_all_statistics() -> None: d1 = Generatedata(file_pattern=i, out_name=f"data_1{i}") d1() table = pa.table(d1.df) - numeric_table = table.drop([col for col in table.column_names if pa.types.is_string(table[col].type)]) + numeric_table = table.drop( + [col for col in table.column_names if pa.types.is_string(table[col].type)] + ) statistics = "all" result_table = ts.apply_statistics(numeric_table, statistics=statistics)