Skip to content

Add units parameter to resolution warning log - at least in some cases#699

Merged
djhoese merged 1 commit intopytroll:mainfrom
LeviDPC:fix-issue-458-units
Feb 24, 2026
Merged

Add units parameter to resolution warning log - at least in some cases#699
djhoese merged 1 commit intopytroll:mainfrom
LeviDPC:fix-issue-458-units

Conversation

@LeviDPC
Copy link

@LeviDPC LeviDPC commented Feb 21, 2026

Pull request to fix #458 (and fixes the example of the problem given in that ticket.)

It does so by adding an optional parameter units to the _round_shape function and having _extrapolate_information give the appropriate units when calling _round_shape.

This should fix all instances of this as the warning only has the potential to be thrown when resolution and radius are both set and the only other instance of calling _round_shape (in _format_list) does not set those parameters.

@djhoese
Copy link
Member

djhoese commented Feb 23, 2026

Thanks Levi. The thing that jumps out to me about this is that the _round_shape second use where units aren't needed should be a different function. Seems like two different use cases. But that's not your problem. This seems reasonable as a quick fix.

@djhoese djhoese changed the title Fix #458: Add units parameter to resolution warning log - at least in some cases Add units parameter to resolution warning log - at least in some cases Feb 23, 2026
@codecov
Copy link

codecov bot commented Feb 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.67%. Comparing base (4da28b0) to head (b4b80e5).
⚠️ Report is 27 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #699   +/-   ##
=======================================
  Coverage   93.67%   93.67%           
=======================================
  Files          89       89           
  Lines       13621    13621           
=======================================
  Hits        12759    12759           
  Misses        862      862           
Flag Coverage Δ
unittests 93.67% <100.00%> (ø)

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

☔ 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.

@djhoese djhoese self-assigned this Feb 23, 2026
@djhoese djhoese merged commit d0cecf5 into pytroll:main Feb 24, 2026
26 checks passed
@djhoese
Copy link
Member

djhoese commented Feb 24, 2026

Thanks Levi!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Warning log message is incorrectly showing resolution as 'meters'

2 participants