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

Filter priority hotfix #530

Merged
merged 2 commits into from
Apr 7, 2020
Merged

Filter priority hotfix #530

merged 2 commits into from
Apr 7, 2020

Conversation

tsibley
Copy link
Member

@tsibley tsibley commented Apr 7, 2020

Description of proposed changes

Fixes a regression introduced by "Allow exception to bubble up when
priority file is bad." (63d6cb2) which accidentally changed the return
type of read_priority_scores() from defaultdict(float) to dict.

The calling code looks up sequences unconditionally in the priorities
dictionary and thus defaultdict(float) provides an appropriate fallback
value when no priority is explicitly given in the provided file.

Related issue(s)

Broke the nextstrain/ncov build on Augur 7.0.1.

Testing

  • Updated unit tests with a failing case and then made it pass with a fix.
  • Run actual nextstrain/ncov build step with fix to ensure it works.

Fixes a regression introduced by "Allow exception to bubble up when
priority file is bad." (63d6cb2) which accidentally changed the return
type of read_priority_scores() from defaultdict(float) to dict.

The calling code looks up sequences unconditionally in the priorities
dictionary and thus defaultdict(float) provides an appropriate fallback
value when no priority is explicitly given in the provided file.
@codecov
Copy link

codecov bot commented Apr 7, 2020

Codecov Report

Merging #530 into master will not change coverage by %.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #530   +/-   ##
=======================================
  Coverage   18.68%   18.68%           
=======================================
  Files          31       31           
  Lines        5053     5053           
  Branches     1281     1281           
=======================================
  Hits          944      944           
  Misses       4082     4082           
  Partials       27       27           
Impacted Files Coverage Δ
augur/filter.py 16.85% <100.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 6f0bc5e...8139f32. Read the comment docs.

@trvrb
Copy link
Member

trvrb commented Apr 7, 2020

Testing with ncov build now. Thanks Tom!

@tsibley tsibley merged commit 6f76e75 into master Apr 7, 2020
@tsibley tsibley deleted the filter-priority-hotfix branch April 7, 2020 22:52
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.

2 participants