Consider revising the Combiner machinery into a class heirarchy
- Dominant language
- Python
- Stars
- 93
- Forks
- 92
- Avg merge
- 14h 44m
- Merged PRs (30d)
- 30
Description
I was trying to use `Combiner` recently, and I found it a bit awkward to use because a single combiner class has all the methods. So I want to through out an idea for a new way to lay out the combiner:
* Have a `CombinerBase` or something like that which implements most of the bookeeping - pretty much everything except the `*_combine` methods. Include a ``combine_images`` abstract method.
* Have separate `MedianCombiner`, `SumCombiner`, and `AverageCombiner` classes that basically just implement `combine_images`, *using parameters from the init function*, not method keywords.
* Leave the existing `Combiner`, but it basically is just a compatibility class that wraps the above (might be deprecated in the future, but could also be left in with just a pointer that the class heirarchy is the "new" way).
My reasoning behind all of this is that it makes it *much* easier to use these classes in a pipeline, because in this scheme, you can create a `*Combiner` and then just call `combine_images`, and a downstream user can swap in various combiner types without modifying their pipeline. It also makes implementing more complex uncertainty propogation schemes a la #569 much easier
Contributor guide
Research direction
Start by locating the existing Combiner class and its *_combine methods, then review how its initialization and pipeline use currently work. The issue's proposed design is complete when separate median, sum, and average combiners share bookkeeping through a base class while the existing Combiner remains compatible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100