pymeasure / pyleco

Python implementation of the Laboratory Experiment COntrol (LECO) protocol
MIT License
9 stars 3 forks source link

Review: Add Message Handler #12

Closed BenediktBurger closed 5 months ago

BenediktBurger commented 1 year ago

The MessageHandler is the base for single threaded LECO components: It listens in a continuous loop to incoming messages and handles them.

The MessageHandler is an extended Component (with log level and shutdown).

As dependency, it needs the ZmqLogHandler, which is a logging Handler which publishes log messages via the data protocol (on the log ports).

github-actions[bot] commented 1 year ago

PyLECO Coverage

Coverage Report
FileStmtsMissCoverMissing
pyleco
   test.py612263%39, 42, 63, 66–67, 70, 76, 84, 96, 106–110, 113, 116, 119, 122–124, 127–128
pyleco/core
   internal_protocols.py12283%60, 70
pyleco/utils
   message_handler.py1752182%85–>88, 90–>89, 137–>139, 149–150, 184–188, 215–216, 217–>220, 249–250, 260–261, 264–267, 270–273, 301
   zmq_log_handler.py401162%63–64, 66–68, 70–72, 81–82, 85
TOTAL4475684% 

Coverage Summary

Tests Skipped Failures Errors Time
112 0 :zzz: 0 :x: 0 :fire: 1.297s :stopwatch:
BenediktBurger commented 11 months ago

As a review is not happening in foreseeable future, I make this PRs a draft.

Whenever someone has time to review, I'll push the most recent version.

github-actions[bot] commented 9 months ago

PyLECO Coverage

Coverage Report
FileStmtsMissCoverMissing
pyleco
   test.py1144755%39, 42, 64, 67, 70–71, 74, 80, 99, 103–108, 111–119, 136–>135, 156–160, 163, 166, 169, 172–174, 177, 180–181, 218–220, 223–226, 230–233
pyleco/core
   internal_protocols.py281342%72, 81, 87–90, 102–106, 110–114
pyleco/utils
   data_publisher.py38195%61
   zmq_log_handler.py35481%63, 65–>67, 69–71
TOTAL6166588% 

Coverage Summary

Tests Skipped Failures Errors Time
166 0 :zzz: 0 :x: 0 :fire: 1.097s :stopwatch:
BenediktBurger commented 9 months ago

This PR is now includes the code of #17 as the logging entity uses data messages (it already used the data protocol but implemented it by itself).

Therefore the data_message and data_publisher, including their respective tests, are not part of this PR by itself.

BenediktBurger commented 5 months ago

As it is unknown, when this will be reviewed: Closed.