-
Notifications
You must be signed in to change notification settings - Fork 33
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
Fix IDView.ids type #406
Fix IDView.ids type #406
Conversation
….edges.ids returns a dict
…ealth with in __init__. Also add tests and use check_like=True in an old test which ignores row order.
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #406 +/- ##
==========================================
+ Coverage 90.95% 90.97% +0.02%
==========================================
Files 47 47
Lines 3893 3891 -2
==========================================
- Hits 3541 3540 -1
+ Misses 352 351 -1
☔ View full report in Codecov by Sentry. |
Nice work! Can you comment on Issue #362? For now maybe you could remove the comment in the notebook about order being preserved? |
@nwlandry done! |
Looks good to me! :) |
Okay, one more thing. I noticed that in the constructor of |
Could you be more specific? L91 and subsequent lines guarantee that |
In this PR, I don't believe that
on L91, to enforce this. |
Perhaps we're not seeing the same code? On this PR, L91 and subsequent lines look like this: if ids is None:
self._ids = self._id_dict
else:
self._ids = ids |
I tried out a few things and I was mistaken. I take back my prior comment :) |
Currently, H.edges.ids sometimes returns a dict and sometimes returns a set:
This is terrible. Furthermore, the dict version can be obtained via members:
This PR makes it so that it always returns a set.
I also added a couple of tests and changed an old test that relied on
ids
returning a dict (yuck).