Closed fedonman closed 2 months ago
Attention: Patch coverage is 96.87500%
with 1 line
in your changes missing coverage. Please review.
Project coverage is 95.88%. Comparing base (
c843dfc
) to head (2d1196d
). Report is 1 commits behind head on main.
Files with missing lines | Patch % | Lines |
---|---|---|
src/qililab/exceptions/exception_group.py | 85.71% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Introduced a robust context manager
platform.session()
for managing platform lifecycle operations. The manager automatically callsplatform.connect()
,platform.initial_setup()
, andplatform.turn_on_instruments()
to set up the platform environment before experiment execution. It then ensures proper resource cleanup by invokingplatform.turn_off_instruments()
andplatform.disconnect()
after the experiment, even in the event of an error or exception during execution. If multiple exceptions occur during cleanup (e.g., failures in bothturn_off_instruments()
anddisconnect()
), they are aggregated into a singleExceptionGroup
(Python 3.11+) or a custom exception for earlier Python versions.Example: