Skip to content
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

Rock - Abigail C #50

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Rock - Abigail C #50

wants to merge 1 commit into from

Conversation

ChaAbby
Copy link

@ChaAbby ChaAbby commented Mar 28, 2021

No description provided.

@ChaAbby ChaAbby changed the base branch from main to master March 28, 2021 21:15
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 Abigail! You met all the learning goals. Keep up the great work (:

new_movie = {}
if movie_title == None or genre == None or rating == None:
new_movie = None
else:

Choose a reason for hiding this comment

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

you could also rewrite to build the dictionary like so

new_move = {
"title": movie_title,
"genre": genre,
"rating": rating
}

for movie in user_data['watched']:
genre = movie['genre']
genre_list.append(genre)
popular_genre = max(set(genre_list), key = genre_list.count)

Choose a reason for hiding this comment

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

Hey Abigail, that is great! I'm glad you're utilizing more advanced methods and data structures. However, in the future, please add a comment that describes code that isn't covered in our curriculum.

Comment on lines +104 to +128
friend_data = get_friend_titles(user_data)
recommendations = []
friend_data = remove_duplicates(friend_data)
for data in friend_data:
if data['host'] in user_data["subscriptions"]:
recommendations.append(data)
return recommendations

# Wave 5
def get_new_rec_by_genre(user_data):
user_titles = get_user_titles(user_data)
friends_titles = get_friend_titles(user_data)
recommendations = []
if user_titles == []:
recommendations = []
else:
for title in friends_titles:
if title not in user_titles:
recommendations.append(title)
return recommendations

def get_rec_from_favorites(user_data):
user_titles = get_user_titles(user_data)
friends_titles = get_friend_titles(user_data)
for movie in friends_titles:

Choose a reason for hiding this comment

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

great use of helper functions!

Comment on lines +12 to +26
def add_to_watched(user_data, movie):
user_data = {
"watched":[
movie
]
}
return user_data

def add_to_watchlist(user_data, movie):
user_data = {
"watchlist":[
movie
]
}
return user_data

Choose a reason for hiding this comment

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

One way to refactor this so the movie is actually being added is user_data["watched"].append(movie)

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