Closed taldcroft closed 1 year ago
This is possible with plotly figures:
json.dumps(fig, indent=2)
so in principle one can always recreate the figure from the json. That means the web app has the choice of rendering the html in the server or sending the json and rendering in the browser.
One option for a web page could be to request each validation plot separately in json and load them as they are done, but it might not be a good idea because there might be repeated calls to maude spread over several python instances.
I noticed that the setup.py still lists all the templates, so I just want to point out that those templates were removed. Currently, the only templates in kadi are the ones added by this PR.
Fixed.
If this is implemented in the kadi web server, most likely the templates will not be used, because we will want to use the kadi style. I suppose it is ok to leave them here, because this is currently a standalone application.
Yes, we can cross that bridge later with the app. Likewise the interesting idea about returning the validation plot as JSON in order to have a more responsive app.
Description
This is the modern Py3 version of
validate_states
. Instead of updating that project and making a new Ska3 package, this PR makes a new sub-package of kadi (with a corresponding app) to handle state validation.This requires https://github.com/sot/eng_archive/pull/242.
Known issues / To do
In-work
command eventsOptional
Interface impacts
This will supersede the Py2
validate_states
app.Testing
Unit tests
Independent check of unit tests by Jean. I ran with https://github.com/sot/eng_archive/pull/242, https://github.com/sot/maude/pull/44, https://github.com/sot/cxotime/pull/31 in my path.
Functional tests
Run over full 2022:293 IU-reset and Safe mode
This gives the expected results.
Run within 2022:293 IU-reset and Safe mode (at day 295:0000z)
This creates a data gap corresponding to being in a real-time comm after an 8-hour gap.
This gives the expected results.