Skip to content

Alma_C18#149

Open
AlmaDSF wants to merge 7 commits intoAda-C18:masterfrom
AlmaDSF:master
Open

Alma_C18#149
AlmaDSF wants to merge 7 commits intoAda-C18:masterfrom
AlmaDSF:master

Conversation

@AlmaDSF
Copy link
Copy Markdown

@AlmaDSF AlmaDSF commented Sep 23, 2022

No description provided.

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, 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!

Comment thread tests/test_wave_01.py

raise Exception("Test needs to be completed.")
#Mine below:
assert updated_data["watched"][0]['title'] == MOVIE_TITLE_1
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_01.py

raise Exception("Test needs to be completed.")
#Mine teste below:
assert updated_data["watched"][-1]['title'] == movie_to_watch["title"]
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 use of index -1 to access the last element!

Comment thread tests/test_wave_03.py
# *************************************************************************************************
# ****** Add assertions here to test that the correct movies are in friends_unique_movies **********
# **************************************************************************************************
assert INTRIGUE_3 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
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
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!

Comment thread viewing_party/party.py
new_movie = { }

# if an argument is None, return None
if title == None or genre == None or rating == 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.

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.

Comment thread viewing_party/party.py
return movies_only_final_list_dict

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

Similar to above, wonderful implementation!

Comment thread viewing_party/party.py
Comment on lines +201 to +203
for title in movies_only_final_list:
for friend in user_data['friends']:
for movie in friend['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 parsing the nested data structure!

Comment thread viewing_party/party.py
friends_genre = []
recommended_movies = []

genre_max = 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! A helper function is very helpful here.

Comment thread viewing_party/party.py
Comment on lines +225 to +229
user_watched = user_data['watched'] #list,dict
friends = user_data['friends']
user_genre = []
friends_genre = []
recommended_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.

Great variable naming 👍🏻

Comment thread viewing_party/party.py
friends_users = []
recommended_movies = []

# if the user doesn't have favorites, it's equal length cero, then return an empty list.
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 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