-
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
tickets/SP-1789: plot EFD logevents on an event timeline plot #124
Conversation
Times Square is down, so here is an example output plot. |
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 think it would be really useful to expand the documentation to make explicit
- why there are multiple sub-classes of the timeline log plot class (by making it clear what is different about the subclasses and WHY, it helps people understand what they would be expected to add if they make new subclasses .. you can see this to some extent from the code itself, but spelling it out is helpful especially if someone is coming in with a very different model of how it ought to work in mind)
- make it clear what the "kwarg" dict is supposed to be in the multitimeline plot function. Some examples in the docstring would be helpful.
I think that currently this is testing by running against the actual EFD. This is not super great -- Merlin suggested looking into "vcr" and at first glance, this seems like it might be useful. Can you look at replacing this unit test with one using vcr? I think that can be a separate ticket. Maybe disable the tests that run against the actual EFD unless the hostname is within usdf for now? (that's pretty close to "only run when triggered by a human" which is probably infrequent enough that it's fine).
Here's the VCR readthedocs page - https://vcrpy.readthedocs.io/en/latest/ (one final thing -- I'm not entirely sold on swapping to makeEfdClient, mostly because it fails everywhere that's not a rubin site, and it's clear that the logging team are expecting to be able to run their logging tools outside those locations .... I'm a bit surprised this runs the tests in github with that import line in efd.py even?) |
Most of the test cases do not use the EDF, but rather construct the dictionary which would be returned by the EFD in the test case code itself. The exception is |
I think the thing with VCR is that you can skip most of the work, and just add the decorators then run the test somewhere where the HTTP responses can be recorded. Then later executions of the same test with the same parameters just use the recorded responses. |
I tried to be sure it would work if makeEfdClient wasn't available: see the try/except structure here. I suppose it would still fail if |
It's a RuntimeError https://github.com/lsst-sitcom/summit_utils/blob/b167aba8ce67140068bf61055731d4b1dd37044d/python/lsst/summit/utils/efdUtils.py#L471 Ok - yes, I see the try/except now .. I think I looked at the commit where it was added, and didn't see that it had changed by the end. Ok! |
This PR is for the initial infrastructure and a few initial examples.
I expect plots to be supplemented and refined in additional issues and PRs.