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

90 add enter and exit methods to qmi instrument #98

Merged

Conversation

heevasti
Copy link
Collaborator

  • The QMI_Instrument and QMI_TaskRunner (which inherit from QMI_RpcObject) are now equipped with specific __enter__ and __exit__ methods, which in the case of QMI_Instrument
    also open and close the instrument when run with a with context manager protocol. Meanwhile QMI_TaskRunner starts and stops then joins a QMI task thread. In practise, these context managers
    can be used instead of the to-be-obsoleted open_close and start_stop_join context managers. The context manager protocol cannot be used for QMI_RpcObject directly.

  • Relevant unit-tests added

  • Docstrings added and improved.

  • Fix on scheduled full CI unit-test pipeline which was missing installing of dependencies.

heevasti added 2 commits August 22, 2024 10:14
…strument` and `QMI_TaskRunner` classes, which inherit from `QMI_RpcProxy`. The latter has also now the same methods implemented but not as RPC methods. Added warnings of obsoletion into `open_close` and `start_stop_join` context managers in `qmi.utils.context_managers`. Added unit-tests, and added and improved docstrings.
@heevasti heevasti linked an issue Aug 22, 2024 that may be closed by this pull request
@heevasti heevasti merged commit f508e4b into main Aug 26, 2024
6 checks passed
@heevasti heevasti deleted the 90-add-__enter__-and-__exit__-methods-to-qmi_instrument branch August 26, 2024 07:52
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.

Add __enter__ and __exit__ methods to QMI_Instrument
3 participants