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

Sapphire - Angie Contreras C19 #70

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Conversation

AngieCCo
Copy link

@AngieCCo AngieCCo commented Apr 7, 2023

No description provided.

Copy link

@tildeee tildeee left a comment

Choose a reason for hiding this comment

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

Great work on this project, Angie! This project is marked as a "green" on my end.

Overall, your code demonstrated great understanding of OOP, instance methods, and inheritance. Your code was logical, clean, and efficient. In addition, your optional enhancements on the project are great-- Great work on the newest features and the tests for it.

I wish I had more specific feedback for you, but overall all I would say is to keep it up, and let me know if there are any questions!

As a small note, your git hygiene is good, and I'd prefer if the commit messages were more descriptive of the code changes within the commit (for example, "implements swap_items feature" or "handles empty inventories in swap_items" etc)

Great work overall!

Comment on lines +29 to +33
other_vendor.add(item_to_other_vendor)

item_from_other_vendor_to_me = other_vendor.remove(their_item)
self.add(item_from_other_vendor_to_me)
Copy link

Choose a reason for hiding this comment

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

I really like that you used the return value of remove (item_to_other_vendor and item_from_other_vendor_to_me)! I think it's a good pattern.

Copy link
Author

Choose a reason for hiding this comment

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

Thank you! I have to admit I was super confused throughout the project with the name of parameters and variables but I'm happy that at the end I understood the concepts and usage of these parameters inside my methods.

my_first_item = self.inventory[0]

self.swap_items(other_vendor, my_first_item, first_item_from_friend)
Copy link

Choose a reason for hiding this comment

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

Great work using the swap_items instance method.

item_other_want = self.get_best_by_category(their_priority)

return self.swap_items(other_vendor, item_other_want, item_I_want)
Copy link

Choose a reason for hiding this comment

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

Great job returning the value of swap_items-- you utilized the fact that swap_items will return True/False for you :)

return None

return min(items_from_category, key=lambda item: item.age)
Copy link

Choose a reason for hiding this comment

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

Great use of min and max throughout!

assert item_f in jesse.inventory


def test_swap_by_newest_item_no_inventory_is_false():
Copy link

Choose a reason for hiding this comment

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

Great work on these swap_by_newest tests!

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