Skip to content

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

Open
shihab-dls wants to merge 3 commits into
mainfrom
amend_pvi_structure
Open

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

Conversation

@shihab-dls

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

Copy link
Copy Markdown
Contributor

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 separate read and write fields.
    • Readback operations explicitly use _RBV suffix PVs for clearer value reporting.

@codecov

codecov Bot commented Apr 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.42%. Comparing base (a2e77b6) to head (4451d14).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #347      +/-   ##
==========================================
+ Coverage   91.41%   91.42%   +0.01%     
==========================================
  Files          72       72              
  Lines        2935     2940       +5     
==========================================
+ Hits         2683     2688       +5     
  Misses        252      252              

☔ View full report in Codecov by Harness.
📢 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

coderabbitai Bot commented Apr 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7f09f932-9442-459b-80cb-d75b88a2e464

📥 Commits

Reviewing files that changed from the base of the PR and between 454fb46 and 4451d14.

📒 Files selected for processing (2)
  • src/fastcs/transports/epics/pva/pvi.py
  • tests/transports/epics/pva/test_p4p.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • tests/transports/epics/pva/test_p4p.py
  • src/fastcs/transports/epics/pva/pvi.py

📝 Walkthrough

Walkthrough

The changes update PVI structures for read-write attributes. They now expose separate "r" readback fields using _RBV PVs and "w" write fields. Tests update expectations for parent, child, and controller attributes.

Changes

PVI read/write mapping

Layer / File(s) Summary
Split read-write attribute mappings
src/fastcs/transports/epics/pva/pvi.py
_make_p4p_raw_value maps "rw" attributes to separate "r" readback and "w" write entries. Other access modes retain direct mappings.
Update PVI schema expectations
tests/transports/epics/pva/test_p4p.py
Tests expect separate readback and write entries for parent, child, and controller attributes. The vector mapping formatting changes without changing its value.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 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 describes the main change: adding separate read and write entries for AttrRW attributes.
Linked Issues check ✅ Passed The implementation maps AttrRW reads to the _RBV PV and writes to the write PV, and tests verify separate r and w entries required by #346.
Out of Scope Changes check ✅ Passed The changes are limited to AttrRW PVI mapping and corresponding test expectations, with no unrelated code changes.
✨ Finishing Touches 💡 1
📝 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

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.

@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...

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.

Decided on a different tack:

  • FastCS always makes separate R and W PVs
  • We exposure them in the UI in the most compact way possible

This might mean some Phoebus level construct that merges the 2 PVs into one widget, or 2 buttons that launch the 2 widgets

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