Skip to content

Implement concrete analyser classes for beamlines to remove generics#1821

Open
oliwenmandiamond wants to merge 37 commits intoanalyser_works_with_blueapifrom
Implement_concrete_analyser_classes_for_beamlines
Open

Implement concrete analyser classes for beamlines to remove generics#1821
oliwenmandiamond wants to merge 37 commits intoanalyser_works_with_blueapifrom
Implement_concrete_analyser_classes_for_beamlines

Conversation

@oliwenmandiamond
Copy link
Contributor

@oliwenmandiamond oliwenmandiamond commented Jan 16, 2026

Remove the generics from the analysers by implementing analyser models for each analyser type. This will also allow for beamline specific behaviour to be later implemented on an analyser.

Instructions to reviewer on how to test:

  1. Do thing x
  2. Confirm thing y happens

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}

@codecov
Copy link

codecov bot commented Jan 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.05%. Comparing base (9c2887e) to head (92aab6b).

Additional details and impacted files
@@                     Coverage Diff                      @@
##           analyser_works_with_blueapi    #1821   +/-   ##
============================================================
  Coverage                        99.05%   99.05%           
============================================================
  Files                              312      315    +3     
  Lines                            11730    11784   +54     
============================================================
+ Hits                             11619    11673   +54     
  Misses                             111      111           

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

@oliwenmandiamond oliwenmandiamond marked this pull request as ready for review January 19, 2026 11:58
@oliwenmandiamond oliwenmandiamond requested a review from a team as a code owner January 19, 2026 11:58
Copy link
Contributor

@Villtord Villtord left a comment

Choose a reason for hiding this comment

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

Nice! Surprisingly it is less code that I expected for moving away from more generics classes.

Copy link
Contributor

@Villtord Villtord left a comment

Choose a reason for hiding this comment

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

Thanks, I have just a couple of comments - mainly about class names. Since you refactored analyser classes to be beamline specific, would it make sense to add beamline name in it now? As anyway it is unlikely any other beamline can reuse it due to beamline - specific enums hardcoded in a class.
Also if you decide to rename it I would suggest to use epics names in beamlines - e.g. B07C instead of B071 and so on.

@oliwenmandiamond oliwenmandiamond changed the base branch from main to analyser_works_with_blueapi February 17, 2026 14:15
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.

5 participants

Comments