DiamondLightSource / FastCS

Control system agnostic framework for building device support in Python for both EPICS and Tango
Apache License 2.0
1 stars 2 forks source link

Improvements to IPConnection #26

Open OCopping opened 6 months ago

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 50.00000% with 20 lines in your changes missing coverage. Please review.

Project coverage is 45.03%. Comparing base (2d9657f) to head (b7f6601). Report is 28 commits behind head on main.

Files Patch % Lines
src/fastcs/connections/ip_connection.py 50.00% 20 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #26 +/- ## ========================================== + Coverage 43.96% 45.03% +1.06% ========================================== Files 18 18 Lines 655 675 +20 ========================================== + Hits 288 304 +16 - Misses 367 371 +4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

OCopping commented 6 months ago

If you two are happy with the decorator approach to try and clean up the functions inside Connection objects, I might try and move them into a separate script to then be imported. I would have to make them more generalised though (e.g. instead of looking at self._reader and self,_writer in _ensure_connected, I could set a new self._connected variable in the object that could be used in every new Connection object too)

I have tested similar decorators in pythonSoftIOCs I have written recently and they worked nicely.