releng r922 - in trunk/tools: . schedule
- From: ovitters svn gnome org
- To: svn-commits-list gnome org
- Subject: releng r922 - in trunk/tools: . schedule
- Date: Mon, 7 Jan 2008 21:41:58 +0000 (GMT)
Author: ovitters
Date: Mon Jan 7 21:41:58 2008
New Revision: 922
URL: http://svn.gnome.org/viewvc/releng?rev=922&view=rev
Log:
* schedule/automail.py: Wrap descriptions using textwrap. Add a common
footer to every mail. Don't output anything to stdout.
* schedule/libschedule.py: Add custom definitions from the schedule
file to the GnomeReleaseEvent (hackish). This allows to replace the
hard coded 2.2[012] stuff with 'variables'.
Modified:
trunk/tools/ChangeLog
trunk/tools/schedule/automail.py
trunk/tools/schedule/libschedule.py
Modified: trunk/tools/schedule/automail.py
==============================================================================
--- trunk/tools/schedule/automail.py (original)
+++ trunk/tools/schedule/automail.py Mon Jan 7 21:41:58 2008
@@ -5,14 +5,24 @@
import smtplib
from email.MIMEText import MIMEText
import StringIO
+import textwrap
cat_task = set(('release', 'tarball'))
+FOOTER = """\n\n\nFor more information about $unstable, the full schedule, the official
+module lists and the proposed module lists, please see our colorful $unstable
+page:
+ http://www.gnome.org/start/unstable
+
+For a quick overview of the GNOME schedule, please see:
+ http://live.gnome.org/Schedule
+
+Thanks,"""
+
def mail_events(events):
if not len(events): return # sanity check
- print "Mailing!"
- mail = 'olav bkor dhs org'
+ mail = 'release-team gnome org'
subject = ""
tasks = [event for event in events if event.category in cat_task]
@@ -29,16 +39,9 @@
if len(events) > 1:
contents.write("We would like to inform you about the following:\n* %s\n\n\n" % "\n* ".join([event.summary() for event in events]))
- contents.write("\n\n".join([event.description() for event in events]))
- contents.write("""\n\n\nFor more informations about 2.21, the full schedule, the official
-module lists and the proposed module lists, please see our colorful 2.21
-page on the wiki:
- http://live.gnome.org/TwoPointTwentyone
+ contents.write("\n\n\n".join([textwrap.fill(event.description()) for event in events]))
-For a quick overview of the GNOME schedule, please see:
- http://live.gnome.org/Schedule
-
-Thanks,""")
+ contents.write(string.Template(FOOTER).safe_substitute(events[0]))
s = smtplib.SMTP()
s.connect()
@@ -52,19 +55,24 @@
events = parse_file ("2.22.schedule")
-today = datetime.date.today ()
-today = datetime.date (2008, 2, 29)
+today = datetime.date.today()
today_plus3 = today + datetime.timedelta (3)
events_to_email = []
for event in events:
- print event
-# if event.date == today_plus3 and event.category == "release":
-# mail_tarballs_due (event)
-
if event.date == today_plus3:
events_to_email.append(event)
if len(events_to_email):
mail_events(events_to_email)
+# For testing purposes
+#dates = set()
+#for event in events:
+# dates.add(event.date)
+#
+#for date in dates:
+# events_to_email = [event for event in events if event.date == date]
+# mail_events(events_to_email)
+
+
Modified: trunk/tools/schedule/libschedule.py
==============================================================================
--- trunk/tools/schedule/libschedule.py (original)
+++ trunk/tools/schedule/libschedule.py Mon Jan 7 21:41:58 2008
@@ -5,6 +5,8 @@
import string
class GnomeReleaseEvent:
+ definitions = {}
+
def __init__ (self, date, week, category, detail, version=None):
self.date = date
self.rel_week = week
@@ -18,13 +20,13 @@
'proposals-start': 'Start of [wiki:ReleasePlanning/ModuleProposing new (app) modules proposal] period',
'proposals-end': 'End of [wiki:ReleasePlanning/ModuleProposing new (app) modules proposal] period',
'discussion': 'Module inclusion discussion heats up.',
- 'decision': '[http://mail.gnome.org/mailman/listinfo/release-team Release Team] meets about new module decisions for 2.22 with community input up to this point.'
+ 'decision': '[http://mail.gnome.org/mailman/listinfo/release-team Release Team] meets about new module decisions for $newstable with community input up to this point.'
},
'release': 'GNOME $version $detail release',
'freeze': {
'string-announcement': 'String Change Announcement Period: All string changes must be announced to both [http://mail.gnome.org/mailman/listinfo/gnome-i18n gnome-i18n ] and [http://mail.gnome.org/mailman/listinfo/gnome-doc-list gnome-doc-list ] ',
'ui-announcement': 'UI Change Announcement Period: All user interface changes must be announced to [http://mail.gnome.org/mailman/listinfo/gnome-doc-list gnome-doc-list ] ',
- 'api': '[wiki:ReleasePlanning/Freezes API/ABI Freeze] for 2.21.x: developer APIs should be frozen at this point.',
+ 'api': '[wiki:ReleasePlanning/Freezes API/ABI Freeze] for $unstable.x: developer APIs should be frozen at this point.',
'feature': '[wiki:ReleasePlanning/Freezes Feature and Module Freeze]: new modules and functionality are chosen now.',
'ui': '[wiki:ReleasePlanning/Freezes UI Freeze]: No UI changes may be made without approval from the [http://mail.gnome.org/mailman/listinfo/release-team release-team] and notification to the GDP ([http://mail.gnome.org/mailman/listinfo/gnome-doc-list gnome-doc-list ])',
'string': '[wiki:ReleasePlanning/Freezes String Freeze]: no string changes may be made without confirmation from the l10n team ([http://mail.gnome.org/mailman/listinfo/gnome-i18n gnome-i18n ]) and notification to both the release team and the GDP ([http://mail.gnome.org/mailman/listinfo/gnome-doc-list gnome-doc-list ]).',
@@ -70,15 +72,7 @@
UTC: tarballs uploaded later than that will probably be too late to get
in $version. If you are not able to make a tarball before this deadline or
if you think you'll be late, please send a mail to the release team and
-we'll find someone to roll the tarball for you!
-
-For more informations about 2.21, the full schedule, the official
-module lists and the proposed module lists, please see our colorful 2.21
-page on the wiki:
- http://www.gnome.org/start/unstable
-
-For a quick overview of the GNOME schedule, please see:
- http://live.gnome.org/Schedule""",
+we'll find someone to roll the tarball for you!""",
'modules': {
'proposals-start': 'New module proposal start',
'proposals-end': 'New module proposal end',
@@ -114,7 +108,10 @@
def __getitem__(self, item):
"""Allows the GnomeReleaseEvent class to be used in a string.Template"""
- return getattr(self, item)
+ if hasattr(self, item):
+ return getattr(self, item)
+ else:
+ return GnomeReleaseEvent.definitions[item]
def __repr__(self):
v = self.version
@@ -181,9 +178,10 @@
file.close ()
events = []
- definitions = {}
start = None
+ definitions = GnomeReleaseEvent.definitions
+
for line in lines:
# ignore comments & empty lines
if line[0] == "#" or len (line) == 1:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]