-
Notifications
You must be signed in to change notification settings - Fork 62
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
Apply standard template and formatting #349
Conversation
@@ -48,7 +48,7 @@ def partition_rows(data, partitions, *, rng_spec=None): | |||
# convert each partition into a split | |||
for i, ts in enumerate(test_sets): | |||
test = data.iloc[ts, :] | |||
trains = test_sets[:i] + test_sets[(i + 1):] | |||
trains = test_sets[:i] + test_sets[(i + 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.
Whitespace before ':'
@@ -132,8 +136,8 @@ | |||
# convert each partition into a split | |||
for i in range(n): | |||
start = i * size | |||
test = xs[start:start + size] | |||
train = np.concatenate((xs[:start], xs[start + size:])) | |||
test = xs[start : start + size] |
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.
Whitespace before ':'
test = xs[start:start + size] | ||
train = np.concatenate((xs[:start], xs[start + size:])) | ||
test = xs[start : start + size] | ||
train = np.concatenate((xs[:start], xs[start + size :])) |
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.
Whitespace before ':'
self.n = n | ||
self.column = col | ||
|
||
def __call__(self, udf): | ||
return udf.sort_values(self.column).iloc[-self.n:] | ||
return udf.sort_values(self.column).iloc[-self.n :] |
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.
Whitespace before ':'
@@ -322,12 +330,12 @@ | |||
for i in range(partitions): | |||
# get our test users! | |||
if disjoint: | |||
test_us = users[i*size:(i+1)*size] | |||
test_us = users[i * size : (i + 1) * size] |
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.
Whitespace before ':'
) | ||
if self.aggregate == "weighted-average": | ||
_logger.warning( | ||
"item-item configured to ignore ratings, but using weighted averages - likely bug" |
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.
Line too long (102 > 100 characters)
Code Climate has analyzed commit 2c1adf8 and detected 7 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #349 +/- ##
==========================================
+ Coverage 90.16% 90.79% +0.63%
==========================================
Files 41 41
Lines 3234 3119 -115
==========================================
- Hits 2916 2832 -84
+ Misses 318 287 -31
☔ View full report in Codecov by Sentry. |
This applies our standard LK project template and reformats the code with Ruff. Closes #342.