Skip to content

Some hacking on labelhash.#1021

Merged
mr-c merged 18 commits into
masterfrom
feature/labelgraph
May 29, 2015
Merged

Some hacking on labelhash.#1021
mr-c merged 18 commits into
masterfrom
feature/labelgraph

Conversation

@ctb

@ctb ctb commented May 21, 2015

Copy link
Copy Markdown
Member

@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.

@camillescott

Copy link
Copy Markdown
Member

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 __new__ method? That would also avoid having to override the LabelHash class at all in __init__.py

@ctb

ctb commented May 21, 2015

Copy link
Copy Markdown
Member Author

On Wed, May 20, 2015 at 08:07:04PM -0700, Camille Scott wrote:

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...

No Comment.

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 `new

Yep.

Now leave me alone, I've got hacking to do :)

@camillescott

Copy link
Copy Markdown
Member

Very well, carry on :)

@ctb

ctb commented May 21, 2015

Copy link
Copy Markdown
Member Author

While you are on the line -

if I'm loading labels and tags from disk, all I need to do is run

 check_and_allocate_label(label)

once for each label and then

 link_tag_and_label(tag, label)

for each tag/label pair, correct?

@camillescott

Copy link
Copy Markdown
Member

Yerp, that should do it.

@ctb

ctb commented May 21, 2015

Copy link
Copy Markdown
Member Author

Huh. Somewhat to my surprise, that seems to work.

Comment thread khmer/_khmermodule.cc Outdated

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

@ctb

ctb commented May 26, 2015

Copy link
Copy Markdown
Member Author
  • Is it mergeable?
  • Did it pass the tests?
  • If it introduces new functionality in scripts/ is it tested?
    Check for code coverage with make clean diff-cover
  • Is it well formatted? Look at make pep8, make diff_pylint_report,
    make cppcheck, and make doc output. Use make format and manual
    fixing as needed.
  • Did it change the command-line interface? Only additions are allowed
    without a major version increment. Changing file formats also requires a
    major version number increment.
  • Is it documented in the ChangeLog?
    http://en.wikipedia.org/wiki/Changelog#Format
  • Was a spellchecker run on the source code and documentation after
    changes were made?
  • Is the Copyright year up to date?

@ctb

ctb commented May 26, 2015

Copy link
Copy Markdown
Member Author

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?

@ctb ctb changed the title Some hacking on labelgraph. Some hacking on labelhash. May 27, 2015
Comment thread khmer/__init__.py

Copy link
Copy Markdown
Contributor

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.

Comment thread lib/labelhash.cc

Copy link
Copy Markdown
Contributor

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

@mr-c

mr-c commented May 27, 2015

Copy link
Copy Markdown
Contributor

Code coverage was reduced due to new function and code paths added without tests :-)

@ctb

ctb commented May 28, 2015

Copy link
Copy Markdown
Member Author

retest this please, jenkins

@ctb

ctb commented May 28, 2015

Copy link
Copy Markdown
Member Author

Hmm @mr-c looks like a Jenkins problem - out of memory in unrelated tests. Any thoughts?

Anyway, the PR is ready for review.

@mr-c

mr-c commented May 28, 2015

Copy link
Copy Markdown
Contributor

Maybe your test creates a memory leak prior?

@ctb

ctb commented May 28, 2015

Copy link
Copy Markdown
Member Author

On Wed, May 27, 2015 at 06:35:51PM -0700, Michael R. Crusoe wrote:

Maybe your test creates a memory leak prior?

Maybe? But can't think of what it would be...

@ctb

ctb commented May 28, 2015 via email

Copy link
Copy Markdown
Member Author

@ctb

ctb commented May 28, 2015 via email

Copy link
Copy Markdown
Member Author

@ctb

ctb commented May 28, 2015

Copy link
Copy Markdown
Member Author

whew ready for review @mr-c.

@mr-c

mr-c commented May 28, 2015

Copy link
Copy Markdown
Contributor

@ctb Lookin' good. I found a couple small things via cpychecker but nothing from your commits.

mr-c added a commit that referenced this pull request May 29, 2015
@mr-c mr-c merged commit 819ac87 into master May 29, 2015
@ctb ctb deleted the feature/labelgraph branch June 5, 2015 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants