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 res_grid_deg bug to allow either floats or a dict #1227

Merged
merged 4 commits into from
Jun 26, 2024
Merged

Conversation

lewisblake
Copy link
Member

@lewisblake lewisblake commented Jun 26, 2024

Change Summary

Update res_grid_deg in colocation_setup.py to be either a float, dict, or None

Related issue number

Close #1226

Checklist

  • Start with a draft-PR
  • The PR title is a good summary of the changes
  • PR is set to AeroTools and a tentative milestone
  • Documentation reflects the changes where applicable
  • Tests for the changes exist where applicable
  • Tests pass locally
  • Tests pass on CI
  • At least 1 reviewer is selected
  • Make PR ready to review

@lewisblake lewisblake added this to the m2024-07 milestone Jun 26, 2024
Copy link

codecov bot commented Jun 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.30%. Comparing base (e992544) to head (2a575be).
Report is 466 commits behind head on main-dev.

Additional details and impacted files
@@             Coverage Diff              @@
##           main-dev    #1227      +/-   ##
============================================
- Coverage     79.31%   79.30%   -0.01%     
============================================
  Files           131      131              
  Lines         20234    20246      +12     
============================================
+ Hits          16048    16057       +9     
- Misses         4186     4189       +3     
Flag Coverage Δ
unittests 79.30% <100.00%> (-0.01%) ⬇️

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.

Copy link
Collaborator

@thorbjoernl thorbjoernl left a comment

Choose a reason for hiding this comment

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

dict[Literal["lat_res_deg", "lon_res_deg"], float] | None -> `dict[Literal["lat_res_deg", "lon_res_deg"], float] | float | None nvm

If we use this other places in the code, consider using a typeddict: https://typing.readthedocs.io/en/latest/spec/typeddict.html#typeddict

Copy link
Collaborator

@thorbjoernl thorbjoernl left a comment

Choose a reason for hiding this comment

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

LGTM

@lewisblake lewisblake marked this pull request as ready for review June 26, 2024 11:49
@lewisblake lewisblake merged commit 8d52135 into main-dev Jun 26, 2024
8 checks passed
@lewisblake lewisblake deleted the fix1226 branch June 26, 2024 11:50
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.

In pyaeroval_config.py: regrid_res_deg is expected to be a float (not a dictionary)
2 participants