Open nima opened 3 years ago
Fields can now be defined in fields.py
. The only other place that they must be referenced now, is in the views that wish to display them. This has only been tested on one randomly selected field (market cap), but enough to prove the point.
Existing fields need to be migrated to the new pattern. Will keep this open as a reminder for that work.
Right now, to add a new column, code has to be updated in too many different areas.
In the API multiplexor module:
Twice in
main
, one where it's added to a "view", and another for pre-display formatting:Twice in in the
slurp
module, where it's both defined and typecast.Finally in the
Stock
classThis task is to see if the process can be made a little more lightweight and intuitive.