Skip to content

fix: add 'r' and 'w' entries for AttrRWs#347

Open
shihab-dls wants to merge 2 commits intomainfrom
amend_pvi_structure
Open

fix: add 'r' and 'w' entries for AttrRWs#347
shihab-dls wants to merge 2 commits intomainfrom
amend_pvi_structure

Conversation

@shihab-dls
Copy link
Copy Markdown
Contributor

@shihab-dls shihab-dls commented Apr 15, 2026

closes #346

Amends PVI structure, such that we get:

structure a
  string r P4P_TEST_DEVICE:A_RBV
  string w P4P_TEST_DEVICE:A

Summary by CodeRabbit

  • Enhancements
    • Improved attribute access handling in EPICS PVA transport: read-write attributes now expose as separate read and write fields instead of combined entries. Readback operations explicitly use _RBV suffix PVs for clarity.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.22%. Comparing base (81f8fad) to head (454fb46).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #347      +/-   ##
==========================================
+ Coverage   91.21%   91.22%   +0.01%     
==========================================
  Files          70       70              
  Lines        2594     2599       +5     
==========================================
+ Hits         2366     2371       +5     
  Misses        228      228              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6651aed6-35ba-4d2a-9462-75c337f2b298

📥 Commits

Reviewing files that changed from the base of the PR and between 81f8fad and 454fb46.

📒 Files selected for processing (2)
  • src/fastcs/transports/epics/pva/pvi.py
  • tests/transports/epics/pva/test_p4p.py

📝 Walkthrough

Walkthrough

The changes modify how read-write attributes are represented in the PVI structure. Instead of mapping a single "rw" field to a PV, the code now generates separate "r" and "w" fields pointing to the readback (_RBV) and write PVs respectively. Test expectations are updated to reflect this new structure.

Changes

Cohort / File(s) Summary
PVI Structure Generation
src/fastcs/transports/epics/pva/pvi.py
Modified _make_p4p_raw_value to split read-write attributes into separate read ("r") and write ("w") fields, with read fields pointing to _RBV suffixed PVs.
Test Schema Expectations
tests/transports/epics/pva/test_p4p.py
Updated multiple test assertions to expect separate read/write field entries instead of combined "rw" entries across parent, child, and controller attribute tests.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 RBV fields now split with care,
Read and write both standing there,
No more tangled paths to trace,
Each PV finds its proper place! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding separate 'r' and 'w' entries for AttrRW attributes in the PVI structure to address the readback (RBV) issue.
Linked Issues check ✅ Passed The pull request fully implements the acceptance criteria from issue #346 by modifying the code to generate separate read ('r') and write ('w') entries for AttrRW attributes, with the 'r' entry pointing to the _RBV PV.
Out of Scope Changes check ✅ Passed All changes are directly related to implementing the PVI structure fix for AttrRW attributes as specified in issue #346; no unrelated or out-of-scope modifications are present.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch amend_pvi_structure

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@shihab-dls shihab-dls requested a review from coretl April 15, 2026 16:29
Comment on lines +40 to +41
"r": f"{pv_prefix}:Table_RBV",
"w": f"{pv_prefix}:Table",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm, this means we would have both a read and write table. We should discuss this...

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.

PVI structure does not include RBV

2 participants