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] simplify passing file extensions to the validator #170

Merged
merged 2 commits into from
Oct 19, 2021

Conversation

joergi-w
Copy link
Member

Currently, we manually collect valid file extensions from the different file formats. I found a simpler way to achieve this.

I found that we cannot read compressed sequence files because they are rejected by the validator, and SeqAn has already an issue for that: seqan/sharg-parser#77
Maybe we can push this issue a bit more into attention, as also other apps (like Mars) suffer from that.

@codecov
Copy link

codecov bot commented Oct 14, 2021

Codecov Report

Merging #170 (7d1c124) into master (d14e155) will increase coverage by 0.21%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     seqan/seqan3#170      +/-   ##
==========================================
+ Coverage   96.48%   96.70%   +0.21%     
==========================================
  Files          19       19              
  Lines         797      789       -8     
==========================================
- Hits          769      763       -6     
+ Misses         28       26       -2     
Impacted Files Coverage Δ
src/iGenVar.cpp 100.00% <100.00%> (+1.65%) ⬆️
src/variant_detection/variant_detection.cpp 93.97% <0.00%> (ø)

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 d14e155...7d1c124. Read the comment docs.

@joergi-w joergi-w requested review from a team and SGSSGene and removed request for a team October 14, 2021 11:02
@joergi-w
Copy link
Member Author

The relative code coverage is lower, because I deleted some lines that had been covered by tests. But I didn't introduce new uncovered lines, so I don't agree that the check fails.

Copy link

@SGSSGene SGSSGene left a comment

Choose a reason for hiding this comment

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

I wasn't aware that seqan3::input_file_validator<seqan3::sequence_file_input<>>{} exists. This is very cool! 😮

@SGSSGene
Copy link

The relative code coverage is lower, because I deleted some lines that had been covered by tests. But I didn't introduce new uncovered lines, so I don't agree that the check fails.

Yes, I agree with you!

@joergi-w joergi-w requested a review from Irallia October 18, 2021 12:38
Copy link
Collaborator

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

If you are very motivated, you could add tests for the two uncovered lines in the iGenVar.cpp. But we can also leave it as it is and merge.

@joergi-w
Copy link
Member Author

Sure, I'm already thinking about these tests. The problem is that the file validator already checks the existence, writability, and file extensions of the given paths – so I cannot think of any scenario that passes the validator and fails afterwards in iGenVar.cpp.

@Irallia
Copy link
Collaborator

Irallia commented Oct 19, 2021

Yes you're right. Than we should maybe just take it out of the coverage with:

// LCOV_EXCL_START
some code...
// LCOV_EXCL_STOP

@joergi-w
Copy link
Member Author

Okay, done!

@Irallia Irallia merged commit 2844212 into seqan:master Oct 19, 2021
@joergi-w joergi-w deleted the file_extension_check branch December 6, 2021 10:16
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