Moved presence graph parameters to a single file

parent e8710b74
from .graph import PresenceGraph
from .presence import Presence
\ No newline at end of file
from datetime import timedelta, time
# Time of the start of the day
START_TIME = time(hour=8)
# Time of the end of the day
END_TIME = time(hour=21)
# Delta time between two sample
DELTA_SAMPLE = timedelta(minutes=15)
# Size of the window for the average
WINDOW_WIDTH = timedelta(weeks=8)
# Weights of the data of the weeks from the closer to the farther
# They must be at least as many as the number of the weeks in the window
DATA_WEIGHTS = [1000, 300, 200, 150, 100, 70, 30, 20]
......@@ -8,11 +8,7 @@ from bitsd.persistence.engine import session_scope
from bitsd.persistence.models import Status
from .graph import PresenceGraph
WINDOW_WIDTH = timedelta(weeks=8)
START_TIME = time(hour=8)
END_TIME = time(hour=21)
DELTA_SAMPLE = timedelta(minutes=15)
DATA_WEIGHTS = [100, 50, 30, 15, 10, 7, 3, 2]
from .parameters import WINDOW_WIDTH, START_TIME, END_TIME, DELTA_SAMPLE, DATA_WEIGHTS
class Presence():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment