Skip to content

Improve robustness of cohorts() metadata access#1052

Open
adilraza99 wants to merge 7 commits intomalariagen:masterfrom
adilraza99:GH435-cohorts-robustness
Open

Improve robustness of cohorts() metadata access#1052
adilraza99 wants to merge 7 commits intomalariagen:masterfrom
adilraza99:GH435-cohorts-robustness

Conversation

@adilraza99
Copy link
Contributor

@adilraza99 adilraza99 commented Mar 5, 2026

Summary

Improve the robustness of the existing cohorts() method in AnophelesSampleMetadata.

Changes

  • add validation for accepted cohort_set values
  • add caching to avoid repeated CSV reads
  • support optional query parameter for filtering results
  • improve error messages for invalid inputs or missing files
  • expand test coverage for cohort metadata access

Impact

No changes to the public API.
The update strengthens the reliability and performance of cohorts() while maintaining backward compatibility.

Part of #435

@adilraza99 adilraza99 force-pushed the GH435-cohorts-robustness branch from 0299fdf to 30d13d6 Compare March 5, 2026 19:28
@adilraza99 adilraza99 force-pushed the GH435-cohorts-robustness branch from 30d13d6 to 45a8eac Compare March 5, 2026 23:22
@adilraza99
Copy link
Contributor Author

adilraza99 commented Mar 6, 2026

Hi @jonbrenas,
Could you please take a look when you have a moment?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant