-
Notifications
You must be signed in to change notification settings - Fork 78
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
Fix a failing test on DL3 Tool #1092
Conversation
…undant commented code in high_level/interpolate
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #1092 +/- ##
==========================================
+ Coverage 72.77% 73.92% +1.14%
==========================================
Files 122 123 +1
Lines 11849 11861 +12
==========================================
+ Hits 8623 8768 +145
+ Misses 3226 3093 -133
☔ View full report in Codecov by Sentry. |
Hi,
When looking in more detail, I don't understand anything, the error seems to be in the r0 to dl1 step
Anyone has an idea of what may be going on? |
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 with removing the test if it leads to failure. (also for some reason it doesn't reduce coverage?)
@moralejo Is this the full error message you get? It doesn't include the line where you get the error. |
It does reduce the coverage, but of the DL3 Tool file, https://app.codecov.io/gh/cta-observatory/cta-lstchain/pull/1092/blob/lstchain/tools/lstchain_create_dl3_file.py which is an indirect change with respect to this PR. |
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.
before removing the test because it is not passing, let's try to figure out what is the problem.
To perform the tests on the DL3 Tool using IRF interpolation methods, we need at least 3 sets of IRFs with different (zenith, delta) values for either or all types of IRFs:
For the test MC, we just have a file for a single node (zenith, delta), and so, in the In the test for DL3 Tool, I was assuming the presence of these extra IRFs to be used for each test process. Although, when performing sequential tests, this assumption holds true every time but in CI, where we have parallel tests being performed, this assumption fails sometimes. The issue of test coverage is definitely there, but seeing the numerous options that can be tested, I felt it was not a strict requirement to cover ALL IRF combinations to test whether the IRF interpolation method works or not. The core interpolation methods are already tested and cleared in Hence, it was simpler to remove these tests on DL3 Tool for IRF interpolation methods. To complete the full test coverage of the DL3 Tool, we would require to create all such numerous IRFs in To summarise, core IRF interpolation tests are passing in the |
The error itself seems to happen when running lstchain_data_r0_to_dl1, and more specifically, in ctapipe_io_lst, when it tries to read in the drive report of the test data
And indeed, the format does not seem to be what it tries to read. I can reproduce it outside of the tests (both running the lstchain_data_r0_to_dl1 script and directly reading in the file)
|
@moralejo It seems like a dedicated issue will be needed to discuss this. |
A test on DL3 Tools when using IRF interpolation methods was failing as it required a list of IRFs which are not present as fixtures for the scope of the test session. These IRFs are created and tested in
lstchain/high_level/tests/test_interpolate
(through some "lengthy" code) for almost all combinations of IRF interpolations.As such, it is not essential to have separate and similar tests on DL3 Tools, for testing the same functionality.
This was missed in the earlier PR #711 as I tested in sequential order instead of in parallel (as done in CI).
In case, we require to have the DL3 Tools tested for the full functionality again, we would just need to shift ~150 lines of code from
lstchain/high_level/tests/test_interpolate.py
tolstchain/conftest.py