Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement dodal connect ALL to test connection to all beamlines #877

Closed
wants to merge 2 commits into from

Conversation

rtuck99
Copy link
Contributor

@rtuck99 rtuck99 commented Oct 31, 2024

Fixes #875

Running dodal connect ALL will result in the special ALL beamline name being expanded into the list of all known beamlines. dodal connect will then attempt to connect to the beamlines in order and print out the connect results for each.

By default, training (in the training_rig module) and sim (starting with s) beamlines are skipped but can be included with the --include-training and --include-sim options respectively.

Instructions to reviewer on how to test:

  1. dodal connect works as advertised
  2. Unit tests pass

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}

Copy link

codecov bot commented Oct 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.54%. Comparing base (c217c07) to head (adabc84).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #877      +/-   ##
==========================================
+ Coverage   95.53%   95.54%   +0.01%     
==========================================
  Files         124      124              
  Lines        5304     5322      +18     
==========================================
+ Hits         5067     5085      +18     
  Misses        237      237              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@callumforrester
Copy link
Contributor

I'm a bit concerned that I would find this confusing as a user, since a lot of our beamline modules depend on the ${BEAMLINE} variable anyway. Some example cases I can see that are not obvious:

  • Following migrate p38 to i22 #862 it is not clear to me if this will connect to I22 and/or P38
  • If I include the training rigs I would expect it to try and connect to all of them but it will just use the default (p47)
  • As an outside user I may not understand why P46 is a training rig but P45 isn't

I'm leaning away from --all option at this time, I would prefer a script (or even 30 parallel CI jobs) for running the connection tests per-beamline.

@DominicOram
Copy link
Contributor

I don't think I feel particularly strongly about having this functionality in the CLI or having it at all. I was originally trying to use it to test new connection logic in dodal and misread the CLI to think that it was there when actually it wasn't. I then probably pushed to get it in out of frustration. In hindsight I'm happy to drop this if @callumforrester thinks it's not worth doing at this time

@callumforrester
Copy link
Contributor

If we fix #569 I could see this being a useful feature. Or alternative some tagging system e.g. dodal connect --tag mx, where we tagged all MX beamline modules somehow. But I think we need sort out the role of ${BEAMLINE} first.

@DominicOram
Copy link
Contributor

Wont do for now

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.

Dodal connect --all is broken
3 participants