Skip to content

Register FIB data in ISPyB#805

Open
tieneupin wants to merge 15 commits into
mainfrom
register-fib-ispyb-data
Open

Register FIB data in ISPyB#805
tieneupin wants to merge 15 commits into
mainfrom
register-fib-ispyb-data

Conversation

@tieneupin
Copy link
Copy Markdown
Contributor

@tieneupin tieneupin commented May 20, 2026

Extends the existing FIB data registration workflow to insert a DataCollectionGroup and Atlas into ISPyB for each unique sample detected.

Currently inserts the path to the real image, as thumbnail generation logic hasn't been implemented yet.

@tieneupin tieneupin force-pushed the register-fib-ispyb-data branch 2 times, most recently from 7c7f895 to c747bfb Compare May 21, 2026 09:48
Comment thread tests/workflows/fib/test_register_atlas.py Fixed
@tieneupin tieneupin force-pushed the register-fib-ispyb-data branch from c747bfb to 67bf24f Compare May 21, 2026 10:01
tieneupin added 2 commits May 21, 2026 11:35
…t the end of the function, and both new and old entries are populated or updated correctly
@tieneupin tieneupin force-pushed the register-fib-ispyb-data branch from 67bf24f to 409f9a4 Compare May 21, 2026 10:39
@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

❌ Patch coverage is 76.08696% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.30%. Comparing base (62f45b7) to head (c778394).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #805      +/-   ##
==========================================
+ Coverage   52.20%   52.30%   +0.10%     
==========================================
  Files          96       97       +1     
  Lines       10379    10436      +57     
  Branches     1373     1380       +7     
==========================================
+ Hits         5418     5459      +41     
- Misses       4677     4689      +12     
- Partials      284      288       +4     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tieneupin tieneupin force-pushed the register-fib-ispyb-data branch from 949aa3c to df5c51a Compare May 21, 2026 16:55
@tieneupin tieneupin force-pushed the register-fib-ispyb-data branch from df5c51a to 06d9cac Compare May 21, 2026 17:00
@tieneupin tieneupin marked this pull request as ready for review May 21, 2026 17:04
@tieneupin tieneupin self-assigned this May 21, 2026
@tieneupin tieneupin added enhancement New feature or request server Relates to the server component fib Part of the FIB pipeline extension labels May 21, 2026
)

# Mock the metadata returned from the image file
import murfey.workflows.fib.register_atlas
Copy link
Copy Markdown
Contributor

@stephen-riggs stephen-riggs left a comment

Choose a reason for hiding this comment

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

This all looks like it will work, just a few queries about the structure

if entry_point_result := entry_points(
group="murfey.workflows", name="atlas_update"
):
(workflow,) = entry_point_result
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.

Does this (and the dcg one below) need to be done here rather than sending a message to the feedback queue?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As discussed, fully modularising this is too much effort for too little gain at the moment. However, I have rewritten this workflow so that it is triggered by the feedback_callback function instead, and can be safely acked or nacked.

)
visit_number = visit_name.split("-")[-1]

# Register using thumbnail values if they are provided
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.

What circumstance do you want thumbnail vs full image sizes? Could these ever get mixed up?

.where(MurfeyDB.DataCollectionGroup.tag == imaging_site.site_name)
).one()

imaging_site.dcg_id = dcg_entry.id
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.

Looks like you do need the dcg workflow run, this id is a bit challenging

murfey_db=murfey_db,
)
except Exception:
# Log error but allow workflow to proceed
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.

Do you want this to proceed? If you fail would it be better to dlq the message?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As discussed, we'll DLQ the message instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request fib Part of the FIB pipeline extension server Relates to the server component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants