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
Addition of ER EntityKeyTable and bug fixes #872
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## dev #872 +/- ##
==========================================
+ Coverage 88.19% 88.20% +0.01%
==========================================
Files 44 44
Lines 9022 9032 +10
Branches 2577 2587 +10
==========================================
+ Hits 7957 7967 +10
+ Misses 753 752 -1
- Partials 312 313 +1
☔ View full report in Codecov by Sentry. |
Co-authored-by: Ryan Ly <rly@lbl.gov>
Co-authored-by: Ryan Ly <rly@lbl.gov>
Co-authored-by: Ryan Ly <rly@lbl.gov>
src/hdmf/common/resources.py
Outdated
@@ -753,130 +846,17 @@ def from_norm_tsv(cls, **kwargs): | |||
msg = "Key Index out of range in ObjectKeyTable. Please check for alterations." | |||
raise ValueError(msg) | |||
|
|||
keys_idx = entity_keys['keys_idx'] | |||
for idx in keys_idx: | |||
if not int(idx) < keys.__len__(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if not int(idx) < keys.__len__(): | |
if int(idx) >= len(keys): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same for this and the other uses of len above (sorry I didn't catch these earlier)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you update the other three uses of __len__
in this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Co-authored-by: Ryan Ly <rly@lbl.gov>
Co-authored-by: Ryan Ly <rly@lbl.gov>
@mavaylon1 there are a few places in the
|
Motivation
What was the reasoning behind this change? Please explain the changes briefly.
How to test the behavior?
Checklist
ruff
from the source directory.