Skip to content

Whales - Camila Tagle#110

Open
mctagle wants to merge 6 commits into
ada-c17:masterfrom
mctagle:master
Open

Whales - Camila Tagle#110
mctagle wants to merge 6 commits into
ada-c17:masterfrom
mctagle:master

Conversation

@mctagle
Copy link
Copy Markdown

@mctagle mctagle commented Mar 25, 2022

My ID name is Maria Camila Tagle Ossa, in case you have trouble finding it

@mctagle
Copy link
Copy Markdown
Author

mctagle commented Mar 28, 2022

Done

Copy link
Copy Markdown

@jericahuang jericahuang left a comment

Choose a reason for hiding this comment

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

Excellent first project, Camila! You hit the learning goals and passed all the tests. 🙂🟢
You implemented every function according to the spec; I made notes in places where using a pre-written helper function could've saved some extra work and brain power. Nice job finishing out the tests as well. Keep up the great work!

Comment thread viewing_party/party.py

def get_unique_watched(user_data):
unique_watched = []
all_watched = set()
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Great use of a set to capture unique watched!

Comment thread viewing_party/party.py
def get_new_rec_by_genre(user_data):

rec_movies = get_available_recs(user_data)
genre = get_most_watched_genre(user_data)
Copy link
Copy Markdown

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 thread tests/test_wave_03.py
Comment on lines +58 to +60
assert INTRIGUE_3 in friends_unique_movies
assert HORROR_1 in friends_unique_movies
assert FANTASY_4 in friends_unique_movies
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍🏻

Comment thread tests/test_wave_05.py

#Assert

assert len(genre_recomend)==0
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍🏻

Comment thread viewing_party/party.py
"genre": genre,
"rating": rating
}
if title is None or genre is None or rating is None:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice! Usually this would be the first line of our function to check for any None attributes, and then create and return new_movie.

Comment thread viewing_party/party.py

def get_most_watched_genre(user_data):
genre_count={}
if user_data["watched"] == []:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Great checking for the if user_data["watched"] == [] case in both this function and get_watched_avg_rating!

Comment thread viewing_party/party.py
# -----------------------------------------
# ------------- WAVE 4 --------------------
# -----------------------------------------
def get_available_recs(user_data):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice implementation; you could've also used get_friends_unique_watched as a helper function!

Comment thread viewing_party/party.py
rec_movies_genre.append(movie)
return rec_movies_genre

def get_rec_from_favorites(user_data):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice implementation; you could've also used get_unique_watched as a helper function!

Comment thread viewing_party/party.py
genre_count[movie["genre"]]+=1
inverse = [(value, key) for key, value in genre_count.items()]
return max(inverse)[1]
# took this line from https://stackoverflow.com/questions/268272/getting-key-with-maximum-value-in-dictionary /
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks for citing

Comment thread viewing_party/party.py
@@ -1,23 +1,134 @@
# ------------- WAVE 1 --------------------
import pdb
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What was this module used for? Debugging?

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