Open
Conversation
…write similar methods) Wanted to move common methods across Markets and Vendors into DataClass Class so other classes (Market, Product, Vendor, Sales) could inherit them. Not sure I like it yet... But I'll get there!
…ot of the repetitive code
Ugh. Used parallel assignment! This was really cool, but now everything is coming through as a string... messed up some ID matching which I've mostly fixed now. Will see what other problems this causes. Weirdness with Sale method. Will fix after lunch.
… because of parallel assignment
….by_markets method as well
… self.find anymore since this is a wrong level of abstraction
…ces in Vendor & market specs
…rn instances (re-read requirements :().
…eturning methods (vendor, market) so we don't have to search over everything if we only want one instance
…ot of commented out code
Turns out it was a problem with the way my tests were written... (and not nils in the data file). Changed random sampling of instance from array to validating each isntance of the array is an instance of the appropriate data class. Also started reduce in revenue method from 0.0 so it always returns a float (durr). My tests are now shorter AND test more, so win-win (plus they pass! :D)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sarah Nahmias
I'm still trying to find the line between refactoring and having my code still be readable to a human who isn't me (and may not understand why I have 1000000000 arguments per method). Coaching on that would be greatly appreciated! As well as any other spots I'm missing the mark but maybe just not cognizant of it yet.
Thanks for a fun project!!!!