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

Alma_C18 #149

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Alma_C18 #149

wants to merge 7 commits into from

Conversation

AlmaDSF
Copy link

@AlmaDSF AlmaDSF commented Sep 23, 2022

No description provided.

Copy link

@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, Alma! This project is green. 🟢
You implemented every function according to the specification and had fantastic code style throughout. Very great use of helper functions, set logic, and parsing nested data structures. Nice job finishing out the tests as well. See my line-by-line comments for more detail. Keep up the great work!

@@ -119,12 +119,15 @@ def test_moves_movie_from_watchlist_to_empty_watched():
assert len(updated_data["watchlist"]) == 0
assert len(updated_data["watched"]) == 1

raise Exception("Test needs to be completed.")
#Mine below:
assert updated_data["watched"][0]['title'] == MOVIE_TITLE_1

Choose a reason for hiding this comment

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

👍🏻

@@ -143,12 +146,16 @@ 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.")
#Mine teste below:
assert updated_data["watched"][-1]['title'] == movie_to_watch["title"]

Choose a reason for hiding this comment

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

👍🏻 Nice use of index -1 to access the last element!

# *************************************************************************************************
# ****** Add assertions here to test that the correct movies are in friends_unique_movies **********
# **************************************************************************************************
assert INTRIGUE_3 in friends_unique_movies

Choose a reason for hiding this comment

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

👍🏻

Comment on lines +56 to +59
recommendations = get_new_rec_by_genre(sonyas_data)

# # # raise Exception("Test needs to be completed.")
assert len(recommendations) == 0

Choose a reason for hiding this comment

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

Great!

new_movie = { }

# if an argument is None, return None
if title == None or genre == None or rating == None:

Choose a reason for hiding this comment

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

www.pythontutorial.net/advanced-python/python-none/) gives a good explanation why! It gets into how python objects' equality is defined, something we'll cover in OOP.

return movies_only_final_list_dict

#***************************************************************************************************
def 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.

Similar to above, wonderful implementation!

Comment on lines +201 to +203
for title in movies_only_final_list:
for friend in user_data['friends']:
for movie in friend['watched']:

Choose a reason for hiding this comment

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

Great parsing the nested data structure!

friends_genre = []
recommended_movies = []

genre_max = get_most_watched_genre(user_data)

Choose a reason for hiding this comment

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

Great! A helper function is very helpful here.

Comment on lines +225 to +229
user_watched = user_data['watched'] #list,dict
friends = user_data['friends']
user_genre = []
friends_genre = []
recommended_movies = []

Choose a reason for hiding this comment

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

Great variable naming 👍🏻

friends_users = []
recommended_movies = []

# if the user doesn't have favorites, it's equal length cero, then return an empty list.

Choose a reason for hiding this comment

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

Great comments outlining logical steps!

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