feat: add options for case-insensitive matching of coltypes and dtypes in schema checks #13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the
case_sensitive_colnames=
andcase_sensitive_dtypes=
arguments to thecol_schema_match()
validation method. Both are set toTrue
by default, which doesn't change the previous behavior. Setting any of these toFalse
performs a case-insensitive match during interrogation.The most important changes include updates to the
ColSchemaMatch
class, the schema comparison methods, and thecol_schema_match()
method, as well as new test cases to ensure the correctness of these features.Enhancements to schema matching:
pointblank/_interrogation.py
]: Addedcase_sensitive_colnames
andcase_sensitive_dtypes
parameters to theColSchemaMatch
class and updated the__post_init__
method to handle these parameters.Updates to schema comparison methods:
pointblank/schema.py
]: Modified schema comparison methods (_compare_schema_columns_complete_in_order
,_compare_schema_columns_subset_any_order
, etc.) to includecase_sensitive_colnames
andcase_sensitive_dtypes
parameters.Enhancements to the
col_schema_match()
method:pointblank/validate.py
]: Addedcase_sensitive_colnames=
andcase_sensitive_dtypes=
parameters to thecol_schema_match
function and updated the validation logic to handle these parameters.New test cases:
tests/test_validate.py
]: Added new test cases to verify the functionality of thecol_schema_match()
method with different combinations of case sensitivity settings for column names and data types.