Skip to content

Conversation

@NLucuab
Copy link

@NLucuab NLucuab commented Mar 29, 2021

Completed Viewing Party Project

Copy link

@audreyandoy audreyandoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job Nyckolle! You hit all the learning goals and your code was very neat and easy to read! Keep up the good work!!!

Comment on lines +2 to +6
"python.testing.pytestArgs": [
"tests"
],
"python.testing.unittestEnabled": false,
"python.testing.nosetestsEnabled": false,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For future reference we will be adding files that are specific to your coding environment such as .vscode settings into a .gitignore. This is just to prevent conflicts with other peoples' settings when they work on the same project as you.

Comment on lines +5 to +7
if movie_title == None or genre == None or rating == None:
return None
return {"title": movie_title, "genre": genre, "rating": rating}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! This looks very neat.

for data in watchlist:
if data["title"] == movie:
watchlist.remove(data)
watchedlist.append(data)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be a good spot to call the add_to_watched function

Comment on lines +32 to +39
for description, value in dict.items():
if description == "genre":
if value in genre_tally:
genre_tally[value] += 1
else:
genre_tally[value] = 1
elif description == None:
return None

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice use of a frequency map!

if description == "rating":
rating_total += dict[description]
ratings.append(value)
avg_rating = pytest.approx(rating_total/len(ratings))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting use of the approx method

for movie in friends_watched_list:
if movie not in user_watched_list:
if movie in unique_watched_list:
continue

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice use of continue!

return unique_watched_list

def get_available_recs(user_data):
friend_watched_list = (get_friends_unique_watched(user_data))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job using helper functions!

Comment on lines +139 to +152
if user_data["watched"] != []:
for movie in friends_watched_list:
if movie not in user_watched_list:
recommendation_list.append(movie)
return recommendation_list
else:
return recommendation_list

def get_rec_from_favorites(user_data):
friends_watched = get_friends_watched(user_data)
available_recs_list = []
user_favorite_list = user_data["favorites"]

if user_data["watched"] != []:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great job checking for an empty list!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants