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

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

Merged
merged 3 commits into from
Oct 14, 2022

Conversation

AlexanderWells-diamond
Copy link
Collaborator

@AlexanderWells-diamond AlexanderWells-diamond commented Oct 13, 2022

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

Add new tests and refactor existing ones

Add docs
@codecov
Copy link

codecov bot commented Oct 13, 2022

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%) ⬆️
softioc/device.py 95.60% <0.00%> (-2.81%) ⬇️

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

@github-actions
Copy link

github-actions bot commented Oct 13, 2022

Unit Test Results

     15 files  ±    0       15 suites  ±0   29m 51s ⏱️ - 1m 5s
   247 tests +  17     241 ✔️ +  17      6 💤 ±0  0 ±0 
3 705 runs  +255  3 265 ✔️ +255  440 💤 ±0  0 ±0 

Results for commit dc4a63f. ± Comparison against base commit 3f0ec72.

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]
…

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@Araneidae Araneidae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty straightforward. Probably worth making the one mentioned change.

softioc/builder.py Outdated Show resolved Hide resolved
This stops us from accidentally overriding a "STAT" value if there's
also "status" defined, for example
@AlexanderWells-diamond AlexanderWells-diamond merged commit dc4a63f into master Oct 14, 2022
@AlexanderWells-diamond AlexanderWells-diamond deleted the allow_alarm_values_on_init branch October 14, 2022 13:02
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.

Allow setting of alarm status and severity on record creation using PythonSoftIOC alarm values
2 participants