• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ladybug-tools / ladybug-geometry / 259
96%
master: 93%

Build:
Build:
LAST BUILD BRANCH: dependabot/pip/setuptools-57.0.0
DEFAULT BRANCH: master
Ran 18 Jan 2020 08:10PM UTC
Jobs 2
Files 42
Run time 5s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
259

push

travis-ci

Chris Mackey
feat(hash): Add __hash__ methods that agree with __eq__ to all objects

I realized that we were overwriting the __eq__ method on a number of objects without overwriting the __hash__ method, which I have come to realize is strongly discouraged in Python. So this commit fixes this by adding hash methods that agree with the __eq__ operator.  This should also allow us to create sets of these geometry objects if we so desire.

The only thing I didn't implement that _might_ be worthwhile to implement in the future is that I am not caching the hash value once it is calculated, which is something that we could do given that all of the geometry objects are immutable. This will allow for quicker hashing if we plan to hash the object multiple times but it also uses up a little more memory per object to store the hash. Right now, we really don't end up hashing the object multiple times in any of our typical workflows such that I think the trade-off isn't worth it. However, we should reconsider this if we find cases in the future where we are hashing the objects multiple times.

334 of 334 new or added lines in 35 files covered. (100.0%)

8314 of 8621 relevant lines covered (96.44%)

1.93 hits per line

Jobs
ID Job ID Ran Files Coverage
1 259.1 18 Jan 2020 08:10PM UTC 0
96.35
Travis Job 259.1
2 259.2 18 Jan 2020 08:10PM UTC 0
96.38
Travis Job 259.2
Source Files on build 259
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #259
  • 41b295bd on github
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc