feat(prepro): refactor prepro to split up backend internal metadata from customizable metadata fields#6071
feat(prepro): refactor prepro to split up backend internal metadata from customizable metadata fields#6071anna-parker wants to merge 13 commits intomainfrom
Conversation
…rom otehr metadata fields to make code cleaner and clearer
|
This PR may be related to: #2283 (Make Loculus internal metadata available to common preprocessing functions) — the refactoring of backend internal metadata fields in prepro may address or contribute to that issue. |
|
Claude finished @anna-parker's task in 3m 28s —— View job Code Review
Good refactoring overall. Moving backend internal metadata into a dedicated A few issues found (see inline comments for details):
|
preprocessing/nextclade/src/loculus_preprocessing/processing_functions.py
Outdated
Show resolved
Hide resolved
preprocessing/nextclade/src/loculus_preprocessing/processing_functions.py
Outdated
Show resolved
Hide resolved
preprocessing/nextclade/src/loculus_preprocessing/processing_functions.py
Outdated
Show resolved
Hide resolved
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
When reviewing #6066 I realized the prepro doesn't properly distinguish between customizable metadata (received in a dictionary) and other internal metadata fields such as submissionId, submitter, and groupId. We inconsistently added these fields to the inputMetadata or the function args. I decided to make this distinction more clear in the code.
Input from the
extract-unprocessed-dataendpoint:We now use pydantic to validate the response and convert to a type
BackendEntryand then restructure for easier use in the code as:I also improved the typing of the processing function args.
Screenshot
PR Checklist
🚀 Preview: Add
previewlabel to enable