-
Notifications
You must be signed in to change notification settings - Fork 89
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
Adding a plugin to calculate the virtual temperature #2058
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2058 +/- ##
==========================================
- Coverage 98.39% 98.38% -0.01%
==========================================
Files 124 134 +10
Lines 12212 13083 +871
==========================================
+ Hits 12016 12872 +856
- Misses 196 211 +15 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've looked through the changes and I'm generally happy with them:
- The virtual temperature plugin looks like it does what it's supposed to
- The unit tests that have written look sensible and all run fine
- The PR is failing due to the PR standards - I think it's just something to do with adding yourself as a contributor. I think it's because in the email address you are [email protected] but you have put your name as Philip it doesn't like this. It might be worth changing that and see if it then passes that test?
- I've left a couple of comments about your comments but they are very minor.
improver/virtual_temperature.py
Outdated
|
||
|
||
class VirtualTemperature(BasePlugin): | ||
"""Calculates the virtual temperature from temperature and .""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to write humidity mixing ratio here too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did, but I have now changed this string to """Plugin class to handle virtual temperature calculations."""
to better answer your second comment.
@staticmethod | ||
def get_virtual_temperature(temperature: Cube, humidity_mixing_ratio: Cube) -> Cube: | ||
""" | ||
Calculate the virtual temperature from temperature and humidity mixing ratio. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need to repeat yourself here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right it's a little repetitive. I have changed the class docstring.
The cause of the failing tests was a poorly set up git config. Rather than confusing this PR with further commits and rewriting the history to the new configuration I will close this PR and open a new one. |
Address: https://metoffice.atlassian.net/browse/EPPT-1965
This PR adds a plugin to calculate the virtual temperature based on the air temperature and humidity mixing ratio.
No CLI added due to the move to the DAG runner.
Testing:
CLA