Repository navigation
feat(proteins): today's UniProt entry, stamped with its release, shown and never used on a cut - #1290
Merged
frapercan merged 1 commit intoNov 22, 2026
Conversation
…n and never used on a cut A protein page shows UniProt functional metadata from protein_uniprot_metadata, which nothing in dev had filled, and the operation that fills it (fetch_uniprot_metadata) can also backfill the protein row's organism and gene, which feature code reads. Filling them from today's entry would hand that code knowledge from after its cut. resolve_protein_metadata fetches each canonical protein's current entry through the protea-sources plugin's fetch_accessions, which now names the UniProt release that served each batch (protea-sources #42, pinned here). Every row is stamped with that release and its date, and an answer that names no release is refused. It writes protein_uniprot_metadata only, never the protein row; its population is a query (no row, or a row with no release), and accessions UniProt no longer serves are counted as absent. Migration 5d2e8c1b4a73 adds the release, its date and the entry's descriptive fields (entry name, reviewed, protein and gene names, organism and its identifier, length). The protein route returns them, and the page shows the entry under a card that names its release and says it is today's knowledge: shown, never used to predict or evaluate on an earlier cut. tests/test_current_metadata_stays_out_of_experiments.py pins the boundary: only the model, the two fetch operations and the protein route may name the table. A protein's organism at a cut comes from that cut's photo (cut_photo_member.taxon_id).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
resolve_protein_metadata(onprotea.jobs). It fetches each canonical protein's current UniProt entry through the plugin'sfetch_accessions, in batches of a thousand.protein_uniprot_metadataonly, never theproteinrow.absent.5d2e8c1b4a73addsuniprot_release,uniprot_release_dateand the entry's descriptive fields: entry name, reviewed, protein and gene names, organism and its identifier, length.protea-sourcesis pinned at696533ba(feat(services): F2D embeddings predict-request validation #42,fetch_accessionswith the release).Why
The knowledge in a UniProt entry changes from one release to the next, so what an entry says today was not known at an earlier cut. The platform wants today's entries to show proteins and annotate them today, without any of it reaching a model, a feature, an export or an evaluation on a cut.
fetch_uniprot_metadatacan also backfill theproteinrow's organism and gene, which feature code reads. The new operation never touches that row. A protein's organism at a cut comes from that cut's photo (cut_photo_member.taxon_id).Tests
tests/test_resolve_protein_metadata.py:tests/test_current_metadata_stays_out_of_experiments.py: only the model, the two fetch operations and the protein route may name the table.apps/web/tests/theCurrentEntrySaysItsRelease.test.tsx: the card names the release, or says it is not recorded.tsc;