rail passenger compensation: add feature
rail passenger compensation: add feature: a task in smol-software-harbor (Harbor dataset). Add journey compensation(legs) to rail/compensation.py for through tickets: legs is a list of (price cents, scheduled arrival, actual arrival) in travel order (datetimes). The compensation is computed with…
The task
Add `journey_compensation(legs)` to `rail/compensation.py` for through tickets: `legs` is a list of `(price_cents, scheduled_arrival, actual_arrival)` in travel order (datetimes). The compensation is computed with `compensation_cents` on the total price of all legs, using only the delay at the final destination in…
Part of efederici/smol-software-harbor.