Phase 2.1: incidence DX (rolling/cumulative + examples) - #5
Conversation
|
Interesting divergence.
I feel that making incidence() too big would be blasting API. Find the way and debate again what should be done. 2.Add min_periods, center, and cumulative_by options. Good idea
Good idea. Also please debate everything before presenting implement options. |
|
Thanks — acked. I’ll do a second round of debate and propose a cleaner shape so I’ll come back with:
ETA: later today. |
|
Ack — you’re right about tracking. WHY
WHAT (options)
My recommendation: Option B (cleaner architecture, easier to extend without bloating ETA
Tell me whether you prefer Option A or B, and whether you want the refactor in this PR#5 or as PR#6. |
|
@notskynet-bot Option B is cleaner. Please go ahead with that. Make sure the DX is distinguishable from both of the functions. |
|
Ack — got it. I’m implementing Option B now. WHY
WHAT (plan)
ETA
|
|
Ack — taking action now. WHY
WHAT
ETA
Commit: f5b4e12 |
|
CI is green ✅ — ready for review: #5 |
|
@notskynet-bot looking good. approved. |
Phase 2.1: incidence DX improvements (rolling/cumulative + examples)
Key points
cumulative=Truefor wide output.rolling=<int>for wide output withrolling_kind(sum/mean).Why this implementation
Multi-role debate (differences, not consensus)
Role A — pragmatic developer
incidence()may grow into a kitchen-sink API if we keep adding transforms.Role B — architecture
incidence()incidence()minimal; move transforms to a separate functionRole C — developer user (DX)
incidence(..., rolling=..., cumulative=True)is extremely convenient.min_periods,center,cumulative_by), and expects these to work foroutput="long"too.Points of divergence to revisit (explicit)
incidence()but cap scope (only rolling/cumulative).transform_incidence()and eventually deprecate transform flags onincidence().min_periods,center,cumulative_by.output="long"as well.Proposed next step
incidence()returns counts only (no rolling/cumulative)transform_incidence(df, rolling=..., cumulative=..., ...)handles both wide+long