Add Point class to main#1
Conversation
Created .gitignore to ignore .pyc files
Created the test file and implemented one test that creates a Point instance
Added x and y coordinates to the Point class. If no coordinates are supplied when the point is created, it defaults to (0, 0)
Added a string representation of the Point class
Added a string representation of the Point class
Cleaned up the formatting to help improve PEP compliance, and added docstrings to help explain the code
Added a function that determines what quadrant of the cartesian plane the point is located in, as well as the tests that confirm it is correct
Implemented a distance function which calculates the distance between a given point and the point the method is executed on, otherwise the distance from the origin
Added codecov and travis integration
Added build, ebert and codecov badges to the README file
Adjusted the structure of the algorithm that determines which quadrant a point lies in
Removed unnecessary logic from the distance() function
Improved the distance function by utilising a named tuple as a default argument
Implemented an equality dunder function (__eq__) for the Point class. This will ensure that when Points are compared, they will be considered the same if they share the same coordinates with one another, regardless of whether they are internally different instances of the Point class
Added extra tests for the __eq__ method to ensure that objects that don't match are not considered equal
Added a method to the Point class that will return the midpoint of the point the method is executed on and another given point (or the default of the origin)
|
Ebert has finished reviewing this Pull Request and has found:
But beware that this branch is 2 commits behind the You can see more details about this review at https://ebertapp.io/github/GenericError/cartesian/pulls/1. |
| return True | ||
| return False | ||
|
|
||
| def quadrant(self): |
There was a problem hiding this comment.
Cyclomatic complexity is too high in method quadrant. (7)
Codecov Report
@@ Coverage Diff @@
## master #1 +/- ##
=======================================
Coverage ? 100%
=======================================
Files ? 2
Lines ? 100
Branches ? 0
=======================================
Hits ? 100
Misses ? 0
Partials ? 0
Continue to review full report at Codecov.
|
Adding the Point class to the main branch, getting ready for a first release.