-
Notifications
You must be signed in to change notification settings - Fork 3
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
Improve SPM eclipse enable state #291
Conversation
@@ -711,7 +714,7 @@ class SPMEnableTransition(FixedTransition): | |||
|
|||
command_attributes = {"tlmsid": "AOFUNCEN"} | |||
command_params = {"aopcadse": 30} | |||
state_keys = ["sun_pos_mon"] | |||
state_keys = SPM_STATE_KEYS |
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.
This speaks to a lack of knowledge on my part, but for a non-eclipse transition, are the battery_connect and eclipse_enable_spm keys relevant?
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.
This tells the code that if you are asking for (e.g.) battery_connect
that it should include this class in the processing that looks for potential state-changing commands since battery_connect
and sun_pos_mon
are coupled in some way. I'm honestly not 100% sure if this is needed but it's generally a good idea for states that work in tandem.
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.
OK, that's fine. It seemed not necessary in passing but also seems like it would be benign if not really needed (and is tested this way as fine).
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.
Testing looks good and code makes sense to me from a "use states and continuity in a sane way to manage these things that are tricky" perspective.
Related to "With this the SPM transitions for a 200 day span are mostly OK" -- what knobs would we have to twiddle to in the command google sheet if we ended up with a mismatch or wanted to fix a "mostly ok" that wasn't based on the code being incorrect? |
Oh, and I guess I shouldn't have Approved with an outstanding Flake 8 issue and it still probably should have that comment fixed. |
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'll reset my review to "request changes" - I had that one question about relevant states and this needs flake8 update and maybe a fix to that comment.
In the |
@jeanconn - I think I addressed your comments. |
Description
This refactors the handling for the
sun_pos_mon
state into three separate states. This was needed in order to ensure that continuity is correct for any state query start time.Fixes #289
Interface impacts
Adds new states
battery_connect
andeclipse_enable_spm
.Testing
Unit tests
Independent check of unit tests by Jean
Functional tests
Created (in a notebook) a new validator class:
With this the SPM transitions for a 200 day span are mostly OK: