forked from shiftsayan/plane
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.py
44 lines (35 loc) · 895 Bytes
/
schema.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
from collections import namedtuple, OrderedDict
from functools import partial
from meetings import m_gbm, m_watercooler, m_tech, m_planning, m_design
from util import Day, get_next_datetime
DEFAULT_DELIVERY_HOUR = 10 # AM
f = partial(get_next_datetime, hour=DEFAULT_DELIVERY_HOUR)
PlaneSchema = namedtuple('PlaneSchema', 'id template subject delivery_day meetings') # TODO: Rename deliver_day
weekly = PlaneSchema(
'weekly',
'weekly',
"ScottyLabs Meetings This Week",
f(Day.MONDAY),
{
'gbm': m_gbm,
'tech': m_tech,
'design': m_design,
},
)
longform = PlaneSchema(
'longform',
'longform',
None,
f(Day.TODAY),
None,
)
gbm_reminder = PlaneSchema(
'gbm-reminder',
'reminder',
"ScottyLabs GBM Reminder",
f(Day.THURSDAY),
{
'reminder': m_gbm,
},
)
schema = [ weekly, longform, gbm_reminder]