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
16 stars 6 forks source link

Refactor downsample as generator #81

Closed cboulay closed 10 months ago

cboulay commented 10 months ago

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

cboulay commented 10 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.