-
Notifications
You must be signed in to change notification settings - Fork 167
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
Jessica E Ambriz-Madrigal - Lions #162
base: master
Are you sure you want to change the base?
Conversation
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.
Great job, Jessica!
Your functions and conditionals look polished, your assert statements are clear, and nested loops iterate beautifully! I left a few suggestions inline. Remember that you can also write more than one commit message per wave! Based on our revised requirements, this project is a Green. 🟢
assert updated_data["watched"][0]["title"] == MOVIE_TITLE_1 | ||
assert updated_data["watched"][0]["genre"] == GENRE_1 | ||
assert updated_data["watched"][0]["rating"] == RATING_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.
Wonderful assertion statements! ✨
@@ -143,25 +150,33 @@ def test_moves_movie_from_watchlist_to_watched(): | |||
assert len(updated_data["watchlist"]) == 1 | |||
assert len(updated_data["watched"]) == 2 | |||
|
|||
raise Exception("Test needs to be completed.") | |||
assert updated_data["watched"][1] == movie_to_watch |
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.
Nice! 👍🏻
assert INTRIGUE_3 in friends_unique_movies | ||
assert HORROR_1 in friends_unique_movies | ||
assert FANTASY_4 in friends_unique_movies |
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.
Wonderful! 💯
@@ -1,23 +1,144 @@ | |||
# ------------- WAVE 1 -------------------- | |||
|
|||
from distutils.file_util import move_file | |||
from pickle import FALSE |
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.
Remember to clear any import statements that we don't need before submission! 😉
def create_movie(title, genre, rating): | ||
pass | ||
new_movie = {} | ||
if title == None or genre == None or rating == None: |
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.
Great chained logic in this conditional!
average_rating = all_ratings_added/len(user_data["watched"]) | ||
return average_rating |
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.
Great job combining division with the length calculation!
maximum_key = None | ||
maximum_value = 0 |
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.
Hmm, could we have more descriptive variable names? Maybe best_genre_name
and best_genre_count
?
|
||
# ----------------------------------------- | ||
# ------------- WAVE 3 -------------------- | ||
# ----------------------------------------- | ||
|
||
|
||
def get_unique_watched(user_data): |
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.
Small nit/preference: I like to initialize all my known variables right after defining the function so I can keep track of them easier! For example, I (personally, meaning you don't have to do this!) would put L88 and L93 right after each other around L88.
for friend in user_data["friends"]: | ||
for movie in friend["watched"]: | ||
for host in movie["host"]: | ||
if movie["title"] not in movie_list: | ||
if movie not in friends_movies: | ||
if host in movie_list: | ||
friends_movies.append(movie) | ||
|
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.
👀 OOOO, interested in where you might be going here! Let me know if you want to walk through this Wave in our 1:1s!
movie_list = [] | ||
for movie in user_data["watched"]: | ||
movie_list.append(movie["title"]) |
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.
We can get rid of this and refer to user_data["watched"]
directly in L108.
Want to look over wave 4. Finished until wave 3.