-
Notifications
You must be signed in to change notification settings - Fork 21
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
Fix slow displacement test #6652
Conversation
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.
❌ Changes requested. Reviewed everything up to bc51970 in 43 seconds
More details
- Looked at
41
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_rh3vqPM03BTJULMG
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6652 +/- ##
=======================================
Coverage 92.30% 92.30%
=======================================
Files 268 268
Lines 10590 10590
Branches 856 856
=======================================
Hits 9775 9775
Misses 676 676
Partials 139 139 ☔ View full report in Codecov by Sentry. |
bc51970
to
f7c5ac8
Compare
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.
❌ Changes requested. Incremental review on f7c5ac8 in 1 minute and 19 seconds
More details
- Looked at
32
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_WquEHFAKETXPVxhJ
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Passing run #22840 ↗︎
Details:
Review all test suite changes for PR #6652 ↗︎ |
f7c5ac8
to
3c04dcc
Compare
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.
❌ Changes requested. Incremental review on 3c04dcc in 1 minute and 22 seconds
More details
- Looked at
32
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_MXWGV53071CzUBPA
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
|
||
assert isnan(df.loc[subscriber].value) | ||
sub = df.loc[subscriber].value | ||
assert sub is None |
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.
The test expects None
for a subscriber with no activity, which contradicts the typical use of NaN
for missing numerical data in pandas. Consider reverting this to check for NaN
to align with standard practices and the test's intent.
assert sub is None | |
assert isnan(sub) |
3c04dcc
to
0df9736
Compare
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.
❌ Changes requested. Incremental review on 0df9736 in 2 minutes and 6 seconds
More details
- Looked at
32
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_shrg1ym9XtEwUD6t
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
|
||
assert isnan(df.loc[subscriber].value) | ||
sub = df.loc[subscriber].value | ||
assert sub is None |
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.
The test name and assertion contradict each other. The test is named test_subscriber_with_home_loc_but_no_calls_is_nan
but asserts that the value is None
instead of NaN
. If the behavior has changed intentionally, consider renaming the test to reflect the new behavior or adjusting the assertion to match the expected behavior.
assert sub is None | |
assert isnan(sub) |
I have:
Description
Makes a couple of changes to the tests for the
Displacement
class, which speed up the tests substantially. Namely, storing the reused reference location, and supplying a subscriber subset.Summary:
Optimized
Displacement
class tests by caching reference locations and limiting data scope, with modifications to specific tests and methods.Key points:
Displacement
class tests by caching reference locations and limiting data scope.test_get_all_users_in_reference_location
andtest_subscriber_with_home_loc_but_no_calls_is_nan
inflowmachine/tests/test_displacement.py
.store()
method to cachedaily_location
results.subscriber_subset
to limit data scope in tests.Generated with ❤️ by ellipsis.dev