dls-controls / pythonSoftIOC

Embed an EPICS IOC in a Python process
Apache License 2.0
32 stars 7 forks source link

Allow "status" and "severity" on In record init #111

Closed AlexanderWells-diamond closed 1 year ago

AlexanderWells-diamond commented 1 year ago

This PR allows users to specify severity and status on record initialization, with values from the softioc.alarm module.

Note that "PINI" is set to "YES" by default, which means that the alarm status is immediately reset when the IOC is initialized. I'm not sure if we need to do anything fancy like disable "PINI" when we spot a status or severity keyword?

Closes #57

codecov[bot] commented 1 year ago

Codecov Report

Merging #111 (dc4a63f) into master (3f0ec72) will decrease coverage by 0.60%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #111      +/-   ##
==========================================
- Coverage   87.64%   87.03%   -0.61%     
==========================================
  Files          14       14              
  Lines         963      972       +9     
==========================================
+ Hits          844      846       +2     
- Misses        119      126       +7     
Impacted Files Coverage Δ
softioc/builder.py 97.56% <100.00%> (+0.14%) :arrow_up:
softioc/device.py 95.60% <0.00%> (-2.81%) :arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

github-actions[bot] commented 1 year ago

Unit Test Results

     15 files  ±    0       15 suites  ±0   29m 51s :stopwatch: - 1m 5s    247 tests +  17     241 :heavy_check_mark: +  17      6 :zzz: ±0  0 :x: ±0  3 705 runs  +255  3 265 :heavy_check_mark: +255  440 :zzz: ±0  0 :x: ±0 

Results for commit dc4a63f8. ± Comparison against base commit 3f0ec726.

This pull request removes 1 and adds 18 tests. Note that renamed tests count towards both. ``` tests.test_records ‑ test_DISP_defaults_on ``` ``` tests.test_records ‑ test_DISP_defaults_on[Waveform] tests.test_records ‑ test_DISP_defaults_on[aIn] tests.test_records ‑ test_DISP_defaults_on[boolIn] tests.test_records ‑ test_DISP_defaults_on[longIn] tests.test_records ‑ test_DISP_defaults_on[mbbIn] tests.test_records ‑ test_DISP_defaults_on[stringIn] tests.test_records ‑ test_setting_alarm_in_records[Waveform] tests.test_records ‑ test_setting_alarm_in_records[aIn] tests.test_records ‑ test_setting_alarm_in_records[boolIn] tests.test_records ‑ test_setting_alarm_in_records[longIn] … ```

:recycle: This comment has been updated with latest results.