Closed taldcroft closed 7 months ago
Though I should have asked before I approved -- why does this need ska_helpers 0.13.0?
Though I should have asked before I approved -- why does this need ska_helpers 0.13.0?
I think it was the coerce_types thingy.
Makes sense but is in 0.12.0 (0.13.0 just has a test update so I was trying to figure out if if you were calling out a different package or different release).
Description
This PR adds email notification to
aca@cfa.harvard.edu
for violations.As part of this I did some refactoring to use smaller, more separable, processing functions. The first step was moving the mail validation script processing function from
validate.py
(implements validator functionality) tovalidate_states.py
(does the processing to produce a report page).Closes #271
Required dependencies
This requires:
Interface impacts
Email alert notification for any kadi command states validation violations.
Testing
Unit tests
kadi/commands/tests/test_commands.py .............................................................. [ 28%] ............. [ 34%] kadi/commands/tests/test_states.py ......................x......................................... [ 63%] ....x....................... [ 76%] kadi/commands/tests/test_validate.py .................... [ 85%] kadi/tests/test_events.py .......... [ 89%] kadi/tests/test_occweb.py ...................... [100%]
================================ 217 passed, 2 xfailed in 91.58s (0:01:31) ================================
env PYTHONPATH=/home/aldcroft/git/Quaternion:/home/aldcroft/git/ska_helpers \ python -m kadi.scripts.validate_states --email taldcroft@cfa.harvard.edu ... 2023-12-03 07:06:14,274 get_plot_html: Creating HTML for state sun_pos_mon 2023-12-03 07:06:14,290 main: kadi validate_states processing found state violation(s):
off_nom_roll 2023:326:07:37:24.629 2023:326:08:31:44.128 off_nom_roll 2023:328:23:57:25.428 2023:329:00:06:25.603 off_nom_roll 2023:329:00:38:51.053 2023:329:00:50:16.778 off_nom_roll 2023:329:01:09:07.353 2023:329:04:49:08.328 off_nom_roll 2023:335:13:30:00.478 2023:335:13:31:30.678 pcad_mode 2023:326:20:05:54.867 2023:326:20:07:23.017
See:https://cxc.harvard.edu/mta/ASPECT/validate_states/
2023-12-03 07:06:14,327 send_mail: Sent mail to ['taldcroft@cfa.harvard.edu']