Package dak :: Module bts_categorize :: Class BugClassifier
[hide private]
[frames] | no frames]

Class BugClassifier

source code

classify bugs using usertags based on the bug subject lines

>>> BugClassifier.rm_re.match( "RM: asdf" ) != None
True
>>> BugClassifier.rm_re.match( "[dak] Packages.diff/Index broken" ) != None
False
>>> BugClassifier.dak_re.match( "[dak] Packages.diff/Index broken" ) != None
True
Instance Methods [hide private]
 
unclassified_bugs(self)
Returns a list of open bugs which have not yet been classified by one of our usertags.
source code
 
classify_bug(self, bug)
if any of our classifiers match, return a newline terminated command to set an appropriate usertag, otherwise return an empty string
source code
 
email_text(self) source code
Class Variables [hide private]
  rm_re = re.compile("^RM")
  dak_re = re.compile(r"^\[dak\]")
  arch_re = re.compile(r"^\[Architectures\]")
  override_re = re.compile("^override")
  classifiers = {rm_re: 'remove', dak_re: 'dak', arch_re: 'archs...
Class Variable Details [hide private]

classifiers

Value:
{rm_re: 'remove', dak_re: 'dak', arch_re: 'archs', override_re: 'overr\
ide'}