Skip to content
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

[HOLD] Expose and test "_with_parser" variants of the "consume_seqfile" method #1785

Closed
wants to merge 3 commits into from

Conversation

standage
Copy link
Member

@standage standage commented Sep 13, 2017

Threaded processing requires using the parser variant rather than the filename variant. This PR exposes the parser variant of all the "consume_seqfile" methods. In an ideal world, Cython wouldn't have bugs and would be able to handle this cleanly. Until such a time, we've duplicated each consume function at the Cython level.

Related to #1771. Doesn't close, but temporarily addresses the issue so that we can actually use the functionality at the Python level.

Also included in the PR.

  • some incidental changes to, for example, whitespace
  • change _with_reads_parser to _with_parser and compensatory changes to scripts/, sandbox/, tests/, etc.

  • Is it mergeable?
  • make test Did it pass the tests?
  • make clean diff-cover If it introduces new functionality in
    scripts/ is it tested?
  • make format diff_pylint_report cppcheck doc pydocstyle Is it well
    formatted?
  • Did it change the command-line interface? Only backwards-compatible
    additions are allowed without a major version increment. Changing file
    formats also requires a major version number increment.
  • For substantial changes or changes to the command-line interface, is it
    documented in CHANGELOG.md? See keepachangelog
    for more details.
  • Was a spellchecker run on the source code and documentation after
    changes were made?
  • Do the changes respect streaming IO? (Are they
    tested for streaming IO?)

deref(self._ht_this).consume_seqfile[CpFastxReader](parser.parser,
total_reads,
n_consumed)
return total_reads, n_consumed
Copy link
Member Author

Choose a reason for hiding this comment

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

Cut n pasted further down.

@standage standage changed the title Expose and test "_with_parser" variants of the "consume_seqfile" method [MRG] Expose and test "_with_parser" variants of the "consume_seqfile" method Sep 13, 2017
@standage
Copy link
Member Author

Ready for review and merge! @ctb @camillescott @luizirber @betatim

@camillescott
Copy link
Member

Ahhh hrmm. So this is already addressed in #1774... if you don't want to finish up that PR, maybe it would be best to cherry pick some commits, or follow its formatting? It removes the with_parser variants entirely, and instead takes an object parameter and determines whether its a ReadParser or file name. Removes a bunch of code copying and pasting.

@camillescott
Copy link
Member

I think I only mentioned it in Slack... probably should have made a note in the title comment.

@standage
Copy link
Member Author

So this is already addressed in #1774.

Great. I would only be too happy to close this PR in favor of that one.

if you don't want to finish up that PR, maybe it would be best to cherry pick some commits, or follow its formatting?

Sure, I can take a look. Generally I have a habit of ignoring most PRs until review is requested unless 1) I'm particularly interested in its progress or 2) I'm mentioned by name. I was under the impression that this was standard operating procedure.

I think I only mentioned it in Slack... probably should have made a note in the title comment.

Yeah, I must have missed the Slack message. I might have paid more attention if I had realized you had started down this route in that PR.


I'll take a closer look and comment here later.

@standage
Copy link
Member Author

It removes the with_parser variants entirely, and instead takes an object parameter and determines whether its a ReadParser or file name. Removes a bunch of code copying and pasting.

Is this actually part of #1774? I only see changes to the tests, not to the relevant method implementations.

@camillescott
Copy link
Member

Yeah, definitely in there -- probably just didn't get expanded by default for being a big diff (had to click the button when I looked)

@standage
Copy link
Member Author

probably just didn't get expanded by default for being a big diff

Yep. :-/


This looks a lot better than what I was trying to do. I'll pick up from here.

@camillescott
Copy link
Member

camillescott commented Sep 14, 2017 via email

@codecov-io
Copy link

codecov-io commented Sep 14, 2017

Codecov Report

Merging #1785 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #1785   +/-   ##
======================================
  Coverage    0.06%   0.06%           
======================================
  Files          78      78           
  Lines        9792    9792           
  Branches     2457    2457           
======================================
  Hits            6       6           
  Misses       9786    9786
Impacted Files Coverage Δ
scripts/load-into-counting.py 0% <ø> (ø) ⬆️
scripts/filter-abund-single.py 0% <ø> (ø) ⬆️
oxli/functions.py 0% <0%> (ø) ⬆️
scripts/abundance-dist-single.py 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update edabebf...54aa992. Read the comment docs.

@standage standage changed the title [MRG] Expose and test "_with_parser" variants of the "consume_seqfile" method [HOLD] Expose and test "_with_parser" variants of the "consume_seqfile" method Sep 14, 2017
@standage
Copy link
Member Author

Superseded and fixed by #1787.

@standage standage closed this Sep 18, 2017
@standage standage deleted the fix/consume-with-parser-cython branch September 18, 2017 13:49
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