Repository navigation
Fix Complex Portal search paging; correct the corrections() docs example - #60
Merged
Merged
Conversation
The Complex Portal search endpoint reports `size` as the number of elements in the page at hand and `totalNumberOfResults` as the grand total, and `first` counts records rather than pages. Reading `size` as the total ended the paging loop after the first page, so any organism with more than 100 complexes was silently truncated: S. cerevisiae (taxonomy 559292) returned 100 of its 634. Page by record offset, take the total from `totalNumberOfResults`, and warn rather than truncate silently if the page bound is ever reached. The test fixtures now use the real field semantics.
`annotate_from_model` returns names, ec_codes and sources, but `EvotuneResult.corrections()` fills sources from `result.groups` itself and has no such keyword, so the documented `result.corrections(leverage=leverage, **annotations)` raises TypeError. Spell the two keywords it does take, and say where the third one goes.
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.
The Complex Portal search endpoint reports
sizeas the number of elements in the page at hand andtotalNumberOfResultsas the grand total, andfirstcounts records rather than pages.get_complex_datareadsizeas the total, so the paging loop ended after the first page and any organism with more than 100 complexes was silently truncated. S. cerevisiae (taxonomy 559292) returned 100 of its 634 complexes.This pages by record offset, takes the total from
totalNumberOfResults, and logs a warning instead of truncating silently if the page bound is ever reached. The test fixtures now use the real field semantics, andtest_search_paginateschecks the record offset and the total.Also corrects the example in
docs/evotune_kcat_tuning.md:annotate_from_modelreturnsnames,ec_codesandsources, butEvotuneResult.corrections()takes onlynamesandec_codes(it fills the sources fromresult.groups), so the documented**annotationscall raisedTypeError.