From d302f798971eb4f6bacc54c86eef9d05d3154c4a Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Fri, 17 Feb 2017 09:14:26 -0500 Subject: [PATCH] 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 --- openstack_releases/cmds/make_tracking_pad.py | 76 ++++++++++++++++++++ setup.cfg | 1 + 2 files changed, 77 insertions(+) create mode 100644 openstack_releases/cmds/make_tracking_pad.py diff --git a/openstack_releases/cmds/make_tracking_pad.py b/openstack_releases/cmds/make_tracking_pad.py new file mode 100644 index 0000000000..f6003aa818 --- /dev/null +++ b/openstack_releases/cmds/make_tracking_pad.py @@ -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() diff --git a/setup.cfg b/setup.cfg index 2852d6317f..590e28c8b4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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 =