-
Notifications
You must be signed in to change notification settings - Fork 1
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
PREOPS-4518: Preserve wind and seeing conditions from a loaded pickle. #47
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #47 +/- ##
==========================================
+ Coverage 12.19% 12.51% +0.32%
==========================================
Files 39 39
Lines 3156 3171 +15
Branches 477 477
==========================================
+ Hits 385 397 +12
- Misses 2762 2765 +3
Partials 9 9
☔ 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.
Provided that update_conditions
does not get called when a new pickle is loaded, this looks fine. (After a pickle is loaded but before the user sets a new time, the conditions instance that should be being used is the one from the pickle, not one generated by the dashboard's instance of ModelObservatory
. I think that's what you've done, but I'm not 100% sure. One challenge with param
is that it's sometimes hard to tell what triggers what.)
) | ||
|
||
# Code for tickets/PREOPS-4817 |
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.
In general, if code has previously been checked into git, just deleting it rather than commenting it is usually a better approach, although a text comment describing why one approach was taken rather than the other, maybe mentioning the commit where the other approach was taken, can be quite useful. Usually, "why" comments are more useful for posterity than "what" comments. (There are, of course, exceptions to this rule of thumb.)
(Just because I know this is good advice doesn't mean I actually always follow it myself, but I should.)
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.
Yes, update_conditions
only gets called when the date is changed 👍
The commented code is actually for the next ticket related to this, ticket 3817, allowing users to set weather conditions. (I realise now I've written the ticket number wrong.) I'll just remove the commented code and store in a file on my computer somewhere instead.
Looks good! Thanks for updating the tests |
5362e91
to
1385421
Compare
No description provided.