donkirkby / donkirkby/live-py-plugin
Add LiveFigureDiffer
- Dominant language
- Python
- Stars
- 302
- Forks
- 63
- Avg merge
- 6h 50m
- Merged PRs (30d)
- 2
Description
We have `LiveImageDiffer` for comparing images and `LiveFigure` for displaying Matplotlib figures in live coding mode. Derive `LiveFigureDiffer` as a subclass, and override `create_painters()` to create two figures. Make sure it gracefully degrades when Matplotlib is not available.
Make `LiveImageDiffer` work with `LiveImage`, and convert them to `LivePainter` when needed. Add `create_figures()` method to `LiveFigureDiffer` to help with type checking.
Another option is to make `LiveImageDiffer` a [generic class] that can compare any subtype of `LiveImage`.
[generic class]: https://typing.python.org/en/latest/reference/generics.html
Contributor guide
Research direction
Start by reading the existing LiveImageDiffer and LiveFigure implementations, then trace how LivePainter objects are created and how missing Matplotlib is handled. Done means LiveFigureDiffer creates two figures, LiveImageDiffer accepts LiveImage values and converts them when needed, and the type-checking path covers create_figures() without requiring Matplotlib.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- matplotlib, python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100