featuretools
featuretools copied to clipboard
Restructure primitives folder and various util functions
The current structure of the primitive's folder makes it confusing to work with and harder to scale. @dvreed77 and I think a better structure for the primitives would be:
primitives
│ __init__.py ( remove all api.py since its not needed)
└───aggregation
| | __init__.py
│ └───standard
│ │ __init__.py
│ │ *each agg primitive listed in its own file*
└───transform
│ │ __init__.py
│ └───standard
| | __init__.py
│ │ *each trans primitive listed in its own file from `transform_primitive.py`*
│ └───cumulative
| | __init__.py
│ │ *each cum trans primitive listed in its own file from `cum_transform_feature.py`*
│ └───datetime
| | __init__.py
| | utils.py
│ │ *each datetime transform primitive listed in its own file from `datetime_transform_primitive.py`*
│ └───latlong
| | __init__.py
| | utils.py
│ │ *each latlong transform primitive listed in its own file from `latlong_transform_primitive.py`*
│ └───rolling
| | __init__.py
| | utils.py
│ │ *each rolling transform primitive listed in its own file from `rolling_transform_feature.py`*
- Shouldn't we be consistent with having api.py OR not, throughout the codebase?
- Won't we have a ton of files with this change? If a dev has to change a primitive or wants to scroll through them, they have to look at multiple files...
- Yeah I purposely want to rip
api.py
out of the codebase if there is no particular reason for it. We would be able to delete many flake8 ignore comments doing this. - Yeah we would have more files but finding the primitive I want to modify would be much easier imo. Instead of having to scroll through huge files we now would have a collapsed view of the primitives via their file names. This would also allow us to namespace our utility functions better.