Skip to content

Improve robustness of cohorts() metadata access#1052

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

Improve robustness of cohorts() metadata access#1052
adilraza99 wants to merge 10 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?

@adilraza99
Copy link
Contributor Author

@jonbrenas

@codecov
Copy link

codecov bot commented Mar 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.28%. Comparing base (ab59c87) to head (83408f5).
⚠️ Report is 50 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1052      +/-   ##
==========================================
+ Coverage   90.25%   90.28%   +0.03%     
==========================================
  Files          51       51              
  Lines        5631     5671      +40     
==========================================
+ Hits         5082     5120      +38     
- Misses        549      551       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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