Skip to content
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

Trr tests implementation in the core nectarchain module #173

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

guillaumegrolleron
Copy link
Contributor

This PR change the location of the TRR test suite into the main module with a dedicated submodule trr_test_suite.

I change the PyQt dependencies to the version 6 too.

@guillaumegrolleron guillaumegrolleron linked an issue Jan 23, 2025 that may be closed by this pull request
Copy link

codecov bot commented Jan 23, 2025

Codecov Report

Attention: Patch coverage is 0% with 42 lines in your changes missing coverage. Please review.

Project coverage is 48.81%. Comparing base (bac8691) to head (f9f0e39).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/nectarchain/trr_test_suite/gui.py 0.00% 17 Missing ⚠️
src/nectarchain/trr_test_suite/tools_components.py 0.00% 8 Missing ⚠️
src/nectarchain/trr_test_suite/linearity.py 0.00% 3 Missing ⚠️
...chain/trr_test_suite/pix_couple_tim_uncertainty.py 0.00% 3 Missing ⚠️
src/nectarchain/trr_test_suite/__init__.py 0.00% 2 Missing ⚠️
src/nectarchain/trr_test_suite/deadtime.py 0.00% 2 Missing ⚠️
src/nectarchain/trr_test_suite/pedestal.py 0.00% 2 Missing ⚠️
.../nectarchain/trr_test_suite/pix_tim_uncertainty.py 0.00% 2 Missing ⚠️
src/nectarchain/trr_test_suite/trigger_timing.py 0.00% 2 Missing ⚠️
src/nectarchain/trr_test_suite/utils.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #173       +/-   ##
===========================================
- Coverage   63.24%   48.81%   -14.44%     
===========================================
  Files          64       76       +12     
  Lines        4734     6236     +1502     
===========================================
+ Hits         2994     3044       +50     
- Misses       1740     3192     +1452     

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

@jlenain
Copy link
Collaborator

jlenain commented Jan 30, 2025

Grrr... I think something is still missing in the environment recipes. Trying with a fresh conda environment, I get:

python gui.py
Traceback (most recent call last):
  File "/home/jlenain/local/src/python/cta-observatory/nectarchain/src/nectarchain/trr_test_suite/gui.py", line 12, in <module>
    from PyQt6.QtCore import QProcess, QTimer
ImportError: /usr/lib/x86_64-linux-gnu/libQt6Core.so.6: version `Qt_6.8' not found (required by /home/jlenain/local/opt/mambaforge/envs/delme/lib/python3.11/site-packages/PyQt6/QtCore.abi3.so)

@guillaumegrolleron
Copy link
Contributor Author

Grrr... I think something is still missing in the environment recipes. Trying with a fresh conda environment, I get:

python gui.py
Traceback (most recent call last):
  File "/home/jlenain/local/src/python/cta-observatory/nectarchain/src/nectarchain/trr_test_suite/gui.py", line 12, in <module>
    from PyQt6.QtCore import QProcess, QTimer
ImportError: /usr/lib/x86_64-linux-gnu/libQt6Core.so.6: version `Qt_6.8' not found (required by /home/jlenain/local/opt/mambaforge/envs/delme/lib/python3.11/site-packages/PyQt6/QtCore.abi3.so)

However it works with the CI...

@jlenain
Copy link
Collaborator

jlenain commented Jan 31, 2025

Grrr... I think something is still missing in the environment recipes. Trying with a fresh conda environment, I get:

python gui.py
Traceback (most recent call last):
  File "/home/jlenain/local/src/python/cta-observatory/nectarchain/src/nectarchain/trr_test_suite/gui.py", line 12, in <module>
    from PyQt6.QtCore import QProcess, QTimer
