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 no lineages error #609

Merged
merged 3 commits into from
Jan 11, 2024
Merged

fix no lineages error #609

merged 3 commits into from
Jan 11, 2024

Conversation

Tianhao-Gu
Copy link
Collaborator

No description provided.

Copy link

codecov bot commented Jan 10, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (9ba47c0) 47.15% compared to head (1a5e60a) 47.13%.

Files Patch % Lines
src/service/data_products/genome_attributes.py 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #609      +/-   ##
==========================================
- Coverage   47.15%   47.13%   -0.03%     
==========================================
  Files          75       75              
  Lines        6457     6460       +3     
==========================================
  Hits         3045     3045              
- Misses       3412     3415       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MrCreosote
Copy link
Member

Hm, I'm thinking what should happen here is that the match should complete but show no matches rather than fail outright. Maybe we should discuss in the re team slack

@Tianhao-Gu
Copy link
Collaborator Author

Hm, I'm thinking what should happen here is that the match should complete but show no matches rather than fail outright. Maybe we should discuss in the re team slack

👍

Comment on lines 656 to 661
if not lineages:
# return no matches
await storage.update_match_state(
internal_match_id, models.ProcessState.COMPLETE, now_epoch_millis(), []
)
return
Copy link
Member

Choose a reason for hiding this comment

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

You should do this in perform_gtdb_lineage_match, otherwise you'll miss some cases since the matcher chooses one of the two *strategy functions

Copy link
Member

Choose a reason for hiding this comment

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

also maybe make this a function and use that function wherever the same code is called

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

👍 I moved it to perform_gtdb_lineage_match. It's just calling storage.update_match_state. Making this single function call a function?

Copy link
Member

Choose a reason for hiding this comment

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

Fair enough, I guess you'd only be getting rid of a couple args, and the millis function probably shouldn't be abstracted out anyway since it's not mockable and needs to be changed

Copy link
Member

Choose a reason for hiding this comment

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

I guess it is mockable by monkey patching but I hate that

@Tianhao-Gu Tianhao-Gu merged commit 77d63eb into main Jan 11, 2024
9 of 11 checks passed
@Tianhao-Gu Tianhao-Gu deleted the dev_fix_matcher branch January 11, 2024 00:18
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