Opened 10 years ago

Last modified 4 years ago

#356 assigned enhancement

doxygen build step

Reported by: ashcrow Owned by: ashcrow
Priority: patches-accepted Milestone: 0.9.+
Version: 0.7.12 Keywords:
Cc: ashcrow

Description

At one point I was using doxygen for documentation. While I'm not longer using it I figured the build step could be useful for others. Attached is the buildstep.

Attachments (1)

doxygen.py (1.1 KB) - added by ashcrow 10 years ago.
doxygen build step

Download all attachments as: .zip

Change History (21)

Changed 10 years ago by ashcrow

doxygen build step

comment:1 Changed 9 years ago by dustin

  • Cc ashcrow added
  • Keywords review removed

Cool -- want to write up a test and add some docs?

comment:2 Changed 9 years ago by ashcrow

Sure. I'm thinking about turning this into a start of a buildbot.steps.docs module that holds steps to generate documents. Does that sound like the correct way for organizing this type of code for this project?

comment:3 Changed 9 years ago by dustin

yes, that sounds perfect!

comment:4 Changed 9 years ago by dustin

  • Milestone changed from undecided to 0.7.10

Do you think this will be done for 0.7.10 (in the next week or so)?

comment:5 Changed 9 years ago by dustin

  • Owner set to ashcrow

comment:6 Changed 9 years ago by ashcrow

  • Status changed from new to assigned

Yeah ... the code and tests are done ... I just need to smoke test it :-)

comment:7 Changed 9 years ago by dustin

  • Milestone changed from 0.7.10 to 0.7.+

comment:8 Changed 9 years ago by bradh

What is the status on this?

comment:9 Changed 9 years ago by ashcrow

Honest status? I've been lazy.

The work is still at http://github.com/ashcrow/buildbot/tree/docsteps (just rebased to pull in the work that has happened since last update).

My main worry is that I'll finish the tests and yet there will be something large I'll forget to test or verify. Would you be willing to test out the work?

comment:10 Changed 8 years ago by bradh

I had some trouble with the unit tests. It dies with this:

[ERROR]: buildbot.test.test_docsteps                                           

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/Twisted-9.0.0-py2.6-linux-i686.egg/twisted/trial/runner.py", line 651, in loadByNames
    things.append(self.findByName(name))                                                                                      
  File "/usr/lib/python2.6/site-packages/Twisted-9.0.0-py2.6-linux-i686.egg/twisted/trial/runner.py", line 461, in findByName 
    return reflect.namedAny(name)                                                                                             
  File "/usr/lib/python2.6/site-packages/Twisted-9.0.0-py2.6-linux-i686.egg/twisted/python/reflect.py", line 462, in namedAny 
    topLevelPackage = _importAndCheckStack(trialname)                                                                         
  File "/usr/lib/python2.6/site-packages/buildbot-latest-py2.6.egg/buildbot/test/test_docsteps.py", line 8, in <module>       
    from buildbot.steps import docs                                                                                           
exceptions.ImportError: cannot import name docs  

My workaround (I'm not sure it qualifies as a "fix") was to do this:

index ff2d9dc..f883387 100644
--- a/buildbot/test/test_docsteps.py
+++ b/buildbot/test/test_docsteps.py
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 #-*- test-case-name: buildbot.test.test_docsteps -*-


@@ -5,8 +6,7 @@ import os

 from twisted.trial import unittest

-from buildbot.steps import docs
-from buildbot.steps.docs import errors
+from buildbot.steps.docs import DocStep, DocCommandStep, errors
 from buildbot.steps.docs.doxygen import Doxygen
 from buildbot.steps.docs.epydoc import Epydoc

@@ -20,7 +20,7 @@ class DocStepTest(unittest.TestCase):
         """
         Setup the test.
         """
-        self.ds = docs.DocStep()
+        self.ds = DocStep()

     def testCheckForBinary(self):
         """
@@ -68,16 +68,16 @@ class DocCommandStepTest(unittest.TestCase):
         Verifies that construction works and fails when it should.
         """
         # Successes
-        docs.DocCommandStep('.')
-        docs.DocCommandStep('/some/fake/path', ignore_missing_bin=True)
+        DocCommandStep('.')
+        DocCommandStep('/some/fake/path', ignore_missing_bin=True)

         # Failures
         self.assertRaises(errors.NoDocumentationBinaryError,
-            docs.DocCommandStep, '')
+            DocCommandStep, '')
         self.assertRaises(errors.NoDocumentationBinaryError,
-            docs.DocCommandStep, 'sdfsfd')
+            DocCommandStep, 'sdfsfd')
         self.assertRaises(errors.NoDocumentationBinaryError,
-            docs.DocCommandStep, 'test_docsteps.py')
+            DocCommandStep, 'test_docsteps.py')


 class DoxygenTest(unittest.TestCase):

