ezmsg-org / ezmsg

Pure-Python DAG-based high-performance SHM-backed pub-sub and multi-processing pattern
https://ezmsg.readthedocs.io/en/latest/
MIT License
9 stars 5 forks source link

Refactor downsample as generator #81

Closed cboulay closed 5 months ago

cboulay commented 6 months ago

I didn't add any new tests but all the old tests pass.

cboulay commented 6 months ago

This Unit is simple enough that it would be a good candidate for gen_to_unit. However, since the Downsample Unit alread existed, using gen_to_unit would have been a slight regression because there would be no static type-checking available for Downsample and DownsampleSettings. That 'feature' is probably not worth the extra boilerplate code for new Units but I'll leave it in for old Units.