bfb_delivery.lib.schema.checks package

Submodules

bfb_delivery.lib.schema.checks.dataframe_checks module

DataFrame checks.

bfb_delivery.lib.schema.checks.dataframe_checks.address1_in_address(df, flag)

Check that a address line one in address.

Return type:

bool

bfb_delivery.lib.schema.checks.dataframe_checks.address2_in_address(df, flag)

Check that a address line two in address.

Return type:

bool

bfb_delivery.lib.schema.checks.dataframe_checks.at_least_one_in_group(df, group_col, at_least_one_col)

Check that at least one value in a group is not null or empty.

Return type:

bool

bfb_delivery.lib.schema.checks.dataframe_checks.at_least_one_in_group_route_sheet(df, flag)

Check that at least one value in a group is not null or empty.

Return type:

bool

bfb_delivery.lib.schema.checks.dataframe_checks.at_least_one_in_group_sheet_plan(df, flag)

Check that at least one value in a group is not null or empty.

Return type:

bool

bfb_delivery.lib.schema.checks.dataframe_checks.at_least_one_in_group_sheet_route(df, flag)

Check that at least one value in a group is not null or empty.

Return type:

bool

bfb_delivery.lib.schema.checks.dataframe_checks.at_least_one_in_group_sheet_stop(df, flag)

Check that at least one value in a group is not null or empty.

Return type:

bool

bfb_delivery.lib.schema.checks.dataframe_checks.contiguous_group(df, group_col, contiguous_col, start_idx)

Assert that values are contiguous in each group.

Return type:

bool

bfb_delivery.lib.schema.checks.dataframe_checks.equal_cols(df, col_a, col_b)

Assert that plan titles are the same as route titles.

Return type:

bool

bfb_delivery.lib.schema.checks.dataframe_checks.increasing_by(df, cols)

Assert that a DataFrame is sorted by columns.

Return type:

bool

bfb_delivery.lib.schema.checks.dataframe_checks.item_in_dict_col(df, col_name, item_name)

Check that a dictionary field has an item in it.

Return type:

bool

bfb_delivery.lib.schema.checks.dataframe_checks.many_to_one(df, many_col, one_col)

Assert that a column has a many-to-one relationship with another column.

Return type:

bool

bfb_delivery.lib.schema.checks.dataframe_checks.one_to_one(df, col_a, col_b)

Assert that columns have a 1:1 relationship.

Return type:

bool

bfb_delivery.lib.schema.checks.dataframe_checks.one_to_one_route_sheet(df, flag)

Assert that columns have a 1:1 relationship.

Return type:

bool

bfb_delivery.lib.schema.checks.dataframe_checks.unique_group(df, group_col, unique_col)

Assert that values are unique in each group.

Return type:

bool

bfb_delivery.lib.schema.checks.field_checks module

Field checks.

bfb_delivery.lib.schema.checks.field_checks.at_least_two_words(pandas_obj, flag)

Check that a string has at least two words.

Return type:

bool

bfb_delivery.lib.schema.checks.field_checks.contiguous(pandas_obj, start_idx)

Assert that values are contiguous.

Return type:

bool

bfb_delivery.lib.schema.checks.field_checks.in_list_case_insensitive(pandas_obj, *, category_list)

Check that a column is in a list.

Return type:

bool

bfb_delivery.lib.schema.checks.field_checks.is_list_of_one_or_less(pandas_obj, flag)

Check that a column is a list of one item.

Return type:

bool

bfb_delivery.lib.schema.checks.field_checks.is_sorted(pandas_obj, check_sort)

Assert that values are contiguous.

Return type:

bool

bfb_delivery.lib.schema.checks.field_checks.item_in_field_dict(pandas_obj, item_name)

Check that a dictionary field has an item in it.

Return type:

bool

bfb_delivery.lib.schema.checks.field_checks.one_product(pandas_obj, flag)

Ensure one and only one product per stop.

Return type:

bool

Module contents

Schema checks.