Skip to content

Commit

Permalink
switching to flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Lundquist authored and Eric Lundquist committed Jun 8, 2020
1 parent 6492b8c commit 285baf1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jobs:
paths:
- /usr/local/bin
- /usr/local/lib/python3.6/site-packages
- run: python -m pyflakes rankfm/
- run: python -m flake8 --ignore W3,E3,E5,E74 rankfm/
- run: python -m pytest -r Efp tests/

4 changes: 2 additions & 2 deletions rankfm/rankfm.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def _init_all(self, interactions, user_features=None, item_features=None, sample
assert interactions.shape[1] == 2, "[interactions] should be: [user_id, item_id]"

# save the unique lists of users/items in terms of original identifiers
interactions_df = pd.DataFrame(get_data(interactions), columns=['user_id', 'item_id'])
interactions_df = pd.DataFrame(get_data(interactions), columns=['user_id', 'item_id'])
self.user_id = pd.Series(np.sort(np.unique(interactions_df['user_id'])))
self.item_id = pd.Series(np.sort(np.unique(interactions_df['item_id'])))

Expand Down Expand Up @@ -332,7 +332,7 @@ def predict(self, pairs, cold_start='nan'):
:return: np.array of real-valued model scores
"""

# check user data inputs
# check user data inputs
assert isinstance(pairs, (np.ndarray, pd.DataFrame)), "[pairs] must be np.ndarray or pd.dataframe"
assert pairs.shape[1] == 2, "[pairs] should be: [user_id, item_id]"
assert self.is_fit, "you must fit the model prior to generating predictions"
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ scipy>=1.1
numba>=0.49

# additional development/testing requirements
pyflakes>=2.1
flake8>=3.5
pytest>=5.3

0 comments on commit 285baf1

Please sign in to comment.