numaproj / numaflow-python

Numaflow Python SDK
Apache License 2.0
52 stars 18 forks source link

feat: class based refactor for SDK #129

Closed kohlisid closed 8 months ago

kohlisid commented 9 months ago

Fixes #106 1) Refactor the SDKs to accept both classes and function as handlers 2) Seperated common server utilities 3) Abstracted server start call to have common function for all server types, do not need to use aiorun seperately for async functions. Makes it easier to switch between them for the UDF owner. 4) Different server classes for each UDF 5) Enable UV loop for async execution

codecov[bot] commented 9 months ago

Codecov Report

Attention: 37 lines in your changes are missing coverage. Please review.

Comparison is base (a6957c2) 95.21% compared to head (59d6550) 95.15%.

Files Patch % Lines
pynumaflow/sourcer/_dtypes.py 70.58% 5 Missing :warning:
pynumaflow/reducer/async_server.py 88.00% 2 Missing and 1 partial :warning:
pynumaflow/_constants.py 88.23% 1 Missing and 1 partial :warning:
pynumaflow/mapper/sync_server.py 87.50% 2 Missing :warning:
pynumaflow/mapstreamer/_dtypes.py 80.00% 2 Missing :warning:
pynumaflow/mapstreamer/servicer/async_servicer.py 90.90% 0 Missing and 2 partials :warning:
pynumaflow/sideinput/server.py 84.61% 2 Missing :warning:
pynumaflow/sourcer/server.py 81.81% 2 Missing :warning:
pynumaflow/sourcer/servicer/async_servicer.py 96.96% 0 Missing and 2 partials :warning:
pynumaflow/mapper/_dtypes.py 91.66% 1 Missing :warning:
... and 14 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #129 +/- ## ========================================== - Coverage 95.21% 95.15% -0.07% ========================================== Files 33 45 +12 Lines 1359 1424 +65 Branches 89 81 -8 ========================================== + Hits 1294 1355 +61 - Misses 36 50 +14 + Partials 29 19 -10 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.