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

WIP: Test bonanza for v3 #203

Merged
merged 16 commits into from
Oct 31, 2021
Merged

WIP: Test bonanza for v3 #203

merged 16 commits into from
Oct 31, 2021

Conversation

jakobnissen
Copy link
Member

@jakobnissen jakobnissen commented Oct 30, 2021

Improve test coverage for v3

Resolves #139 . During the testing, it is possible some functions may be changed if they are discovered to be broken. This PR will contain an exhaustive list of all non-test changes, that is, changes in the src directory,

Completion

  • Alphabet
  • Translation
  • BioSequence
  • LongSequence
  • Bit-manipulation
  • Search

Current changes / bugfixes

  • join! is now exported as it should have been
  • Fixed a typo in join!(::BioSequence, ::Vector) which caused it to fail
  • Renamed _copyto! for BioSequence to Base.copyto!. I don't know why it was an internal method before, honestly.
  • Remove unsafe_setindex!, which has been kept until now for backwards compatibility
  • Fix typo is_canonical in canonical(::BioSequence)
  • Remove outdated Base.cmp for BitIndex
  • Remove unused extract_encoded_element(::BitIndex, ::NTuple) and bitmask(::Type, ::Val)
  • Remove meaningless and non-tested function LongSequence(it) = LongSequence{eltype(it)}(it) (was also wrong)
  • Changed un-tested constructor LongSequence{A}(::Union{AbstractString,AbstractVector{UInt8}}, ::Integer, ::Integer) to take a range instead of two integers for consistency with other constructors
  • Remove one copy of duplicated method bitindex(::LongSubSeq, ::Integer)
  • Remove one copy of duplicated method encoded_setindex!(::SeqOrView, ::Unsigned, ::Integer)
  • Added missing method symbols_per_data_element(::LongSubSeq)
  • Change various methods to take AbstractUnitRange over UnitRange with identical behaviour

@codecov
Copy link

codecov bot commented Oct 30, 2021

Codecov Report

Merging #203 (65fde1c) into v3 (00491c0) will increase coverage by 5.58%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##               v3     #203      +/-   ##
==========================================
+ Coverage   82.86%   88.44%   +5.58%     
==========================================
  Files          31       31              
  Lines        2399     2372      -27     
==========================================
+ Hits         1988     2098     +110     
+ Misses        411      274     -137     
Flag Coverage Δ
unittests 88.44% <100.00%> (+5.58%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/BioSequences.jl 0.00% <ø> (ø)
src/biosequence/indexing.jl 100.00% <ø> (+1.51%) ⬆️
src/bit-manipulation/bitindex.jl 88.23% <ø> (+18.23%) ⬆️
src/biosequence/biosequence.jl 100.00% <100.00%> (+8.10%) ⬆️
src/biosequence/copying.jl 100.00% <100.00%> (+58.33%) ⬆️
src/biosequence/transformations.jl 100.00% <100.00%> (+19.14%) ⬆️
src/longsequences/constructors.jl 96.15% <100.00%> (+32.00%) ⬆️
src/longsequences/indexing.jl 100.00% <100.00%> (+5.40%) ⬆️
src/longsequences/seqview.jl 100.00% <100.00%> (+13.51%) ⬆️
src/longsequences/copying.jl 99.25% <0.00%> (+1.47%) ⬆️
... and 14 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 00491c0...65fde1c. Read the comment docs.

@jakobnissen jakobnissen merged commit cd6caac into BioJulia:v3 Oct 31, 2021
@jakobnissen
Copy link
Member Author

Since I consider this PR to be low-risk and unsurprising, I'm just merging right away, You're all welcome to review

@jakobnissen jakobnissen mentioned this pull request Oct 31, 2021
5 tasks
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.

1 participant