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
Some hacking on labelhash. #1021
Conversation
Ha! I was literally thinking about doing this EXACT thing today during the meeting at some point when I was, erm, clearly not going on a brain tangent. Not sure how you've developed these new mind-probing powers, but be careful in my head, it's perilous in there... So yes, I like it. Note though: wouldn't it be better to just pass LabelHash a Hashbits or CountingHash from pythonland, rather than having it construct a new one in the |
On Wed, May 20, 2015 at 08:07:04PM -0700, Camille Scott wrote:
No Comment.
Yep. Now leave me alone, I've got hacking to do :) |
Very well, carry on :) |
While you are on the line - if I'm loading labels and tags from disk, all I need to do is run
once for each label and then
for each tag/label pair, correct? |
Yerp, that should do it. |
Huh. Somewhat to my surprise, that seems to work. |
} | ||
else if (PyObject_TypeCheck(hashtable_o, &khmer_KCountingHash_Type)) { | ||
khmer_KCountingHash_Object * cho = (khmer_KCountingHash_Object *) hashtable_o; | ||
hashtable = cho->counting; | ||
} |
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.
Needs a final else
that sets an error and returns.
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!
|
The tests failed because of lowered code coverage, due to removal of so many lines of code. @mr-c, could you update the code coverage requirements, please, and then review? |
return c | ||
|
||
|
||
class CountingLabelHash(_LabelHash): |
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.
This class has no test coverage.
infile.read((char *) &version, 1); | ||
infile.read((char *) &ht_type, 1); | ||
if (!(version == SAVED_FORMAT_VERSION)) { | ||
std::ostringstream err; |
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.
This branch has no code coverage
Code coverage was reduced due to new function and code paths added without tests :-) |
retest this please, jenkins |
Hmm @mr-c looks like a Jenkins problem - out of memory in unrelated tests. Any thoughts? Anyway, the PR is ready for review. |
Maybe your test creates a memory leak prior? |
On Wed, May 27, 2015 at 06:35:51PM -0700, Michael R. Crusoe wrote:
Maybe? But can't think of what it would be... |
oh. That. Figured it out.
|
huh, wonder why we dynamically allocate buf :)
|
whew ready for review @mr-c. |
@ctb Lookin' good. I found a couple small things via cpychecker but nothing from your commits. |
@camillescott will "like" this, I suspect... for some value of "like".
If this branch proves useful we should make the Python type hierarchy for Hashtable/CountingHash/Hashbits look more like the C++ object hierarchy. But let's see if it's useful first.