featuretools
featuretools copied to clipboard
Add tests that confirm primitive input_types are the expected shapes
There are a number of assumptions we make about the shape of Primitive input_types
lists:
- Its either a list of ColumnSchema objects or a list of lists of ColumnSchema objects (and not a combination)
- All sub-lists are the same length
- No
input_types
list or sublist is empty
As we may need to rely on these assumptions at some point, we should add tests that confirm these assumptions for all primitives, so that if we add a Primitive that breaks any of these assumptions in the future, we are notified.
If you don't mind can I do this? Can you give some details please? Thank you. :)
@lastirembender sure, what details you do you? This is an issue to make sure that all primitives in Featuretools and user created primitives get checked on their input_types
attribute.
@tamargrey @gsheni may I please give this a shot too? If I may, I have a few questions:
- When you say checking all primitives, am I right in assuming that you are referring to the subclasses of
PrimitiveBase
and not instances with the exception of immediate subclassesAggregationPrimitive
andTransformPrimitive
? - Will a separate file need to be written for these test cases or is there one that you'd want to be updated?
- Should I use
@pytest.mark.parametrize
to run separate tests on each primitive or will a loop suffice?
@harshvardhanb25
- Yes, one approach is to check classes with instances of
PrimitiveBase
- You can add your tests to this file.
- Using
@pytest.mark.parametrize
when possible is ideal.
@gsheni and @tamargrey Hi, I'm a newbie, and this issue seems to be unattended. I was wondering whether it can be assigned to me and I can contribute?