Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No data checks in MappingTransformer transform #146

Open
TommyMatthews opened this issue Dec 5, 2023 · 1 comment
Open

No data checks in MappingTransformer transform #146

TommyMatthews opened this issue Dec 5, 2023 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@TommyMatthews
Copy link
Contributor

TommyMatthews commented Dec 5, 2023

MappingTransform.transform(X) tries to do things to X before actually checking that it is a dataframe and has the required columns.

I think the best solution would be to call the BaseTransformer.transform method at the start of transform, which you can do with X = super(BaseMappingTransformer, self).transform(X).

@TommyMatthews TommyMatthews added bug Something isn't working good first issue Good for newcomers labels Dec 5, 2023
@TommyMatthews TommyMatthews changed the title No data checks in MappingTransformerTransform No data checks in MappingTransformer transform Dec 5, 2023
@TommyMatthews
Copy link
Contributor Author

TommyMatthews commented Feb 7, 2024

On track to be fixed when mapping transformer is brought into the generic testing framework by the addition of a BaseTransformer.Transform call in this PR:
#171

However, this leaves the issue that there are now two calls to BaseTransformer.transform (one explicit one implicit) in the MappingTransformer.transform method. I think this best solved my changing BaseMappingTransfomMixin - either by declaring it redundant or changing the name of it's transform method, allowing the BaseTransformer.transform method to be replaced by a super transform method and making this the only call to base transformer transform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant