Skip to content

Add API endpoints to transfer OTF directory and include OTF files in workflow message - #877

Merged
tieneupin merged 8 commits into
mainfrom
transfer-otf-files
Sep 4, 2026
Merged

Add API endpoints to transfer OTF directory and include OTF files in workflow message#877
tieneupin merged 8 commits into
mainfrom
transfer-otf-files

Conversation

@tieneupin

@tieneupin tieneupin commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Follow-up PR to #876. We now set up API endpoints on the instrument and backend servers to facilitate the transfer of a chosen OTF directory from the source to the destination, and to include the OTF files discovered in the processing request to cryoem-services.

The backend server will verify that the desired destination visit exists, construct the path fragment needed for the instrument server to construct the rsync command, and send along all relevant information to the instrument server.

On the instrument server end, it will construct the rsync command needed to transfer the chosen directory to the destination location, run the rsync command in a subprocess, then return a message with the expected path to the OTF directory on the server side.

The backend server, upon receiving a success message, will forward along the expected OTF directory path to the website that requested it.

With the OTF directories now registered in the database, the cryo-SIM reconstruction API endpoint has also been updated to use the registered OTF directory to look for OTF files, and include them in the processing request to cryoem-service.

Actual diff is +212/-0, with the rest of the diff being due to the addition of new tests.

NOTE: This PR is tied to DiamondLightSource/murfey-frontend#81, and will have to be deployed alongside the version that contains it.

@codecov

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.00000% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.83%. Comparing base (6466bcd) to head (2070399).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #877      +/-   ##
==========================================
+ Coverage   54.72%   54.83%   +0.10%     
==========================================
  Files         101      101              
  Lines       11337    11417      +80     
  Branches     1507     1520      +13     
==========================================
+ Hits         6204     6260      +56     
- Misses       4806     4821      +15     
- Partials      327      336       +9     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tieneupin
tieneupin marked this pull request as ready for review September 3, 2026 09:00
@tieneupin
tieneupin requested a review from d-j-hatton September 3, 2026 09:00
@tieneupin tieneupin self-assigned this Sep 3, 2026
@tieneupin tieneupin added enhancement New feature or request server Relates to the server component client Relates to the client component cryo-sim Part of the cryo-SIM pipeline extension labels Sep 3, 2026
Comment thread src/murfey/server/api/instrument.py Outdated
@tieneupin
tieneupin merged commit 9c3c2a6 into main Sep 4, 2026
14 checks passed
@tieneupin
tieneupin deleted the transfer-otf-files branch September 4, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client Relates to the client component cryo-sim Part of the cryo-SIM pipeline extension enhancement New feature or request server Relates to the server component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants