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

[FIX] Iterator Tag in kmer_hash #1710

Merged
merged 1 commit into from
Apr 6, 2020

Conversation

MitraDarja
Copy link
Contributor

For the minimiser view (#1654) I had problems preserving the forward_range properties, changing the tag in the kmer hash from input range to iterator_tag solved this problem.

@MitraDarja MitraDarja requested review from a team and Irallia and removed request for a team April 2, 2020 10:45
@codecov
Copy link

codecov bot commented Apr 2, 2020

Codecov Report

Merging #1710 into master will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1710      +/-   ##
==========================================
+ Coverage   97.65%   97.68%   +0.02%     
==========================================
  Files         237      237              
  Lines        9048     9057       +9     
==========================================
+ Hits         8836     8847      +11     
+ Misses        212      210       -2     
Impacted Files Coverage Δ
include/seqan3/range/views/kmer_hash.hpp 100.00% <ø> (ø)
include/seqan3/range/views/trim.hpp 100.00% <0.00%> (ø)
include/seqan3/search/detail/search.hpp 100.00% <0.00%> (ø)
include/seqan3/io/sequence_file/input.hpp 100.00% <0.00%> (ø)
include/seqan3/io/alignment_file/input.hpp 100.00% <0.00%> (ø)
include/seqan3/io/structure_file/input.hpp 100.00% <0.00%> (ø)
include/seqan3/io/structure_file/output.hpp 100.00% <0.00%> (ø)
include/seqan3/range/views/single_pass_input.hpp 100.00% <0.00%> (ø)
include/seqan3/core/detail/debug_stream_range.hpp 100.00% <0.00%> (ø)
... and 16 more

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 4c08490...8c40faa. Read the comment docs.

Copy link
Member

@smehringer smehringer left a comment

Choose a reason for hiding this comment

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

Can you add tests for the view properties of kmer hash? :)

@MitraDarja
Copy link
Contributor Author

@smehringer What other tests do you want to add? There are already concept tests.

Copy link
Contributor

@rrahn rrahn left a comment

Choose a reason for hiding this comment

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

something small thing that caught my eye.

@@ -224,7 +224,7 @@ class kmer_hash_view<urng_t>::shape_iterator
//!\brief Reference to `value_type`.
using reference = value_type;
//!\brief Tag this class as input iterator.
using iterator_category = std::input_iterator_tag;
using iterator_category = iterator_tag_t<it_t>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
using iterator_category = iterator_tag_t<it_t>;
using iterator_category = typename std::iterator_traits<it_t>::iterator_category;

Copy link
Member

Choose a reason for hiding this comment

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

I think seqan3::iterator_tag_t was more correct.
See #853
IIRC iterators may not provide the category, at least we encountered it sometimes...
Or we somewhere down the line expect that it is there...

Copy link
Contributor

@rrahn rrahn left a comment

Choose a reason for hiding this comment

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

There is now a test dor the minimiser view? I think that does not belong here?

Copy link
Contributor

@Irallia Irallia left a comment

Choose a reason for hiding this comment

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

LGFM

@smehringer smehringer merged commit e7d8954 into seqan:master Apr 6, 2020
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.

5 participants