Skip to content

Remove device_factory and supporting methods#2044

Open
tpoliaw wants to merge 4 commits intomainfrom
device-factory-removal
Open

Remove device_factory and supporting methods#2044
tpoliaw wants to merge 4 commits intomainfrom
device-factory-removal

Conversation

@tpoliaw
Copy link
Copy Markdown
Contributor

@tpoliaw tpoliaw commented May 1, 2026

Requires matching changes to avoid breakage:

All beamlines are now using a device manager to mark the device factories so the previous decorator and supporting code is no longer required.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.27%. Comparing base (0beeb31) to head (d2cf369).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2044      +/-   ##
==========================================
+ Coverage   99.11%   99.27%   +0.15%     
==========================================
  Files         327      327              
  Lines       12814    12595     -219     
==========================================
- Hits        12701    12504     -197     
+ Misses        113       91      -22     

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

@tpoliaw tpoliaw force-pushed the device-factory-removal branch from 1d4a8d7 to f4cc423 Compare May 1, 2026 13:31
@tpoliaw tpoliaw marked this pull request as ready for review May 5, 2026 09:57
@tpoliaw tpoliaw requested a review from a team as a code owner May 5, 2026 09:57
Copy link
Copy Markdown
Contributor

@DominicOram DominicOram left a comment

Choose a reason for hiding this comment

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

clear_devices is used by mx-bluesky so this will require some changes there too. I'm not sure how significant they will be @DiamondLightSource/developers-mx-daq?

return decorator


def set_path_provider(provider: PathProvider):
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.

Should: Do we still need this? And the get/clear? It was my understanding that BlueAPI now handles the path provider a different way?

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.

Hyperion is still using it because it sets its own path provider

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.

That's annoying. Can we have BlueAPI inject the path provider into the composite so that we can avoid having the globals around?

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.

3 participants