Skip to content

class AttenuatorMotorPositions: cleanse obsolete naming - #2164

Open
CoePaul wants to merge 1 commit into
mainfrom
issue2163
Open

class AttenuatorMotorPositions: cleanse obsolete naming#2164
CoePaul wants to merge 1 commit into
mainfrom
issue2163

Conversation

@CoePaul

@CoePaul CoePaul commented Aug 5, 2026

Copy link
Copy Markdown
Contributor
  • Internal naming conventions within the Attenuator motor positions class had been left in prior state before recent rename ( where the rename relfected a widened scope from purely demanding motor moves to also capture live positions of motors )

    The resulting obsolescene meant names of methods and internal variables
    did not reflect the wider usage scope - that is hereby fixed

  • Also make internal merge of discrete indexed positions and continuous motor axis positions into a cached property saves the merge being recalculated - and makes its evaluation lazy

  • Update tests to reflect renaming

  • Improve tests with parametrized test cases

  • Fix quirk in axis naming convention which used to (inadvertently) permit leading integer in name/tag of wheel or axial motor

  • Tighten test cases to capture this and other oversights in original test suite

Fixes #2163

Instructions to reviewer on how to test:

  1. Confirm name updates make logical sense to any reader unfamiliar with what the code does
  2. Confirm You don't need to read the code in detail to understand the names - if that proves to be necessary, fail the CR
  3. Confirm linters etc are happy

Checks for reviewer

  • Would the PR title make sense to a scientist on a set of release notes
  • If a new device has been added does it follow the standards
  • If changing the API for a pre-existing device, ensure that any beamlines using this device have updated their Bluesky plans accordingly
  • Have the connection tests for the relevant beamline(s) been run via dodal connect ${BEAMLINE}

@CoePaul
CoePaul requested a review from a team as a code owner August 5, 2026 21:16
@CoePaul CoePaul self-assigned this Aug 5, 2026
@CoePaul CoePaul added python Pull requests that update Python code i19-1 Developer Experience i19-2 labels Aug 5, 2026
@CoePaul
CoePaul requested review from noemifrisina and rtuck99 August 5, 2026 21:17
@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.18%. Comparing base (b4b38f1) to head (c883930).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2164   +/-   ##
=======================================
  Coverage   99.18%   99.18%           
=======================================
  Files         360      360           
  Lines       14296    14300    +4     
=======================================
+ Hits        14180    14184    +4     
  Misses        116      116           

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

* Internal naming conventions within the Attenuator motor positions class
  had been left in prior state before recent rename
  ( where the rename relfected a widened scope from purely demanding motor moves
    to also capture live positions of motors )

   The resulting obsolescene meant names of methods and internal variables
   did not reflect the wider usage scope - that is hereby fixed

* Also make internal merge of discrete indexed positions
  and continuous motor axis positions into a cached property
  saves the merge being recalculated - and makes its evaluation lazy

* Update tests to reflect renaming

* Improve tests with parametrized test cases

* Fix quirk in axis naming convention which used to (inadvertently)
   permit leading integer in name/tag of wheel or axial motor

* Tighten test cases to capture this and other oversights in
   original test suite
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Developer Experience i19-1 i19-2 python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename method in AttenuatorMotorPositions

1 participant