feat: add results caching to cohort_diversity_stats#1014
Merged
jonbrenas merged 5 commits intomalariagen:masterfrom Mar 5, 2026
Merged
feat: add results caching to cohort_diversity_stats#1014jonbrenas merged 5 commits intomalariagen:masterfrom
jonbrenas merged 5 commits intomalariagen:masterfrom
Conversation
Contributor
Author
|
@tristanpwdennis hey tristan please check if everything is good , if you need me to make any changes , please let me or else please accept it. Thanks alot !!! |
Contributor
Author
|
@jonbrenas This one too , thanksss !! |
jonbrenas
requested changes
Mar 4, 2026
Collaborator
jonbrenas
left a comment
There was a problem hiding this comment.
Thanks @Sharon-codes. Can you run the tests on the simulated data as is done, for example, for the PCA?
Contributor
Author
|
Heyyy @jonbrenas ...... Addressed review feedback in a follow-up commit. Changes:
Validation run locally:
If everything is as per your liking , please close this PR , thankksss !!! |
jonbrenas
approved these changes
Mar 5, 2026
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.
Summary
Adds results-cache support to
cohort_diversity_stats()so repeated calls with identical inputs reuse cached output.Changes
malariagen_data/anopheles.py:cohort_diversity_stats.results_cache_get/set.tests/test_anopheles.py:Validation
poetry run pytest tests/test_anopheles.py -qpoetry run ruff check malariagen_data/anopheles.py tests/test_anopheles.pyCloses #798