Resolve "Rewrite AlleleFilter.filter_alleles/filter_analysis to take in filter config object rather than id"
requested to merge 2230-rewrite-allelefilter-filter_alleles-filter_analysis-to-take-in-filter-config-object-rather into dev
Description
In addition to the change highlighted in the issue, the following was done:
- Removed AlleleFilter.filter_alleles as this was unused leftover from when we did filtering on the overview page.
- Added
FilterBase
base-class for all filters, to distinguish between filters needing only alleles, genepanel + alleles, or analysis + alleles, and to separate filters where the context of an allele is important. - All filters now have a filter function (either
filter_with_alleles
,filter_with_genepanel
, orfilter_with_analysis
) which only works on a single analysis/genepanel/set of alleles. The ability to work on multiple analyses (or genepanels) simultaneously was also an unused leftover feature from when we did filtering on the overview page. - Minor typing cleanup.
Notes to review (code/docs/QA)
None of the actual filter functionality has changed. Most of the changes are basic indentation changes due to the fact that we no longer loop over analysis_id
s or gp_key
s inside the function.
No tests have been removed or fundamentally changed.
Possibly useful to go through changes up to a3210dae, and after this separately.
Related issues
Closes #2230 (closed)
Edited by Øyvind Evju