[releng] Add support for conferences and hackfests
- From: Olav Vitters <ovitters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [releng] Add support for conferences and hackfests
- Date: Sat, 23 Apr 2011 18:07:53 +0000 (UTC)
commit e5a0840f843d7cbc7f85546486fe44e433e050be
Author: Olav Vitters <olav vitters nl>
Date: Sat Apr 23 20:07:22 2011 +0200
Add support for conferences and hackfests
and remove 'misc' category to 'task'
tools/schedule/2.22.schedule | 4 +-
tools/schedule/2.24.schedule | 4 +-
tools/schedule/2.26.schedule | 4 +-
tools/schedule/2.28.schedule | 4 +-
tools/schedule/2.30.schedule | 4 +-
tools/schedule/2.32.schedule | 4 +-
tools/schedule/3.0.schedule | 4 +-
tools/schedule/3.2.schedule | 12 ++++-
tools/schedule/libschedule.py | 101 +++++++++++++++++++++++++----------------
9 files changed, 84 insertions(+), 57 deletions(-)
---
diff --git a/tools/schedule/2.22.schedule b/tools/schedule/2.22.schedule
index ad83edd..ccf5ff8 100644
--- a/tools/schedule/2.22.schedule
+++ b/tools/schedule/2.22.schedule
@@ -19,8 +19,8 @@ newstable:2.22
16:modules:decision
17:release:unstable.5
17:freeze:feature
-18:misc:api-doc
-18:misc:release-notes-start
+18:task:api-doc
+18:task:release-notes-start
19:release:beta.90
19:freeze:ui
21:release:beta.91
diff --git a/tools/schedule/2.24.schedule b/tools/schedule/2.24.schedule
index 5144c83..2490576 100644
--- a/tools/schedule/2.24.schedule
+++ b/tools/schedule/2.24.schedule
@@ -20,8 +20,8 @@ newstable:2.24
20:modules:decision
21:freeze:feature
21:release:unstable.6
-22:misc:api-doc
-22:misc:release-notes-start
+22:task:api-doc
+22:task:release-notes-start
23:freeze:ui
23:release:beta.90
25:freeze:string
diff --git a/tools/schedule/2.26.schedule b/tools/schedule/2.26.schedule
index 07581e8..c752720 100644
--- a/tools/schedule/2.26.schedule
+++ b/tools/schedule/2.26.schedule
@@ -19,8 +19,8 @@ newstable:2.26
16:modules:decision
17:freeze:feature
17:release:unstable.5
-18:misc:api-doc
-18:misc:release-notes-start
+18:task:api-doc
+18:task:release-notes-start
19:freeze:ui
19:release:beta.90
21:freeze:string
diff --git a/tools/schedule/2.28.schedule b/tools/schedule/2.28.schedule
index ad31375..62618e8 100644
--- a/tools/schedule/2.28.schedule
+++ b/tools/schedule/2.28.schedule
@@ -19,8 +19,8 @@ newstable:2.28
18:modules:decision
19:freeze:feature
19:release:unstable.5 vuntz
-20:misc:api-doc
-20:misc:release-notes-start
+20:task:api-doc
+20:task:release-notes-start
21:freeze:ui
21:release:beta.90 fcrozat
23:freeze:string
diff --git a/tools/schedule/2.30.schedule b/tools/schedule/2.30.schedule
index 487d451..4d585f9 100644
--- a/tools/schedule/2.30.schedule
+++ b/tools/schedule/2.30.schedule
@@ -20,8 +20,8 @@ newstable:2.30
17:freeze:api
18:freeze:feature2
18:release:unstable.6 fredp
-19:misc:api-doc
-19:misc:release-notes-start
+19:task:api-doc
+19:task:release-notes-start
20:freeze:ui
20:release:beta.90 mclasen
22:freeze:string
diff --git a/tools/schedule/2.32.schedule b/tools/schedule/2.32.schedule
index 415485b..53b96ca 100644
--- a/tools/schedule/2.32.schedule
+++ b/tools/schedule/2.32.schedule
@@ -19,9 +19,9 @@ newstable:2.32
15:release:unstable.5 lucasr
18:freeze:api
18:freeze:feature2
-18:misc:release-notes-start
+18:task:release-notes-start
18:release:unstable.6 vuntz
-19:misc:api-doc
+19:task:api-doc
20:freeze:ui
20:release:beta.90 fredp
22:freeze:string
diff --git a/tools/schedule/3.0.schedule b/tools/schedule/3.0.schedule
index 43d4c05..9b2a0d9 100644
--- a/tools/schedule/3.0.schedule
+++ b/tools/schedule/3.0.schedule
@@ -20,8 +20,8 @@ newstable:3.0
18:freeze:api
18:freeze:feature2
18:release:unstable.6 fredp
-19:misc:api-doc
-19:misc:release-notes-start
+19:task:api-doc
+19:task:release-notes-start
21:freeze:ui
21:release:beta.90 lucasr
23:freeze:string
diff --git a/tools/schedule/3.2.schedule b/tools/schedule/3.2.schedule
index c6ddbf6..1e38e01 100644
--- a/tools/schedule/3.2.schedule
+++ b/tools/schedule/3.2.schedule
@@ -19,8 +19,8 @@ newstable:3.2
19:freeze:api
19:freeze:feature2
19:release:unstable.5
-20:misc:api-doc
-20:misc:release-notes-start
+20:task:api-doc
+20:task:release-notes-start
20:freeze:ui
20:release:beta.90
22:freeze:string
@@ -30,4 +30,10 @@ newstable:3.2
25:release:newstable.0
25:freeze:hard-code-end
28:release:newstable.1
-
+2011-08-06:conference:Desktop Summit:https://desktopsummit.org/
+2011-08-07:conference:Desktop Summit:https://desktopsummit.org/
+2011-08-08:conference:Desktop Summit:https://desktopsummit.org/
+2011-08-09:conference:Desktop Summit:https://desktopsummit.org/
+2011-08-10:conference:Desktop Summit:https://desktopsummit.org/
+2011-08-11:conference:Desktop Summit:https://desktopsummit.org/
+2011-08-12:conference:Desktop Summit:https://desktopsummit.org/
diff --git a/tools/schedule/libschedule.py b/tools/schedule/libschedule.py
index b01bc56..8d78e09 100755
--- a/tools/schedule/libschedule.py
+++ b/tools/schedule/libschedule.py
@@ -1,6 +1,7 @@
#!/usr/bin/env python
import datetime
+import time
import re
import string
import os
@@ -9,12 +10,13 @@ import sys
class GnomeReleaseEvent:
definitions = {}
+ categories = ["release", "tarball", "freeze", "modules", "task", "conference", "hackfest"]
def __init__ (self, date, week, category, detail, version=None, assignee=None):
self.date = date
self.rel_week = week
self.category = category
- self.category_index = ["release", "tarball", "freeze", "modules", "misc"].index (category)
+ self.category_index = self.categories.index(category)
self.detail = detail
self.version = version
self.assignee = assignee
@@ -39,10 +41,12 @@ class GnomeReleaseEvent:
'hard-code': '[[ReleasePlanning/Freezes|Hard Code Freeze]]: no source code changes can be made without approval from the [[http://mail.gnome.org/mailman/listinfo/release-team|release-team]]. Translation and documentation can continue.',
'hard-code-end': 'Hard Code Freeze ends, but other freezes remain in effect for the stable branch.'
},
- 'misc': {
+ 'task': {
'api-doc': '[[http://live.gnome.org/ReleasePlanning/ModuleRequirements/Platform#head-2a21facd40d5bf2d73f088cd355aa98b6a2458df|New APIs must be fully documented]]',
'release-notes-start': '[[http://live.gnome.org/ReleaseNotes|Writing of release notes begins]]'
- }
+ },
+ 'conference': '$detail conference',
+ 'hackfast': '$detail hackfest',
}
self.summary_template = {
'tarball': 'GNOME $version $detail tarballs due',
@@ -65,10 +69,12 @@ class GnomeReleaseEvent:
'hard-code': 'Hard Code Freeze',
'hard-code-end': 'Hard Code Freeze ends'
},
- 'misc': {
+ 'task': {
'api-doc': 'New APIs must be fully documented',
'release-notes-start': 'Writing of release notes begins'
- }
+ },
+ 'conference': '$detail conference',
+ 'hackfast': '$detail hackfest',
}
self.description_template = {
'tarball': """Tarballs are due on $date before 23:59 UTC for the GNOME
@@ -108,7 +114,7 @@ For the string freezes explained, and to see which kind of changes are not cover
'hard-code': """This is a late freeze to avoids sudden last-minute accidents which could risk the stability that should have been reached at this point. No source code changes are allowed without approval from the release team, but translation and documentation should continue. Simple build fixes are, of course, allowed without asking. """,
'hard-code-end': """Hard Code Freeze ends, but other freezes remain in effect for the stable branch."""
},
- 'misc': {
+ 'task': {
'api-doc': 'New APIs must be fully documented',
'release-notes-start': 'Writing of release notes begins'
}
@@ -119,7 +125,7 @@ For the string freezes explained, and to see which kind of changes are not cover
if hasattr(self, item):
return getattr(self, item)
else:
- return GnomeReleaseEvent.definitions[item]
+ return self.__class__.definitions[item]
def __repr__(self):
v = self.version
@@ -168,75 +174,78 @@ For the string freezes explained, and to see which kind of changes are not cover
return text
def __cmp__ (self, other):
- if self.date < other.date:
- return -1
- if self.date > other.date:
- return 1
- return self.category_index - other.category_index
-
-def find_date (year, week):
- guessed = datetime.date (year, week / 4, 1)
- (iso_y, iso_w, iso_d) = guessed.isocalendar ()
- found = guessed - datetime.timedelta ((iso_d - 1) + (iso_w - week) * 7)
- return found
-
-def parse_file (filename):
+ return cmp(self.date, other.date) or cmp(self.category_index, other.category_index)
+
+def find_date(year, week):
+ guessed = datetime.date(year, 2, 1)
+ (iso_y, iso_w, iso_d) = guessed.isocalendar()
+ return guessed - datetime.timedelta((iso_d - 1) + (iso_w - week) * 7)
+
+def line_input (file):
+ for line in file:
+ if line[-1] == '\n':
+ yield line[:-1]
+ else:
+ yield line
+
+def parse_file (filename, cls=GnomeReleaseEvent):
try:
file = open(filename, 'r')
except IOError:
file = open(os.path.join(os.path.abspath(sys.path[0] or os.curdir), filename), 'r')
- lines = file.readlines ()
- file.close ()
events = []
start = None
- definitions = GnomeReleaseEvent.definitions
+ definitions = cls.definitions
- for line in lines:
+ for line in line_input(file):
# ignore comments & empty lines
- if line[0] == "#" or len (line) == 1:
+ if line == '' or line[0] == "#":
continue
if not ':' in line:
print "Error: line '%s' is not parsable" % line[0:-1]
return None
- info = [item.lower().strip() for item in line.split(':')]
+ info = [item.strip() for item in line.split(':')]
if len(info) == 2:
- if info[0] == 'yearweek':
+ if info[0].lower() == 'yearweek':
if start:
print "Error: more than one start date specified"
return None
year = int(info[1][:4])
week = int(info[1][-2:])
- if year < 2007 or year > 2015:
+ if year < 2007 or year > 2020:
print "Error: %s is not a valid year for the start date" % year
return None
if week > 54:
print "Error: %s is not a valid week for the start date" % week
return None
- start = find_date (year, week)
+ start = find_date(year, week)
else:
- definitions[info[0]] = info[1]
+ definitions[info[0].lower()] = info[1]
continue
- elif len(info) == 3:
+ else:
if not start or 'unstable' not in definitions or 'stable' not in definitions:
print "Error: Need yearweek, stable and unstable definitions before line '%s'" % line[0:-1]
return None
- week = int(info[0])
- category = info[1]
+ if info[0].isdigit():
+ week = int(info[0])
+ if week < -10 or week > 53:
+ print "Error: %s is not a valid week for an event" % week
+ return None
+ date = start + datetime.timedelta(week * 7)
+ else:
+ date = datetime.date(*(time.strptime(info[0], '%Y-%m-%d')[0:3]))
+ category = info[1].lower()
event = info[2]
- if week < -10 or week > 40:
- print "Error: %s is not a valid week for an event" % week
- return None
- if category not in ["release", "freeze", "modules", "misc"]:
+ if category not in cls.categories:
print "Error: %s is not a valid category for an event" % category
return None
- date = start + datetime.timedelta (week * 7)
# Expand event info
version = None
@@ -258,14 +267,15 @@ def parse_file (filename):
return None
if category == 'release':
- rel_event = GnomeReleaseEvent (date, week, 'tarball', event, version, assignee)
+ rel_event = cls(date, week, 'tarball', event, version, assignee)
events.append (rel_event)
date = date + datetime.timedelta(2)
- rel_event = GnomeReleaseEvent (date, week, category, event, version, assignee)
+ rel_event = cls(date, week, category, event, version, assignee)
events.append (rel_event)
continue
+ file.close ()
if not start:
print "Error: empty data file"
@@ -274,3 +284,14 @@ def parse_file (filename):
events.sort()
return events
+
+if __name__ == '__main__':
+ d = datetime.date(1980,1,7)
+ end = datetime.date(2020,1,1)
+ adv = datetime.timedelta(7)
+ while d < end:
+ yw = d.isocalendar()[:2]
+ dcalc = find_date(yw[0], yw[1])
+ print yw, dcalc, d, "" if d == dcalc else "WRONG"
+
+ d += adv
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]