[Buildbot-commits] buildbot/buildbot/status html.py,1.51,1.52 words.py,1.32,1.33 builder.py,1.48,1.49 mail.py,1.13,1.14

Brian Warner warner at users.sourceforge.net
Tue Apr 19 07:45:22 UTC 2005


Update of /cvsroot/buildbot/buildbot/buildbot/status
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1721/buildbot/status

Modified Files:
	html.py words.py builder.py mail.py 
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-47
Creator:  Brian Warner <warner at monolith.lothar.com>

merge doc updates [org.apestaart at thomas/buildbot--doc--0--patch-7]

more docs from Thomas, a few edits of my own.


Index: builder.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/builder.py,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- builder.py	18 Apr 2005 00:26:58 -0000	1.48
+++ builder.py	19 Apr 2005 07:45:19 -0000	1.49
@@ -1375,9 +1375,25 @@
         return self.connected
 
 class Status:
+    """
+    I represent the status of the buildmaster.
+    """
     __implements__ = interfaces.IStatus,
 
     def __init__(self, botmaster, basedir):
+        """
+        @type  botmaster: L{buildbot.master.BotMaster}
+        @param botmaster: the Status object uses C{.botmaster} to get at
+                          both the L{buildbot.master.BuildMaster} (for
+                          various buildbot-wide parameters) and the
+                          actual Builders (to get at their L{BuilderStatus}
+                          objects). It is not allowed to change or influence
+                          anything through this reference.
+        @type  basedir: string
+        @param basedir: this provides a base directory in which saved status
+                        information (changes.pck, saved Build status
+                        pickles) can be stored
+        """
         self.botmaster = botmaster
         self.basedir = basedir
         self.watchers = []
@@ -1393,6 +1409,9 @@
     def getBuilderNames(self):
         return self.botmaster.builderNames[:] # don't let them break it
     def getBuilder(self, name):
+        """
+        @rtype: L{BuilderStatus}
+        """
         return self.botmaster.builders[name].builder_status
 
     def getSlave(self, slavename):

Index: html.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/html.py,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- html.py	17 Apr 2005 10:50:00 -0000	1.51
+++ html.py	19 Apr 2005 07:45:19 -0000	1.52
@@ -1257,6 +1257,11 @@
     control = None
 
     def __init__(self, status, control, changemaster):
+        """
+        @type  status:       L{buildbot.status.builder.Status}
+        @type  control:      L{buildbot.master.Control}
+        @type  changemaster: L{buildbot.changes.changes.ChangeMaster}
+        """
         Resource.__init__(self)
         self.status = status
         self.control = control
@@ -1281,11 +1286,58 @@
 
 
 class Waterfall(service.MultiService, util.ComparableMixin):
+    """I implement the primary web-page status interface, called a 'Waterfall
+    Display' because builds and steps are presented in a grid of boxes which
+    move downwards over time. The top edge is always the present. Each column
+    represents a single builder. Each box describes a single Step, which may
+    have logfiles or other status information.
+
+    All these pages are served via a web server of some sort. The simplest
+    approach is to let the buildmaster run its own webserver, on a given TCP
+    port, but it can also publish its pages to a L{twisted.web.distrib}
+    distributed web server (which lets the buildbot pages be a subset of some
+    other web server).
+
+    @type parent: L{buildbot.master.BuildMaster}
+    @ivar parent: like all status plugins, this object is a child of the
+                  BuildMaster, so C{.parent} points to a
+                  L{buildbot.master.BuildMaster} instance, through which
+                  the status-reporting object is acquired.
+    """
     __implements__ = (interfaces.IStatusReceiver,
                       service.MultiService.__implements__)
     compare_attrs = ["http_port", "distrib_port", "allowForce"]
 
     def __init__(self, http_port=None, distrib_port=None, allowForce=True):
+        """
+
+        xxxTo have the buildbot run its own web server, pass a port number to
+        C{http_port}. To have it run a web.distrib server
+        
+        @type  http_port: int
+        @param http_port: the TCP port number on which the buildbot should
+                          run its own web server, with the Waterfall display
+                          as the root page
+
+        @type  distrib_port: string or int
+        @param distrib_port: Use this if you want to publish the Waterfall
+                             page using web.distrib instead. The most common
+                             case is to provide a string that is a pathname
+                             to the unix socket on which the publisher should
+                             listen (C{os.path.expanduser(~/.twistd-web-pb)}
+                             will match the default settings of a standard
+                             twisted.web 'personal web server'). Another
+                             possibility is to pass an integer, which means
+                             the publisher should listen on a TCP socket,
+                             allowing the web server to be on a different
+                             machine entirely.
+
+        @type  allowForce: bool
+        @param allowForce: if True, present a 'Force Build' button on the
+                           per-Builder page that allows visitors to the web
+                           site to initiate a build. If False, don't provide
+                           this button.
+        """
         service.MultiService.__init__(self)
         assert allowForce in (True, False) # TODO: implement others
         self.http_port = http_port
@@ -1301,6 +1353,9 @@
                                                        self.distrib_port)
 
     def setServiceParent(self, parent):
+        """
+        @type  parent: L{buildbot.master.BuildMaster}
+        """
         service.MultiService.setServiceParent(self, parent)
         self.setup()
 

Index: mail.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/mail.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- mail.py	11 Apr 2005 19:30:31 -0000	1.13
+++ mail.py	19 Apr 2005 07:45:19 -0000	1.14
@@ -139,8 +139,12 @@
             assert components.implements(lookup, interfaces.IEmailLookup)
         self.lookup = lookup
         self.watched = []
+        self.status = None
 
     def setServiceParent(self, parent):
+        """
+        @type  parent: L{buildbot.master.BuildMaster}
+        """
         service.Service.setServiceParent(self, parent)
         self.setup()
 

Index: words.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/words.py,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- words.py	8 Dec 2004 04:15:23 -0000	1.32
+++ words.py	19 Apr 2005 07:45:19 -0000	1.33
@@ -28,6 +28,15 @@
                             "HA HA HA HA ...."],
         }
     def __init__(self, nickname, channels, status):
+        """
+        @type  nickname: string
+        @param nickname: the nickname by which this bot should be known
+        @type  channels: list of strings
+        @param channels: the bot will maintain a presence in these channels
+        @type  status: L{buildbot.status.builder.Status}
+        @param status: the build master's Status object, through which the
+                       bot retrieves all status information
+        """
         self.nickname = nickname
         self.channels = channels
         self.status = status
@@ -119,6 +128,9 @@
         return bc
 
     def getAllBuilders(self):
+        """
+        @rtype: list of L{buildbot.process.builder.Builder}
+        """
         names = self.status.getBuilderNames()
         names.sort()
         builders = [self.status.getBuilder(n) for n in names]





More information about the Commits mailing list