-
Notifications
You must be signed in to change notification settings - Fork 879
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
Extract rolling primitives logic into a general function #2218
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2218 +/- ##
==========================================
- Coverage 99.29% 99.29% -0.01%
==========================================
Files 146 146
Lines 17594 17583 -11
==========================================
- Hits 17470 17459 -11
Misses 124 124
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
[RollingCount, RollingMax, RollingMin, RollingMean, RollingSTD, RollingTrend], | ||
) | ||
@patch("featuretools.primitives.rolling_primitive_utils.apply_roll_with_offset_gap") | ||
def test_no_call_to_apply_roll_with_offset_gap_with_numeric( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this test was moved to the utils test since it is testing the utils function more than the actual primitives
window_size="test", | ||
gap="7D", | ||
min_periods=1, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lots of black, pre-commit linting changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know if there were any non linting changes to the actual test checks? I haven't seen any, but just want to make sure I'm not missing anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only change is specifying the min_periods parameter for roll_series_with_gap
. I rolled the default parameters up to apply_rolling_agg_to_series
so existing functions like roll_series_with_gap
no longer need a default value.
featuretools/primitives/standard/rolling_transform_primitive.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just minor grammar suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for doing this! Makes the logic around rolling primitives feel a lot more manageable
window_size="test", | ||
gap="7D", | ||
min_periods=1, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know if there were any non linting changes to the actual test checks? I haven't seen any, but just want to make sure I'm not missing anything.
resolves: #2213