From 8a06e9cb1bddb201f243f080a79abf4a1f69c8e6 Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Tue, 3 Mar 2020 15:37:42 -0800 Subject: [PATCH] limit ourselves to ints for W.. don't need sub-nanowatt precision.. --- fakedata.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fakedata.py b/fakedata.py index e344be5..7cf9bb3 100644 --- a/fakedata.py +++ b/fakedata.py @@ -156,4 +156,9 @@ for i in arrow.Arrow.range('day', startdate, enddate): #print(json.dumps(tuple(dist), indent=2)) prodpoints.extend(dist) +for i in { 'prodpoints', 'prodindex', 'conspoints', 'consindex',}: + v = locals()[i] + v = [ (x, int(y)) for x, y in v ] + locals()[i] = v + print('fakedata =', json.dumps(dict(production=prodpoints, prodindex=prodindex, consumption=conspoints, consindex=consindex), default=serializearrowasmili, indent=2))