Skip to content

Commit 17b928b

Browse files
committed
checkpoint: added room functional description, backfilled ietf92 meeting data, repaired session material views, added tests
- Legacy-Id: 9596
1 parent 303e886 commit 17b928b

11 files changed

Lines changed: 315 additions & 15 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# -*- coding: utf-8 -*-
2+
from __future__ import unicode_literals
3+
4+
from django.db import models, migrations
5+
6+
7+
class Migration(migrations.Migration):
8+
9+
dependencies = [
10+
('meeting', '0008_auto_20150429_1346'),
11+
]
12+
13+
operations = [
14+
migrations.AddField(
15+
model_name='room',
16+
name='functional_name',
17+
field=models.CharField(default='', max_length=255, blank=True),
18+
preserve_default=False,
19+
),
20+
]
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# -*- coding: utf-8 -*-
2+
from __future__ import unicode_literals
3+
4+
from django.db import migrations
5+
6+
7+
def add_91_room_functional_names(apps, schema_editor):
8+
9+
map = {
10+
'Hibiscus': 'Breakout 3',
11+
'South Pacific 2': 'Meeting Room #6',
12+
'South Pacific 1': 'Terminal Room',
13+
'Coral 1': 'Breakout 4',
14+
'Coral 2': 'Breakout 5',
15+
'Coral 5': 'Breakout 6',
16+
'Coral 4': 'Breakout 7',
17+
'Coral 3': 'Breakout 8',
18+
'Great Lawn': 'Welcome Reception',
19+
'Rainbow Suite': 'Not Used',
20+
'Lehua Suite': 'Breakout 1',
21+
'Kahili': 'Breakout 2',
22+
'Rainbow Suite 1/2': 'Meeting Room #2 (IESG Meeting Room)',
23+
'Village Green': 'Meet and Greet',
24+
'South Pacific 3': 'Meeting Room #4 (IAOC/IAD Office)',
25+
'Rainbow Suite 3': 'Meeting Room #7',
26+
'Rainbow Suite 2/3': 'ISOC Dinner',
27+
'South Pacific 3/4': 'ISOC AC Meeting',
28+
'Iolani 6/7': 'Meeting Room #5 (NomCom Office)',
29+
'Sea Pearl 1/2': 'Reception',
30+
'Sea Pearl 2': 'Meeting Room #1 (IAB Meeting Room)',
31+
'Coral Lounge': 'Registration Area and Breaks',
32+
'Tiare Suite': 'Meeting Room #8 (RFC Office)',
33+
}
34+
35+
Room = apps.get_model('meeting', 'Room')
36+
37+
for name,functional_name in map.items():
38+
Room.objects.filter(meeting__number=91,name=name).update(functional_name=functional_name)
39+
40+
class Migration(migrations.Migration):
41+
42+
dependencies = [
43+
('meeting', '0009_room_functional_name'),
44+
]
45+
46+
operations = [
47+
migrations.RunPython(add_91_room_functional_names),
48+
]
49+
Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
# -*- coding: utf-8 -*-
2+
from __future__ import unicode_literals
3+
4+
import datetime
5+
from django.db import migrations
6+
7+
8+
def backfill_92_other_meetings(apps, schema_editor):
9+
10+
Meeting = apps.get_model('meeting', 'Meeting')
11+
Schedule = apps.get_model('meeting', 'Schedule')
12+
ScheduledSession = apps.get_model('meeting', 'ScheduledSession')
13+
Room = apps.get_model('meeting', 'Room')
14+
Session = apps.get_model('meeting', 'Session')
15+
Group = apps.get_model('group', 'Group')
16+
Person = apps.get_model('person', 'Person')
17+
18+
ietf92 = Meeting.objects.filter(number=92).first()
19+
20+
if not ietf92:
21+
print "IETF92 not found, no data changed"
22+
else:
23+
24+
# Clear out one orphaned ill-configured Session object
25+
qs = Session.objects.filter(meeting__number=92,name__icontains='beverage break').exclude(type_id='break')
26+
if qs.count()==1:
27+
qs.delete()
28+
29+
agenda92 = Schedule.objects.get(meeting=ietf92,pk=ietf92.agenda.pk)
30+
31+
map_existing = {
32+
'Regency Ballroom': 'Lounge',
33+
'Garden Terrace Level': 'Meet and Greet',
34+
'Royal': 'Breakout 1',
35+
'Continental': 'Breakout 2',
36+
'Far East': 'Breakout 3',
37+
'Oak ': 'Breakout 4',
38+
'Parisian': 'Breakout 5',
39+
'Venetian': 'Breakout 6',
40+
'Gold': 'Breakout 7',
41+
'International': 'Breakout 8',
42+
'Brasserie': 'Terminal Room',
43+
'State': 'Office #3 (Secretariat Office)',
44+
'French': 'Meeting Room #2 (IESG Meeting Room)',
45+
}
46+
47+
for name,functional_name in map_existing.items():
48+
Room.objects.filter(meeting__number=92,name=name).update(functional_name=functional_name)
49+
50+
regency = Room.objects.get(meeting=ietf92,name='Regency Ballroom')
51+
garden = Room.objects.get(meeting=ietf92,name='Garden Terrace Level')
52+
royal = Room.objects.get(meeting=ietf92,name='Royal')
53+
continental = Room.objects.get(meeting=ietf92,name='Continental')
54+
far_east = Room.objects.get(meeting=ietf92,name='Far East')
55+
oak = Room.objects.get(meeting=ietf92,name='Oak ')
56+
#parisian = Room.objects.get(meeting=ietf92,name='Parisian')
57+
#venetian = Room.objects.get(meeting=ietf92,name='Venetian')
58+
#gold = Room.objects.get(meeting=ietf92,name='Gold')
59+
#international = Room.objects.get(meeting=ietf92,name='International')
60+
brasserie = Room.objects.get(meeting=ietf92,name='Brasserie')
61+
state = Room.objects.get(meeting=ietf92,name='State')
62+
#french = Room.objects.get(meeting=ietf92,name='French')
63+
64+
executive = Room.objects.create(meeting=ietf92,name='Executive',functional_name='Meeting Room #4 (IAOC/IAD)',capacity=20)
65+
regency_foyer = Room.objects.create(meeting=ietf92,name='Regency Foyer',functional_name='Registration',capacity=1200)
66+
florentine = Room.objects.create(meeting=ietf92,name='Florentine',functional_name='Meeting Room #1 (IAB)', capacity=40)
67+
pavilion = Room.objects.create(meeting=ietf92,name='Pavilion',functional_name='Meeting Room #6', capacity=80)
68+
terrace = Room.objects.create(meeting=ietf92,name='Terrace',functional_name='Meeting Room #7', capacity=80)
69+
panorama = Room.objects.create(meeting=ietf92,name='Panorama',functional_name='Companion Reception', capacity=200)
70+
71+
regency.session_types.add('offagenda')
72+
pavilion.session_types.add('offagenda')
73+
pavilion.session_types.add('lead')
74+
garden.session_types.add('lead')
75+
panorama.session_types.add('offagenda')
76+
executive.session_types.add('lead')
77+
executive.session_types.add('offagenda')
78+
regency_foyer.session_types.add('offagenda')
79+
oak.session_types.add('offagenda')
80+
continental.session_types.add('offagenda')
81+
state.session_types.add('offagenda')
82+
florentine.session_types.add('offagenda')
83+
terrace.session_types.add('lead')
84+
terrace.session_types.add('offagenda')
85+
far_east.session_types.add('offagenda')
86+
brasserie.session_types.add('offagenda')
87+
royal.session_types.add('offagenda')
88+
89+
iesg = Group.objects.get(acronym='iesg')
90+
iab = Group.objects.get(acronym='iab')
91+
iaoc = Group.objects.get(acronym='iaoc')
92+
secr = Group.objects.get(acronym='secretariat')
93+
94+
system = Person.objects.get(name='(System)')
95+
96+
for d, h, m, duration, type_id, groups, room, slotname, label in [
97+
( 20, 13, 0, 480, 'offagenda', [secr], brasserie, 'Setup', 'Hackathon: Setup'),
98+
( 20, 8, 0, 540, 'offagenda', [secr], executive, 'Meeting', 'DNS OARC Meeting'),
99+
( 21, 8, 0, 540, 'offagenda', [secr], executive, 'Meeting', 'DNS OARC Meeting'),
100+
( 22, 12, 0, 720, 'offagenda', [secr], brasserie, 'Terminal Room', 'Terminal Room Open to Attendees'),
101+
( 22, 11, 0, 480, 'offagenda', [secr], regency_foyer, 'T-Shirt Distribution', 'T-shirt Distribution'),
102+
( 22, 19, 0, 120, 'offagenda', [secr], state, 'Meeting', 'CJK Generation Panel coordination informal meeting'),
103+
( 22, 19, 0, 120, 'offagenda', [iab], florentine, 'Meeting', 'IAB PrivSec program'),
104+
( 22, 8, 30, 90, 'lead', [iesg], pavilion, 'Breakfast', None),
105+
( 22, 9, 0, 150, 'lead', [iesg], pavilion, 'Meeting', None),
106+
( 22, 11, 30, 150, 'lead', [iab,iesg], pavilion, 'Lunch', 'IESG/IAB Lunch'),
107+
( 22, 14, 0, 180, 'lead', [iab], pavilion, 'Meeting', None),
108+
( 22, 9, 0, 480, 'offagenda', [secr], terrace, 'Meeting', 'RootOPS'),
109+
( 22, 16, 30, 60, 'offagenda', [secr], panorama, 'Reception', "Companion's Reception"), # Should this appear on agenda?
110+
( 22, 21, 0, 180, 'lead', [secr], garden, 'Gathering', 'AMS/IESG/IAB/IAOC Gathering'),
111+
( 22, 9, 0, 480, 'offagenda', [secr], royal, 'ICNRG', 'ICNRG'),
112+
( 22, 19, 0, 180, 'offagenda', [secr], royal, 'Meeting', 'Huawei'),
113+
( 22, 12, 30, 240, 'offagenda', [secr], continental, 'Meeting', 'Verisign ROA Workshop'),
114+
( 22, 15, 15, 165, 'offagenda', [secr], far_east, 'Meeting', 'RSSAC'),
115+
( 22, 9, 0, 150, 'offagenda', [secr], oak, 'Meeting', 'Ericsson'),
116+
( 23, 0, 0, 1440, 'offagenda', [secr], brasserie, 'Terminal Room', 'Terminal Room Open to Attendees'),
117+
( 23, 8, 0, 600, 'offagenda', [secr], regency_foyer, 'T-Shirt Distribution', 'T-shirt Distribution'),
118+
( 23, 0, 0, 1440, 'offagenda', [secr], regency, 'Lounge', 'Lounge'),
119+
( 23, 11, 30, 180, 'offagenda', [secr], executive, 'Lunch', 'ICANN Lunch'),
120+
( 23, 7, 0, 120, 'lead', [iab,iesg], pavilion, 'Breakfast', 'IESG/IAB Breakfast'),
121+
( 23, 11, 30, 90, 'offagenda', [secr], pavilion, 'Meeting', 'OPS Directorate Meeting'),
122+
( 23, 19, 0, 120, 'offagenda', [secr], pavilion, 'Meeting', 'ACE'),
123+
( 23, 7, 30, 90, 'offagenda', [secr], terrace, 'Meeting', 'NRO ECG'),
124+
( 23, 11, 30, 90, 'offagenda', [secr], terrace, 'Meeting', 'IETF/3GPP Meeting'),
125+
( 23, 19, 0, 120, 'offagenda', [secr], terrace, 'Meeting', 'I2NSF'),
126+
( 23, 18, 50, 60, 'offagenda', [secr], royal, 'Meeting', 'Captive Portal Bar BOF'),
127+
( 24, 0, 0, 1440, 'offagenda', [secr], brasserie, 'Terminal Room', 'Terminal Room Open to Attendees'),
128+
( 24, 8, 0, 600, 'offagenda', [secr], regency_foyer, 'T-Shirt Distribution', 'T-shirt Distribution'),
129+
( 24, 0, 0, 1440, 'offagenda', [secr], regency, 'Lounge', 'Lounge'),
130+
( 24, 11, 30, 90, 'offagenda', [secr], state, 'Meeting', 'HIAPS'),
131+
( 24, 16, 30, 120, 'offagenda', [secr], state, 'Meeting', 'PDF Draft Review'),
132+
( 24, 7, 0, 120, 'lead', [iesg], pavilion, 'Breakfast', None),
133+
( 24, 11, 30, 90, 'offagenda', [secr], pavilion, 'Meeting', 'SECdir Meeting'),
134+
( 24, 7, 0, 120, 'lead', [iab], terrace, 'Breakfast', None),
135+
( 24, 9, 0, 120, 'offagenda', [secr], terrace, 'Meeting', 'ICNN DRZK Design Team'),
136+
( 24, 11, 30, 90, 'offagenda', [secr], terrace, 'Lunch', 'RSAG/ISEB Lunch'),
137+
( 24, 13, 0, 120, 'offagenda', [secr], terrace, 'Meeting', 'SACM'),
138+
( 24, 15, 0, 90, 'offagenda', [secr], terrace, 'Meeting', 'RSOC Meeting'),
139+
( 24, 17, 30, 60, 'offagenda', [secr], terrace, 'Meeting', 'SACM'),
140+
( 24, 11, 30, 90, 'offagenda', [secr], royal, 'Meeting', 'IoT Directorate'),
141+
( 25, 0, 0, 1440, 'offagenda', [secr], brasserie, 'Terminal Room', 'Terminal Room Open to Attendees'),
142+
( 25, 8, 0, 600, 'offagenda', [secr], regency_foyer, 'T-Shirt Distribution', 'T-shirt Distribution'),
143+
( 25, 0, 0, 1440, 'offagenda', [secr], regency, 'Lounge', 'Lounge'),
144+
( 25, 8, 0, 60, 'offagenda', [secr], state, 'Meeting', 'SFC Control Plane Offline Discussion'),
145+
( 25, 19, 0, 240, 'offagenda', [secr], state, 'Meeting', 'WWG'),
146+
( 25, 8, 0, 60, 'offagenda', [secr], florentine, 'Meeting', 'IAB Name Resolution'),
147+
( 25, 6, 45, 135, 'lead', [iaoc], executive, 'Breakfast', None),
148+
( 25, 11, 30, 90, 'offagenda', [secr], pavilion, 'Meeting', 'RMCAT'),
149+
( 25, 19, 0, 120, 'offagenda', [secr], pavilion, 'Meeting', 'I2NSF'),
150+
( 25, 8, 0, 60, 'offagenda', [secr], terrace, 'Meeting', 'IETF/IEEE 802 Coordination'),
151+
( 25, 11, 30, 90, 'offagenda', [secr], terrace, 'Lunch', 'RFC Editor Lunch'),
152+
( 25, 19, 30, 120, 'offagenda', [secr], terrace, 'Dinner', 'SSAC Dinner'),
153+
( 26, 0, 0, 1440, 'offagenda', [secr], brasserie, 'Terminal Room', 'Terminal Room Open to Attendees'),
154+
( 26, 8, 0, 600, 'offagenda', [secr], regency_foyer, 'T-Shirt Distribution', 'T-shirt Distribution'),
155+
( 26, 0, 0, 1440, 'offagenda', [secr], regency, 'Lounge', 'Lounge'),
156+
( 26, 7, 30, 90, 'offagenda', [secr], state, 'Breakfast', 'EDU Team Breakfast'),
157+
( 26, 14, 0, 120, 'offagenda', [secr], state, 'Meeting', 'JJB'),
158+
( 26, 11, 30, 90, 'offagenda', [secr], florentine, 'Meeting', 'IAB Liaison Oversight'),
159+
( 26, 18, 0, 150, 'offagenda', [secr], pavilion, 'Meeting', '6LO Security Discussion'),
160+
( 26, 7, 0, 120, 'lead', [iab], terrace, 'Breakfast', None),
161+
( 26, 17, 40, 60, 'offagenda', [secr], terrace, 'Meeting', 'SACM'),
162+
( 26, 19, 30, 150, 'offagenda', [secr], royal, 'Meeting', 'Lavabit'),
163+
( 27, 0, 0, 900, 'offagenda', [secr], brasserie, 'Terminal Room', 'Terminal Room Open to Attendees'),
164+
( 27, 7, 30, 90, 'offagenda', [secr], executive, 'Meeting', 'Post-Con with Ray'),
165+
( 27, 13, 30, 90, 'lead', [iab,iesg], pavilion, 'Lunch', 'IESG/IAB Lunch'),
166+
]:
167+
168+
ts = ietf92.timeslot_set.create(type_id=type_id, name=slotname,
169+
time=datetime.datetime(2015,3,d,h,m,0),
170+
duration=datetime.timedelta(minutes=duration),
171+
location=room,show_location=(type_id not in ['lead','offagenda']))
172+
for group in groups:
173+
session = ietf92.session_set.create(name= label or "%s %s"%(group.acronym.upper(),slotname),
174+
group=group, attendees=25,
175+
requested=datetime.datetime(2014,11,1,0,0,0),
176+
requested_by=system, status_id='sched',type_id=type_id)
177+
ScheduledSession.objects.create(schedule=agenda92, timeslot=ts, session=session)
178+
179+
180+
class Migration(migrations.Migration):
181+
182+
dependencies = [
183+
('meeting', '0010_auto_20150501_0732'),
184+
('name', '0004_auto_20150318_1140'),
185+
('group', '0004_auto_20150430_0847'),
186+
('person', '0004_auto_20150308_0440'),
187+
]
188+
189+
operations = [
190+
migrations.RunPython(backfill_92_other_meetings)
191+
]

