add a command to format the schedule for the etherpad

Takes an existing schedule.yaml file and produces the initial content
for the tracking etherpad.

Change-Id: I174d325579406528c060cf43f02639bf7d553e23
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2017-02-17 09:14:26 -05:00
parent 04aba70acb
commit d302f79897
2 changed files with 77 additions and 0 deletions

View File

@ -0,0 +1,76 @@
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
import argparse
import datetime
import os.path
import openstack_releases
import yaml
def main():
parser = argparse.ArgumentParser()
parser.add_argument(
'series',
help='the release series, such as "newton" or "ocata"',
)
parser.add_argument(
'--deliverables-dir',
default=openstack_releases.deliverable_dir,
help='location of deliverable files',
)
args = parser.parse_args()
series = args.series
# Find the schedule file.
schedule_filename = os.path.abspath(os.path.join(
args.deliverables_dir,
'..',
'doc', 'source', series,
'schedule.yaml',
))
with open(schedule_filename, 'r') as f:
schedule_data = yaml.safe_load(f)
print('Release Team Calendar for {}\n'.format(series.title()))
print('Review dashboard: http://bit.ly/ocata-relmgt-dashboard')
print('Planning document: https://etherpad.openstack.org/p/{}-relmgt-plan'.format(series))
print('Process document: http://git.openstack.org/cgit/openstack/releases/tree/PROCESS.rst')
print()
for week in schedule_data['cycle']:
if not week.get('name'):
continue
start = datetime.datetime.strptime(week['start'], '%Y-%m-%d')
week['start_date'] = start
end = datetime.datetime.strptime(week['end'], '%Y-%m-%d')
week['end_date'] = end
print('{name} ({start_date:%b %d} - {end_date:%b %d})'.format(**week),
end='')
if week.get('x-project'):
print(' [', ', '.join(week['x-project']), ']')
else:
print()
print()
print('Team availability notes')
print('Tasks')
print('Meeting Agenda')
print('Countdown email content to send this week')
print()

View File

@ -35,6 +35,7 @@ console_scripts =
list-liaisons = openstack_releases.wiki:main
get-deliverable-owner = openstack_releases.cmds.get_deliverable_owner:main
propose-final-releases = openstack_releases.cmds.propose_final_releases:main
make-tracking-pad = openstack_releases.cmds.make_tracking_pad:main
[extras]
sphinxext =