Closed teddyrendahl closed 6 years ago
Merging #62 into master will increase coverage by
0.99%
. The diff coverage is89.18%
.
@@ Coverage Diff @@
## master #62 +/- ##
==========================================
+ Coverage 86.73% 87.73% +0.99%
==========================================
Files 7 7
Lines 407 432 +25
==========================================
+ Hits 353 379 +26
+ Misses 54 53 -1
Impacted Files | Coverage Δ | |
---|---|---|
lightpath/path.py | 85.11% <89.18%> (+3.3%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 79e2ddc...54fd606. Read the comment docs.
btw the assigned tab still has me there after the review, so mission accomplished
Alright. Per discussion here and offilne, I launched the whole gambit of states. DeviceState
now is very specific about what we know about the device.
Removed:
Device is removed from the beamline.
Inserted:
Device is inserted into the beamline. This may or may not prevent beam
from reaching downstream devices.
Unknown:
Device is reporting neither an inserted or removed state.
Inconsistent:
The device is reporting that is both inserted and removed.
Disconnected:
We were unable to determine the state of the device because one or more
of the relevant signals was not available.
Error:
Catch-all state for any errors the device reported when asked for its
state that were not simply a failure to communicate with signals
:+1:
Description
The
lightpath
wasn't suitably protected against faulty devices. Many of the methods shamelessly calleddevice.inserted
e.t.c not accepting that these usually involve Channel Access calls that are liable to fail. Now, we only ask for device information infind_device_state
. This returns aDeviceState
enum that describes the state. This helps limit the number of Channel Access calls and in turn uniformly handle when these things fail.Motivation and Context
Closes #61
How Has This Been Tested?
Added a test for a broken device