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
Move query_by_values to EntitySet #1251
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1251 +/- ##
==========================================
+ Coverage 98.34% 98.35% +0.01%
==========================================
Files 134 134
Lines 14430 14439 +9
==========================================
+ Hits 14191 14202 +11
+ Misses 239 237 -2
Continue to review full report at Codecov.
|
…ove-query-by-vals
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.
A couple if statements in _vals_to_series
aren't getting hit. Are there input combinations to featuretools that would result in these lines getting hit?
I can take a closer look. This code was copied directly from the code that was in Entity, so I'm assuming it was uncovered there as well. I'll confirm. If it was uncovered previously, do you want to try to add new tests to fix the coverage as part of this PR? |
After further review, these lines also are uncovered currently in main. Looking at the code flow, I don't think it is possible for these lines to ever get hit during normal circumstances. First of all, we specify that instance ids passed to featuretools/featuretools/computational_backends/calculate_feature_matrix.py Lines 191 to 193 in 753615c
If the user does not specify instance ids, we grab a series from the dataframe here: featuretools/featuretools/computational_backends/calculate_feature_matrix.py Lines 178 to 184 in 753615c
So, given those two scenarios I don't think it is possible for our normal code flow to ever call Unless I have missed something, I do not believe that the uncovered code is necessary. The documentation says that the user should pass a list for instance ids. Even if a single value is passed, this will get converted to a series by the time With all this in mind we could:
I think the first options is better as it removes what appears to be dead code. Thoughts? |
It's dead code as far as the featuretools code flow is concerned, but those input options are described in the What if we added some tests now, and made an issue about removing those input options in the future? See if we get any feedback. |
The tests should be easy enough to add. As a side note to all this, |
Let's leave it out for now |
@@ -6,13 +6,14 @@ Release Notes | |||
* Enhancements | |||
* Fixes | |||
* Changes | |||
* Move ``query_by_values`` method from ``Entity`` to ``EntitySet`` (:pr:`1251`) |
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.
Let's also add a "Breaking Changes" section to highlight the move
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.
Added
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.
Looks good once updated to even with main
Move query_by_values to EntitySet
Moves the
query_by_values
method fromEntity
toEntitySet
. Also moves the method_vals_to_series
toEntitySet
as this method was only called from insidequery_by_values
.Closes #1244