comment:11 Changed 8 years ago by bradh

  • Version changed from 0.7.9 to 0.7.12

The next problem I ran across was that the documentation steps aren't available once buildbot is installed.

Fix for that:

index 61748a6..fdbc95e 100644
--- a/setup.py
+++ b/setup.py
@@ -188,6 +188,7 @@ setup_args = {
               "buildbot.status", "buildbot.status.web",
               "buildbot.changes",
               "buildbot.steps",
+              "buildbot.steps.docs",
               "buildbot.steps.package",
               "buildbot.steps.package.rpm",
               "buildbot.process"

comment:12 Changed 8 years ago by bradh

I'm able to run the Doxygen step ok, but I can't manage to set the config filename to something other than the default. I tried writing a test case for it, and the testcase passes.

@@ -109,12 +109,15 @@ class DoxygenTest(unittest.TestCase):
             raise unittest.SkipTest('doxygen not installed')
         dn2_bin = '/some/fake/path/doxygen'
         dn2 = Doxygen(dn2_bin, ignore_missing_bin=True)
         self.assertEquals(['/usr/bin/doxygen', 'config.doxy', '*'], dn.command)
         self.assertEquals([dn2_bin, 'config.doxy', '*'], dn2.command)
         # Failures
         self.assertRaises(errors.NoDocumentationBinaryError, Doxygen, 'asdasd')

+    def testAlternateConfigFile(self):
+        dn = Doxygen(config="myConfigFileName")
+        self.assertEquals(dn.command, ['/usr/bin/doxygen', 'myConfigFileName', '*'])

 class EpydocTest(unittest.TestCase):
     """

However the remote command still uses config.doxy. I'm stumped by this one.

comment:13 Changed 8 years ago by ashcrow

Thanks! I'm taking a look at this right now and will apply the patches (if they are not applied already).

comment:14 Changed 8 years ago by ashcrow

Added your patches in my branch ...

commit 57b849bb51e328867d87cc113fc7b9799961249b
Author: Steve 'Ashcrow' Milner <stevem@gnulinux.net>
Date:   Sun Jan 3 14:41:12 2010 -0500

    Added work done by bradh in ticket #356

comment:15 Changed 8 years ago by ashcrow

Verified that for some reason config.doxy is sticking as the config name even when a config file is specified. I'm looking to see why.

comment:16 Changed 8 years ago by ashcrow

So far the best I can come up with is that the modified command is being overwritten before startCommand. I did some tracing and found that it's setting the proper information ... but it seems to be recreated at build time with defaults -- trying to figure out why ...

comment:17 Changed 8 years ago by ashcrow

I did a bit more work and pushed to my branch -- though I have not figured out where in the ShellCommand? the constructor input is being overwritten.

comment:18 Changed 8 years ago by dustin

What's the latest status on this? Can we do it in 0.8.1?

comment:19 Changed 5 years ago by dustin

  • Priority changed from minor to patches-accepted

comment:20 Changed 4 years ago by dustin

  • Milestone changed from 0.8.+ to 0.9.+

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.