Skip to content

Fix include_imputed_marker being passed as include_meta in get_historical_csv - #75

Open
geoffhancock wants to merge 1 commit into
mainfrom
fix/csv-positional-include-meta
Open

Fix include_imputed_marker being passed as include_meta in get_historical_csv#75
geoffhancock wants to merge 1 commit into
mainfrom
fix/csv-positional-include-meta

Conversation

@geoffhancock

Copy link
Copy Markdown
Collaborator

Bug: [api.py:492] get_historical_csv passed include_imputed_marker as the sixth positional argument to get_historical_pandas, but that slot is include_meta. So get_historical_csv(..., include_imputed_marker=True) silently produced a CSV with a meta column and without the imputed-data marker the caller asked for.

Fix: Pass all defaulted parameters by keyword in the internal call chain (get_historical_csv -> get_historical_pandas -> get_historical_jsons) so argument order differences between signatures cannot misroute a flag. Public signatures are unchanged.

Test: Adds a regression test asserting the CSV contains imputed_data_used and not meta when include_imputed_marker=True.

…ical_csv

get_historical_csv passed include_imputed_marker as the sixth positional
argument to get_historical_pandas, whose sixth parameter is include_meta.
As a result, get_historical_csv(..., include_imputed_marker=True) wrote a
CSV containing a meta column and no imputed_data_used column.

Pass all defaulted parameters by keyword in the internal call chain
(get_historical_csv -> get_historical_pandas -> get_historical_jsons) so
argument order differences between signatures cannot misroute a flag.
Public signatures are unchanged.

Adds a regression test asserting the CSV contains imputed_data_used and
not meta when include_imputed_marker=True.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

2 participants