Skip to content

DQM, unit tests for mean_camera_display.py - #403

Merged
jlenain merged 1 commit into
cta-observatory:mainfrom
alessandromontanari:dqm-mean-cam-displ-unit-tests
Nov 6, 2026
Merged

jlenain merged 1 commit into
cta-observatory:mainfrom
alessandromontanari:dqm-mean-cam-displ-unit-tests

Conversation

@alessandromontanari

@alessandromontanari alessandromontanari commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

test(src/nectarchain/dqm/tests): - test_mean_camera_display.py: complete unit tests for mean_camera_display.py, reaching coverage of 95%

The PR reaches unit test coverage 95% for mean_camera_display.py. The missing lines are (139-143):

        else:
            wf = evt.r1.tel[self.tel_id].waveform
            if wf.ndim == 3:
                waveforms = wf[self.k]
            else:
                waveforms = wf

which unfortunately is not covered by the data we use for the tests because self.r0 is False; and the usual (161-166):

        else:
            # TODO: add ids for other event types, e.g., dark pedestals
            # TODO: this else is wrong, we should have a separate counter
            # for other event types, e.g., dark pedestals. It has to be implemented.
            self.counter_evt += 1
            self.camera_average += charge_mapped

which, anyway, will have to be removed once I address the TODO for all the processors. Therefore, I suggest to merge the PR as is.

…ete unit tests for mean_camera_display.py, reaching coverage of 95%
@alessandromontanari alessandromontanari self-assigned this Nov 5, 2026
@alessandromontanari alessandromontanari added the test Pull request that works specifically on unit tests label Nov 5, 2026
@codecov

codecov Bot commented Nov 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.83%. Comparing base (8d4ccfb) to head (a691147).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #403      +/-   ##
==========================================
+ Coverage   56.12%   56.83%   +0.70%     
==========================================
  Files          96       96              
  Lines       10448    10448              
==========================================
+ Hits         5864     5938      +74     
+ Misses       4584     4510      -74     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jlenain jlenain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jlenain
jlenain merged commit 5e2a35d into cta-observatory:main Nov 6, 2026
11 checks passed
@jlenain
jlenain deleted the dqm-mean-cam-displ-unit-tests branch November 6, 2026 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Pull request that works specifically on unit tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants