Problem
A styling class declares the summary stats it needs in requires_summary, e.g. DefaultMainStyling.requires_summary = ["histogram", "is_numeric", "dtype", "_type"] (buckaroo/customizations/styling.py:67). Nothing checks that the stats pipeline actually provides them. StatPipeline._normalize_inputs treats styling ColAnalysis classes as no-ops (buckaroo/pluggable_analysis_framework/stat_pipeline.py:51), so their requires_summary never enters the DAG validation that @stat functions go through.
When a required stat is missing, what happens depends on how style_column reads it:
DefaultMainStyling.style_column checks for _type and returns an obj displayer if it is absent (styling.py:77). The column renders plain with no warning.
- If
style_column raises instead, StylingAnalysis.style_columns swallows the exception when col_meta is empty and requires_summary is non-empty (buckaroo/dataflow/styling_core.py:470), and falls back to default_styling. It only logs a warning when col_meta is non-empty.
Impact
A styling class used with a backend or stat set that doesn't compute its inputs produces plain columns instead of an error. This matters more now that styling is meant to be backend-generic (#928 types the styling frame argument as DataFrameLike and the analysis lists as ColAnalysis).
Suggested fix
When the pipeline is built, check each styling class's requires_summary against the union of stats the @stat functions provide, and warn (or raise under debug=True) naming the class and the missing keys. Keep the per-column fallback for the startup case where col_meta is legitimately empty.
Context
Identified while typing the dataflow pipeline in #928.
Problem
A styling class declares the summary stats it needs in
requires_summary, e.g.DefaultMainStyling.requires_summary = ["histogram", "is_numeric", "dtype", "_type"](buckaroo/customizations/styling.py:67). Nothing checks that the stats pipeline actually provides them.StatPipeline._normalize_inputstreats stylingColAnalysisclasses as no-ops (buckaroo/pluggable_analysis_framework/stat_pipeline.py:51), so theirrequires_summarynever enters the DAG validation that@statfunctions go through.When a required stat is missing, what happens depends on how
style_columnreads it:DefaultMainStyling.style_columnchecks for_typeand returns anobjdisplayer if it is absent (styling.py:77). The column renders plain with no warning.style_columnraises instead,StylingAnalysis.style_columnsswallows the exception whencol_metais empty andrequires_summaryis non-empty (buckaroo/dataflow/styling_core.py:470), and falls back todefault_styling. It only logs a warning whencol_metais non-empty.Impact
A styling class used with a backend or stat set that doesn't compute its inputs produces plain columns instead of an error. This matters more now that styling is meant to be backend-generic (#928 types the styling frame argument as
DataFrameLikeand the analysis lists asColAnalysis).Suggested fix
When the pipeline is built, check each styling class's
requires_summaryagainst the union of stats the@statfunctions provide, and warn (or raise underdebug=True) naming the class and the missing keys. Keep the per-column fallback for the startup case wherecol_metais legitimately empty.Context
Identified while typing the dataflow pipeline in #928.