fix: warn when sample_metadata() returns empty result due to case-sensitivity #1084
Open
sallykinyua wants to merge 3 commits intomalariagen:masterfrom
Open
fix: warn when sample_metadata() returns empty result due to case-sensitivity #1084sallykinyua wants to merge 3 commits intomalariagen:masterfrom
sallykinyua wants to merge 3 commits intomalariagen:masterfrom
Conversation
…ta-case-sensitivity-warning
Author
|
Hi @jonbrenas Can you please review this I know you earlier pointed out that documentations issues do not deserve alot of scrutiny but I found this essential to work but I would like to know if it aligns with the priority of the contribution period? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1083
Problem
sample_metadata() silently returns an empty DataFrame when a query
uses incorrect string casing, with no error or suggestion to the user.
For example,
country == 'uganda'returns 0 results whilecountry == 'Uganda'returns 290.Fix
Added a UserWarning after the query executes when zero results are
returned, informing the user that string matching is case-sensitive
and providing an example of the correct format.
Files Changed
malariagen_data/anoph/sample_metadata.py — line 785, added warning
when df_samples is empty after applying prepared_sample_query.