ImportError: /usr/lib/x86_64-linux-gnu/libQt6Core.so.6: version `Qt_6.8' not found (required by /home/jlenain/local/opt/mambaforge/envs/delme/lib/python3.11/site-packages/PyQt6/QtCore.abi3.so)

However it works with the CI...

Right, but in CI, we do not try to open the GUI of the TRR suite. And here, it is the import to PyQt6.QtCore which fails, which is not used in unit tests, if I am correct.

…acOS, add conditional imports on PyQt5/PyQt6.
@jlenain
Copy link
Collaborator

jlenain commented Feb 5, 2025

Hum, from a fresh environment:

mamba env create --name delme --file environment.yml
mamba activate delme
pip install -e .

launching the TRR GUI still fails because of pyqtgraph dependency via src/nectarchain/makers/component/spe/spe_algorithm.py:

python src/nectarchain/trr_test_suite/gui.py
2025-02-05 15:01:07,411 nectarchain.data.management WARNING DIRAC probably not installed
Traceback (most recent call last):
  File "/home/jlenain/local/src/python/cta-observatory/nectarchain/src/nectarchain/trr_test_suite/gui.py", line 51, in <module>
    import nectarchain.trr_test_suite.deadtime as deadtime
  File "/home/jlenain/local/src/python/cta-observatory/nectarchain/src/nectarchain/trr_test_suite/__init__.py", line 1, in <module>
    from .gui import TestRunner
  File "/home/jlenain/local/src/python/cta-observatory/nectarchain/src/nectarchain/trr_test_suite/gui.py", line 51, in <module>
    import nectarchain.trr_test_suite.deadtime as deadtime
  File "/home/jlenain/local/src/python/cta-observatory/nectarchain/src/nectarchain/trr_test_suite/deadtime.py", line 13, in <module>
    from nectarchain.trr_test_suite.tools_components import DeadtimeTestTool
  File "/home/jlenain/local/src/python/cta-observatory/nectarchain/src/nectarchain/trr_test_suite/tools_components.py", line 17, in <module>
    from nectarchain.makers import EventsLoopNectarCAMCalibrationTool
  File "/home/jlenain/local/src/python/cta-observatory/nectarchain/src/nectarchain/makers/__init__.py", line 5, in <module>
    from .charges_makers import ChargesNectarCAMCalibrationTool
  File "/home/jlenain/local/src/python/cta-observatory/nectarchain/src/nectarchain/makers/charges_makers.py", line 20, in <module>
    from .component import ChargesComponent, NectarCAMComponent
  File "/home/jlenain/local/src/python/cta-observatory/nectarchain/src/nectarchain/makers/component/__init__.py", line 3, in <module>
    from .flatfield_spe_component import (
  File "/home/jlenain/local/src/python/cta-observatory/nectarchain/src/nectarchain/makers/component/flatfield_spe_component.py", line 12, in <module>
    from .spe import SPECombinedalgorithm  # noqa: F401
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jlenain/local/src/python/cta-observatory/nectarchain/src/nectarchain/makers/component/spe/__init__.py", line 1, in <module>
    from .spe_algorithm import (
  File "/home/jlenain/local/src/python/cta-observatory/nectarchain/src/nectarchain/makers/component/spe/spe_algorithm.py", line 15, in <module>
    import pyqtgraph as pg
  File "/home/jlenain/local/opt/mambaforge/envs/delme/lib/python3.11/site-packages/pyqtgraph/__init__.py", line 18, in <module>
    from .colors import palette
  File "/home/jlenain/local/opt/mambaforge/envs/delme/lib/python3.11/site-packages/pyqtgraph/colors/palette.py", line 1, in <module>
    from ..Qt import QtGui
  File "/home/jlenain/local/opt/mambaforge/envs/delme/lib/python3.11/site-packages/pyqtgraph/Qt/__init__.py", line 184, in <module>
    import PyQt6.QtCore
ImportError: /usr/lib/x86_64-linux-gnu/libQt6Core.so.6: version `Qt_6.8' not found (required by /home/jlenain/local/opt/mambaforge/envs/delme/lib/python3.11/site-packages/PyQt6/QtCore.abi3.so)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

put TRR tests in core module
2 participants