Skip to content

Standardise config client and fix tests dependent on order they are ran - #2099

Merged
DominicOram merged 56 commits into
mainfrom
standardise_config_server_in_tests
Jul 29, 2026
Merged

Standardise config client and fix tests dependent on order they are ran#2099
DominicOram merged 56 commits into
mainfrom
standardise_config_server_in_tests

Conversation

@oliwenmandiamond

@oliwenmandiamond oliwenmandiamond commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Fixes #2098 and Fixes #2131

Instructions to reviewer on how to test:

  1. Run a few dodal/tests/common/beamlines/test_device_instantiation.py::test_device_creation[iXX] in main branch and this branch. Confirm they now pass and doesn't depend on order.
  2. Confirm tests pass
  3. Confirm added documentation makes sense

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}

@oliwenmandiamond oliwenmandiamond changed the title Standardise config server in tests Standardise config client in tests Jun 22, 2026
@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.16%. Comparing base (fa1d92a) to head (43636fa).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2099   +/-   ##
=======================================
  Coverage   99.16%   99.16%           
=======================================
  Files         354      354           
  Lines       13831    13842   +11     
=======================================
+ Hits        13715    13726   +11     
  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.

@jacob720 jacob720 left a comment

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.

Have discussed a bit with @DominicOram and I don't think we should care about converters in the mock client as conversion is a server-side process. In dodal we should assume we are receiving converted data from the server, and test data should conform to the post-conversion format.

The exception is where the force-parser option is used, which would force conversion to take place client side, but this is already handled by the existing fixture and should only be a temporary measure wherever it's used.

@rtuck99 rtuck99 mentioned this pull request Jul 21, 2026
4 tasks

@Villtord Villtord left a comment

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.

Sorry I've got a few questions while I was reading it through.

Comment thread src/dodal/beamlines/i09_1_shared.py Outdated
Comment thread docs/how-to/write-tests.md Outdated
Comment thread docs/how-to/write-tests.md
Comment thread tests/conftest.py Outdated

@DominicOram DominicOram left a comment

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.

Great, thank you!

@DominicOram
DominicOram enabled auto-merge (squash) July 29, 2026 08:57
@DominicOram
DominicOram merged commit 3b77d81 into main Jul 29, 2026
19 of 20 checks passed
@DominicOram
DominicOram deleted the standardise_config_server_in_tests branch July 29, 2026 09:11
@coretl coretl mentioned this pull request Jul 29, 2026
4 tasks
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.

i15-1 SafeOrBeamPositioner and Blower devices have no name attribute Test fails depending on the order they are run

5 participants