Add ability to have per-meeting chairs
Wanting to schedule multiple meeting slots is often driven by a desire to include more timezones; there's no reason to assume that a single person will be available to chair all meetings. Change-Id: If7f565d481dd0ae4bd4ee084cfddb203d170b2e8
This commit is contained in:
parent
3178bac6f8
commit
630657cafd
@ -128,7 +128,8 @@ Each meeting consists of:
|
|||||||
* ``skip_date``: Skip the meeting for specified date.
|
* ``skip_date``: Skip the meeting for specified date.
|
||||||
Format as ``start_date``
|
Format as ``start_date``
|
||||||
* ``reason``: A comment for why the meeting was skipped
|
* ``reason``: A comment for why the meeting was skipped
|
||||||
* ``chair``: name of the meeting's chair [MANDATORY]
|
* ``chair``: name of the schedule's chair (defaults to meeting's chair)
|
||||||
|
* ``chair``: name of the meeting's chair [MANDATORY, unless all schedules have a chair]
|
||||||
* ``description``: a paragraph description about the meeting [MANDATORY]
|
* ``description``: a paragraph description about the meeting [MANDATORY]
|
||||||
* ``agenda_url``: a link to the agenda page for the meeting
|
* ``agenda_url``: a link to the agenda page for the meeting
|
||||||
* ``project_url``: a link to the project home page for the meeting
|
* ``project_url``: a link to the project home page for the meeting
|
||||||
|
@ -7,11 +7,13 @@
|
|||||||
{% for schedule in meeting.schedules %}
|
{% for schedule in meeting.schedules %}
|
||||||
<li>{{ schedule.recurrence }} on {{ schedule.day }} at
|
<li>{{ schedule.recurrence }} on {{ schedule.day }} at
|
||||||
<a href="http://www.timeanddate.com/worldclock/fixedtime.html?hour={{ schedule.utc[:2] }}&min={{ schedule.utc[2:] }}&sec=0">{{ schedule.utc }} UTC</a>
|
<a href="http://www.timeanddate.com/worldclock/fixedtime.html?hour={{ schedule.utc[:2] }}&min={{ schedule.utc[2:] }}&sec=0">{{ schedule.utc }} UTC</a>
|
||||||
in #{{ schedule.irc }}</li>
|
in #{{ schedule.irc }}{% if schedule.chair != meeting.chair %}, chair: {{ schedule.chair }}{% endif %}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
{% if meeting.chair %}
|
||||||
Chair (to contact for more information): {{ meeting.chair }}</p>
|
Chair (to contact for more information): {{ meeting.chair }}</p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{{ meeting.description|urlize }}
|
{{ meeting.description|urlize }}
|
||||||
|
|
||||||
|
@ -8,12 +8,13 @@ schedule:
|
|||||||
day: Thursday
|
day: Thursday
|
||||||
irc: openstack-meeting
|
irc: openstack-meeting
|
||||||
frequency: quadweekly
|
frequency: quadweekly
|
||||||
|
chair: Jane Doe
|
||||||
- time: '600'
|
- time: '600'
|
||||||
duration: 45
|
duration: 45
|
||||||
start_date: 20150801
|
start_date: 20150801
|
||||||
day: Thursday
|
day: Thursday
|
||||||
irc: openstack-meeting
|
irc: openstack-meeting
|
||||||
frequency: quadweekly-alternate
|
frequency: quadweekly-alternate
|
||||||
chair: John Doe
|
chair: John Doe
|
||||||
description: >
|
description: >
|
||||||
quadweekly
|
quadweekly
|
||||||
|
@ -60,7 +60,7 @@ class Yaml2IcalCalendar(icalendar.Calendar):
|
|||||||
|
|
||||||
# add ical description
|
# add ical description
|
||||||
project_descript = "Project: %s" % (meeting.project)
|
project_descript = "Project: %s" % (meeting.project)
|
||||||
chair_descript = "Chair: %s" % (meeting.chair)
|
chair_descript = "Chair: %s" % (sch.chair)
|
||||||
descript_descript = "Description: %s" % (meeting.description)
|
descript_descript = "Description: %s" % (meeting.description)
|
||||||
ical_descript = "\n".join((project_descript,
|
ical_descript = "\n".join((project_descript,
|
||||||
chair_descript,
|
chair_descript,
|
||||||
|
@ -54,6 +54,7 @@ class Schedule(object):
|
|||||||
|
|
||||||
self.project = meeting.project
|
self.project = meeting.project
|
||||||
self.filefrom = meeting.filefrom
|
self.filefrom = meeting.filefrom
|
||||||
|
self.chair = sched_yaml.get('chair', meeting.chair)
|
||||||
# mandatory: time, day, irc, freq, recurrence
|
# mandatory: time, day, irc, freq, recurrence
|
||||||
try:
|
try:
|
||||||
self.utc = sched_yaml['time']
|
self.utc = sched_yaml['time']
|
||||||
@ -189,7 +190,6 @@ class Meeting(object):
|
|||||||
yaml_obj = yaml.safe_load(data)
|
yaml_obj = yaml.safe_load(data)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.chair = yaml_obj['chair']
|
|
||||||
self.description = yaml_obj['description']
|
self.description = yaml_obj['description']
|
||||||
self.project = yaml_obj['project']
|
self.project = yaml_obj['project']
|
||||||
except KeyError as e:
|
except KeyError as e:
|
||||||
@ -197,6 +197,15 @@ class Meeting(object):
|
|||||||
"attribute '{0}'".format(e.args[0]))
|
"attribute '{0}'".format(e.args[0]))
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
try:
|
||||||
|
self.chair = yaml_obj['chair']
|
||||||
|
except KeyError as e:
|
||||||
|
if any('chair' not in s for s in yaml_obj['schedule']):
|
||||||
|
print("Invalid YAML meeting definition - missing "
|
||||||
|
"attribute '{0}'".format(e.args[0]))
|
||||||
|
raise
|
||||||
|
self.chair = None
|
||||||
|
|
||||||
# Find any extra values the user has provided that they might
|
# Find any extra values the user has provided that they might
|
||||||
# want to have access to in their templates.
|
# want to have access to in their templates.
|
||||||
self.extras = {}
|
self.extras = {}
|
||||||
|
@ -86,6 +86,25 @@ agenda: |
|
|||||||
* Top bugs this week
|
* Top bugs this week
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
ALTERNATING_CHAIRS_MEETING = """
|
||||||
|
project: OpenStack Subteam Meeting
|
||||||
|
schedule:
|
||||||
|
- time: '1200'
|
||||||
|
day: Wednesday
|
||||||
|
irc: openstack-meeting
|
||||||
|
frequency: biweekly-even
|
||||||
|
chair: Jane Developer
|
||||||
|
- time: '2200'
|
||||||
|
day: Wednesday
|
||||||
|
irc: openstack-meeting
|
||||||
|
frequency: biweekly-odd
|
||||||
|
chair: John Developer
|
||||||
|
description: >
|
||||||
|
Weekly meeting for Subteam project.
|
||||||
|
agenda: |
|
||||||
|
* Top bugs this week
|
||||||
|
"""
|
||||||
|
|
||||||
BIWEEKLY_EVEN_MEETING = """
|
BIWEEKLY_EVEN_MEETING = """
|
||||||
project: OpenStack Subteam 12 Meeting
|
project: OpenStack Subteam 12 Meeting
|
||||||
schedule:
|
schedule:
|
||||||
|
@ -31,6 +31,16 @@ class MeetingTestCase(unittest.TestCase):
|
|||||||
self.assertEqual('Joe Developer', m.chair)
|
self.assertEqual('Joe Developer', m.chair)
|
||||||
self.assertEqual('Weekly meeting for Subteam project.\n',
|
self.assertEqual('Weekly meeting for Subteam project.\n',
|
||||||
m.description)
|
m.description)
|
||||||
|
self.assertEqual('Joe Developer', m.schedules[0].chair)
|
||||||
|
|
||||||
|
def test_chair_overrides(self):
|
||||||
|
m = meeting.load_meetings(sample_data.ALTERNATING_CHAIRS_MEETING)[0]
|
||||||
|
self.assertEqual('OpenStack Subteam Meeting', m.project)
|
||||||
|
self.assertIsNone(m.chair)
|
||||||
|
self.assertEqual('Weekly meeting for Subteam project.\n',
|
||||||
|
m.description)
|
||||||
|
self.assertEqual('Jane Developer', m.schedules[0].chair)
|
||||||
|
self.assertEqual('John Developer', m.schedules[1].chair)
|
||||||
|
|
||||||
def should_be_conflicting(self, yaml1, yaml2):
|
def should_be_conflicting(self, yaml1, yaml2):
|
||||||
"""Exception is raised when meetings should conflict."""
|
"""Exception is raised when meetings should conflict."""
|
||||||
@ -208,6 +218,15 @@ class MeetingTestCase(unittest.TestCase):
|
|||||||
cal.add_meeting(m)
|
cal.add_meeting(m)
|
||||||
self.assertEqual(cal, ical.Yaml2IcalCalendar())
|
self.assertEqual(cal, ical.Yaml2IcalCalendar())
|
||||||
|
|
||||||
|
def test_alternating_chairs_meeting(self):
|
||||||
|
meeting_yaml = sample_data.ALTERNATING_CHAIRS_MEETING
|
||||||
|
m = meeting.load_meetings(meeting_yaml)[0]
|
||||||
|
cal = ical.Yaml2IcalCalendar()
|
||||||
|
cal.add_meeting(m)
|
||||||
|
self.assertEqual(2, len(cal.events), cal)
|
||||||
|
self.assertIn('Chair: Jane Developer', cal.events[0]['description'])
|
||||||
|
self.assertIn('Chair: John Developer', cal.events[1]['description'])
|
||||||
|
|
||||||
def test_skip_meeting_missing_skip_date(self):
|
def test_skip_meeting_missing_skip_date(self):
|
||||||
self.assertRaises(KeyError,
|
self.assertRaises(KeyError,
|
||||||
meeting.load_meetings,
|
meeting.load_meetings,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user