ietf/meeting/models.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ def json_dict(self, host_scheme):
287287
class Room(models.Model):
288288
meeting = models.ForeignKey(Meeting)
289289
name = models.CharField(max_length=255)
290+
functional_name = models.CharField(max_length=255, blank = True)
290291
capacity = models.IntegerField(null=True, blank=True)
291292
resources = models.ManyToManyField(ResourceAssociation, blank = True)
292293
session_types = models.ManyToManyField(TimeSlotTypeName, blank = True)
@@ -374,6 +375,7 @@ def __unicode__(self):
374375
return u"%s: %s-%s %s, %s" % (self.meeting.number, self.time.strftime("%m-%d %H:%M"), (self.time + self.duration).strftime("%H:%M"), self.name, location)
375376
def end_time(self):
376377
return self.time + self.duration
378+
377379
def get_hidden_location(self):
378380
location = self.location
379381
if location:
@@ -390,6 +392,16 @@ def get_location(self):
390392
location = ""
391393
return location
392394

395+
def get_functional_location(self):
396+
name_parts = []
397+
room = self.location
398+
if room and room.functional_name:
399+
name_parts.append(room.functional_name)
400+
location = self.get_hidden_location()
401+
if location:
402+
name_parts.append(location)
403+
return ' - '.join(name_parts)
404+
393405
@property
394406
def tz(self):
395407
if self.meeting.time_zone:

0 commit comments

Comments
 (0)