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

i13-1 merlin test initial commit #965

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

i13-1 merlin test initial commit #965

wants to merge 16 commits into from

Conversation

huw-dls
Copy link
Contributor

@huw-dls huw-dls commented Dec 18, 2024

Feature (not fix)

Instructions to reviewer on how to test:

merlin_controller will be finished after testing on i13-1.
The merlin device will then be moved from i13-1 to the top-level devices directory under merlin/.

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}

@huw-dls huw-dls self-assigned this Dec 18, 2024
@huw-dls huw-dls requested a review from a team as a code owner December 18, 2024 11:44
Copy link
Contributor

@callumforrester callumforrester left a comment

Choose a reason for hiding this comment

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

@huw-dls this looks good! I think it will work, I ran the system tests (dodal connect i13-1) and the detector found the PVs okay. That command uses the same code as blueapi to pick up devices so that should also work.

The problem is that this code is not loaded into your beamline module at /dls_sw/i13-1/epics/scratch/dodal/src/dodal/beamlines/i13_1.py, I would suggest we get this merged and then just checkout the main branch in that location, so you have an up-to-date dodal and Merlin to play with. See the issues I've raised they are very minor.

Additional nit: Please remove the commented-out extra lines before merging.

src/dodal/beamlines/i13_1.py Outdated Show resolved Hide resolved
src/dodal/devices/i13_1/merlin_controller.py Outdated Show resolved Hide resolved
src/dodal/devices/i13_1/merlin_controller.py Outdated Show resolved Hide resolved
@callumforrester
Copy link
Contributor

@huw-dls I think the rebase has gone wrong somewhere, the diff shouldn't have all of those extraneous changes in it, what I normally do:

git checkout main
git pull
git checkout <my branch>
git rebase main

Then work through the conflicts until it is happy

@callumforrester
Copy link
Contributor

@huw-dls Happy to approve once CI passes

@callumforrester
Copy link
Contributor

Feature (not fix)

@huw-dls quick note: I know it says "fixes" but that's just a Github shorthand for "please automatically close this issue/ticket when this is merged", we also use it for features. In general we try to write an issue for almost everything we do (can except quick patches and similar)

src/dodal/devices/i13_1/merlin.py Outdated Show resolved Hide resolved
src/dodal/devices/i13_1/merlin_controller.py Outdated Show resolved Hide resolved
src/dodal/devices/i13_1/merlin.py Outdated Show resolved Hide resolved
src/dodal/devices/i13_1/merlin_controller.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented Dec 20, 2024

Codecov Report

Attention: Patch coverage is 98.11321% with 1 line in your changes missing coverage. Please review.

Project coverage is 97.48%. Comparing base (bbd76c6) to head (daed185).

Files with missing lines Patch % Lines
src/dodal/devices/i13_1/merlin_controller.py 96.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #965   +/-   ##
=======================================
  Coverage   97.48%   97.48%           
=======================================
  Files         148      151    +3     
  Lines        6238     6290   +52     
=======================================
+ Hits         6081     6132   +51     
- Misses        157      158    +1     

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

@callumforrester
Copy link
Contributor

@huw-dls This is looking good and almost done. The new devices need tests to keep the coverage happy. This is an important way to prevent the buildup of dead code. Have a look at tests for similar devices, they are small so shouldn't be too hard to test.

@huw-dls huw-dls force-pushed the i13_1_merlin_test branch from a4d6d0b to f9c28e6 Compare January 9, 2025 16:41
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