-
Notifications
You must be signed in to change notification settings - Fork 296
[MRG] Expose *_with_reads_parser method overloads to Python API #1753
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
Conversation
|
|
||
|
|
||
| PyObject * | ||
| hashtable_consume_seqfile_with_reads_parser(khmer_KHashtable_Object * me, |
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.
Moved this function up for consistency's sake: for each overloaded method, the version that accepts a string is first, and the version that accepts a parser is second.
|
|
||
| PyObject * | ||
| hashtable_consume_seqfile_with_reads_parser(khmer_KHashtable_Object * me, | ||
| PyObject * args) |
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.
Looks like git is struggling with the similarity between all of the variants of this function and the fact that I cut n pasted this function further up, again for consistency. I promise the CPython code changes are a lot more boring than this diff would suggest. :-)
Codecov Report
@@ Coverage Diff @@
## master #1753 +/- ##
=========================================
- Coverage 0.05% 0.05% -0.01%
=========================================
Files 87 90 +3
Lines 11451 11561 +110
Branches 3078 3118 +40
=========================================
Hits 6 6
- Misses 11445 11555 +110
Continue to review full report at Codecov.
|
|
Hey @camillescott and @ctb: I'm not grokking the errors from the latest CI build for this thread. Do you think this has to do with CPython inheritance issues? |
|
With most recent Cython PRs merged, closing in favor of #1785. |
Each variant of the hashtable
consume_seqfilemethod is overloaded to support either an input filename (provided as astd::string) or alternatively a read parser. However, most of these are not currently accessible via the Python API. This PR adds these to the CPython code.While running the tests, I ran into "too many open files" errors. On further investigation, none of the existing CPython code explicitly closed the read parsers. I addressed this for both the new methods as well as the existing method.
One point of concern: the proliferation of
consumefunctions is getting out of hand. We can only postpone refactoring for so long.Ready for review and merge!
make testDid it pass the tests?make clean diff-coverIf it introduces new functionality inscripts/is it tested?make format diff_pylint_report cppcheck doc pydocstyleIs it wellformatted?