Skip to content

Conversation

@corneliusroemer
Copy link
Member

@corneliusroemer corneliusroemer commented Oct 10, 2025

Related to #1904

Description of proposed changes

Related issue(s)

Checklist

  • Automated checks pass
  • Check if you need to add a changelog message
  • Check if you need to add tests
  • Check if you need to update docs

@codecov
Copy link

codecov bot commented Oct 10, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.06%. Comparing base (4a31ada) to head (5a44353).

Files with missing lines Patch % Lines
augur/curate/apply_geolocation_rules.py 50.00% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1905      +/-   ##
==========================================
- Coverage   74.09%   74.06%   -0.04%     
==========================================
  Files          82       82              
  Lines        8972     8980       +8     
  Branches     1823     1824       +1     
==========================================
+ Hits         6648     6651       +3     
- Misses       2019     2023       +4     
- Partials      305      306       +1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment on lines +123 to +126
raise Exception(
f"Expected the next traversal target to be a string, but got {type(next_traversal_target)} instead. " +
f"Raw geolocation: {raw_geolocation}, rule traversal: {rule_traversal}. " +
f"Current rules: {current_rules}."
Copy link
Member

Choose a reason for hiding this comment

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

Suggested rewording that points directly to the problem:

ERROR: The 'location' field has a null value. Please use an empty string ""
instead of null for missing values.

Input values:
  region: ''
  country: 'Democratic Republic of the Congo'
  division: 'Tshopo,Yahuma'
  location: null

Comment on lines +103 to +108
try:
lower_field_value = field_value.lower()
except AttributeError:
print_err(f"WARNING: Could not convert {field_value!r} to lowercase.")
continue
current_rules = current_rules.get(lower_field_value)
Copy link
Member

Choose a reason for hiding this comment

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

No need for try/except – the case of field_value not being a string should be handled elsewhere (done in this PR).

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