Skip to content

fix(server): wire PolarsAutocleaning into PolarsServerDataflow (#900) - #1101

Closed
Muhtasim-Munif-Fahim wants to merge 1 commit into
buckaroo-data:mainfrom
Muhtasim-Munif-Fahim:polars-server-autocleaning
Closed

Muhtasim-Munif-Fahim wants to merge 1 commit into
buckaroo-data:mainfrom
Muhtasim-Munif-Fahim:polars-server-autocleaning

Conversation

@Muhtasim-Munif-Fahim

Copy link
Copy Markdown

Fixes #900.

PolarsBuckarooWidget already uses PolarsAutocleaning (it was switched in #912). PolarsServerDataflow in buckaroo/server/data_loading_polars.py still had autocleaning_klass = PandasAutocleaning. So any server-side polars dataflow with a real cleaning conf went through the pandas make_origs path against a pl.DataFrame.

Changes

  • PolarsServerDataflow.autocleaning_klass = PolarsAutocleaning, imported from buckaroo.polars_buckaroo like the other polars pieces. The now-unused PandasAutocleaning import is removed.
  • tests/unit/server/test_data_loading_polars.py:
    • asserts the server dataflow uses the same autocleaning class as PolarsBuckarooWidget
    • adds an end-to-end test: a PolarsServerDataflow subclass with an add_orig int-parsing cleaning conf now yields realname + realname_orig in cleaned_df. On main this test fails, because the pandas path never produces the polars _orig columns.

The default NoCleaningConfPl behaviour is unchanged.

Testing

  • pytest tests/unit/server/test_data_loading_polars.py tests/unit/dataflow/autocleaning_pl_test.py: all pass. Both new tests fail without the fix.
  • pytest tests/unit: same set of failures before and after the change. They're all environment-related in my local env (Python 3.14 / pandas build without pandas._libs.json for fastparquet, plus some collection errors).
  • ruff check is clean.

AI-assistance disclosure: this change was prepared with the help of an AI coding assistant; I reviewed and tested it before submitting.

@paddymul

Copy link
Copy Markdown
Collaborator

Hi. Can you tell me how you're using auto cleaning?

@paddymul

Copy link
Copy Markdown
Collaborator

Closing because you haven't responded.

@paddymul paddymul closed this Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PolarsAutocleaning defined but never used; polars dataflows use PandasAutocleaning

2 participants