When a user passes an "untyped" input file (.csv and .csv.gz) to cohort-report, they must also pass a configuration object called variable_types that maps from names to external types (e.g. binary, categorical, etc.). Previously, invalid external types that were valid internal types (i.e. Pandas types) were permitted; invalid external types that were invalid internal types were not.
This PR ensures that cohort-report now errors on all invalid external types. The errors are also more user-friendly. The commits are in three groups:
Refactor and expand the tests (7717630 to 028ae06)
Fix the issue (4d55563)
Refactor (589c74e to d67bac2)
BREAKING CHANGE: Cohort-report now errors on all invalid external types.
When a user passes an "untyped" input file (
.csv
and.csv.gz
) to cohort-report, they must also pass a configuration object calledvariable_types
that maps from names to external types (e.g.binary
,categorical
, etc.). Previously, invalid external types that were valid internal types (i.e. Pandas types) were permitted; invalid external types that were invalid internal types were not.This PR ensures that cohort-report now errors on all invalid external types. The errors are also more user-friendly. The commits are in three groups:
BREAKING CHANGE: Cohort-report now errors on all invalid external types.
Fixes #34