Skip to content

Commit 308dbdc

Browse files
chore: raise polars floor to 1.0 and fix stale docs (#217)
The Polars engine calls LazyFrame.collect_schema(), which only exists from polars 1.0, so every 0.20.x release the old `polars>=0.20` floor allowed failed with AttributeError on engine="polars". Raise the floor in all five extras and refresh uv.lock (constraints/ci.txt is unchanged). Docs: - data-profiling: the ydata-profiling comparison called `.plan` on a profile built without include_plan=True and crashed. - trust-claims: CSV formula sanitisation is on by default on every first-party CSV output since 2.0.0, not opt-in. - README quickstart output showed duplicates removed (525 -> 500); since 2.0.0 drop_duplicates defaults to False. Match docs/quickstart.md. Closes #213 Closes #214
1 parent 55a8044 commit 308dbdc

5 files changed

Lines changed: 20 additions & 14 deletions

File tree

‎README.md‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,18 @@ print(report.summary())
101101

102102
```text
103103
freshdata clean report
104-
rows: 525 -> 500 (-25)
104+
rows: 525 -> 525
105105
columns: 7 -> 6 (-1)
106106
missing: 421 -> 0 cell(s)
107-
memory: 100.8 KB -> 89.2 KB
107+
actions (7):
108+
- [drop_duplicates] detected 25 duplicate row(s) (4.8%), none removed
109+
- [missing] 'age': filled 12 missing value(s) with median (39.6846)
110+
- [outliers] 'amount': flagged 15 outlier(s) in new column 'amount_outlier'
108111
```
109112

113+
Duplicate rows are reported but kept by default; pass `drop_duplicates=True` to
114+
remove them.
115+
110116
The same operation is available from the command line:
111117

112118
```bash

‎docs/data-profiling.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ sample = pd.DataFrame(
8686
)
8787

8888
print("Freshdata profile preview:")
89-
fresh_profile = fd.profile(sample)
89+
fresh_profile = fd.profile(sample, include_plan=True)
9090
print(fresh_profile)
9191
print("Freshdata plan summary:")
9292
print(fresh_profile.plan.summary())

‎docs/trust-claims.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ README wording verbatim to named tests, and CI fails if either side drifts.
2323
| Polars/DuckDB/Spark backends scale beyond pandas | **holds with measured boundary** | see [backends](backends.md): DuckDB native handle peaks at ~40% of eager RSS (measured); `polars-lazy` defers only final materialization — pipeline intermediates still collect eagerly. Reproduce: `python benchmarks/bench_outofcore.py` |
2424
| Native handle kept with `strategy="conservative"` | **corrected** | also requires `fix_dtypes=False`; dtype fixing forces the recorded pandas fallback |
2525
| StreamingCleaner cleans arbitrarily tall data with stable memory | **holds** | bounded reservoirs/counters, RSS benchmark `benchmarks/bench_streaming.py`; dedupe window is recent-window, not global (see [limitations](limitations.md)) |
26-
| CSV exports safe to open in spreadsheets | **holds for review queues by default; opt-in elsewhere** | see [threat model](threat-model.md); `tests/test_csv_formula_sanitize.py` |
26+
| CSV exports safe to open in spreadsheets | **holds by default on all first-party CSV outputs** (`fd.clean_csv`, `freshdata clean` / `apply-plan`, the streaming CLI, review queues); opt out with `sanitize_formulas=False` / `--no-sanitize-formulas` | see [threat model](threat-model.md); `tests/test_csv_formula_sanitize.py` |
2727
| Typed (`py.typed`), mypy-clean | **holds** | `mypy src/freshdata` in CI quality gate (187 files) |
2828
| `fallback_policy="error"` prevents any unrequested pandas materialization | **holds** | enforced *before* the pandas pipeline runs at every backend delegation point; `tests/test_execution/test_fallback_policy.py` |
2929
| Polars subset dedup matches pandas keep semantics byte-for-byte | **holds** | order-preserving `unique(subset=...)`; parity tests incl. nulls/unicode/multi-column in `tests/test_execution/test_fallback_policy.py` (order preservation makes the stage eager, disclosed on the report) |

‎pyproject.toml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ ml = [
6464
# pyarrow is required by fd.clean(polars_df): the polars→pandas interchange
6565
# (DataFrame.to_pandas) needs it, so the extra must ship it.
6666
polars = [
67-
"polars>=0.20",
67+
"polars>=1.0",
6868
"pyarrow>=10",
6969
]
7070
pyarrow = [
@@ -84,7 +84,7 @@ bench = [
8484
]
8585
# Everything for the out-of-core / Arrow-native execution engine.
8686
outofcore = [
87-
"polars>=0.20",
87+
"polars>=1.0",
8888
"duckdb>=0.10",
8989
"pyarrow>=10",
9090
]
@@ -131,13 +131,13 @@ semantic = [
131131
# Everything needed for the enterprise layer (clustering, masking, lineage, CLI),
132132
# excluding the heavier ML label-noise extra (`cleanlab`).
133133
enterprise = [
134-
"polars>=0.20",
134+
"polars>=1.0",
135135
"pyarrow>=10",
136136
"scikit-learn>=1.0",
137137
"pyyaml>=5.1",
138138
]
139139
all = [
140-
"polars>=0.20",
140+
"polars>=1.0",
141141
"pyarrow>=10",
142142
"scikit-learn>=1.0",
143143
"pyyaml>=5.1",
@@ -178,7 +178,7 @@ dev = [
178178
"build>=1.0",
179179
"twine>=5.0",
180180
"pre-commit>=3.0",
181-
"polars>=0.20",
181+
"polars>=1.0",
182182
"pyarrow>=10",
183183
"pyyaml>=5.1",
184184
"sqlalchemy>=1.4",

‎uv.lock‎

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)