stefan-jansen / zipline-reloaded

Zipline, a Pythonic Algorithmic Trading Library
https://zipline.ml4trading.io
Apache License 2.0
1.03k stars 199 forks source link

BcolzMinuteBarWriter and BcolzDailyBarWriter have undocumented differences in semantics of write method #225

Open phelps-sg opened 9 months ago

phelps-sg commented 9 months ago

The write() methods of BcolzDailyBarWriter and BcolzMinuteBarWriter have identical signatures but very different semantics. Specifically BcolzMinuteBarWriter.write() appends to the table, whereas BcolzDailyBarWriter.write() overwrites the table. This is currently undocumented.

Ideally the code would be refactored so that each class implements an abstract method in a common abstract base-class and the append/rewrite behavior is consistent across both, but obviously there might be backward-compatibility issues.

Failing that, it would be good to document whether the behavior appends or rewrites the table in the docstring for each method.