Summary
The name TimeSeries is kind of annoying to type, and often doesn't seem to capture exactly what the intent is when writing the code. The core mental model of this library is "a history of a value over time" — and the class name should reflect that.
History immediately communicates what the object represents:
alice.level = History(default="unknown")
alice.level[date(2015, 3, 1)] = "junior"
alice.level[date(2017, 6, 15)] = "senior"
alice.level[date(2018, 9, 1)] # "senior"
Proposal
- Add
History as an alias for TimeSeries in traces/__init__.py
- Make
History the primary name in documentation and examples going forward
- Keep
TimeSeries as a working alias indefinitely (possibly deprecate in a future major version)
traces itself is also kind of "meh", but probably the class name matters more than the library name — it's what appears in every line of user code and it's what teaches the mental model.
Summary
The name
TimeSeriesis kind of annoying to type, and often doesn't seem to capture exactly what the intent is when writing the code. The core mental model of this library is "a history of a value over time" — and the class name should reflect that.Historyimmediately communicates what the object represents:Proposal
Historyas an alias forTimeSeriesintraces/__init__.pyHistorythe primary name in documentation and examples going forwardTimeSeriesas a working alias indefinitely (possibly deprecate in a future major version)tracesitself is also kind of "meh", but probably the class name matters more than the library name — it's what appears in every line of user code and it's what teaches the mental model.