]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Better names for doxygen-Sphinx bridge functions
authorBen Kaduk <kaduk@mit.edu>
Wed, 12 Dec 2012 18:23:03 +0000 (13:23 -0500)
committerBen Kaduk <kaduk@mit.edu>
Fri, 14 Dec 2012 16:05:43 +0000 (11:05 -0500)
It is confusing when the codepath for the production doc build
involves calling functions with names like "test".  Rename things
which are in active use so that routines which are actually only
used for testing are more discernable as such.

ticket: 7505 (new)
tags: pullup
target_version: 1.11

doc/tools/doxy.py
doc/tools/doxybuilder_funcs.py
doc/tools/doxybuilder_types.py

index c8a4b9dade017b51adcd86370627c3b30a898e60..c82f88eb7d6c92803fdf8558d9547bdc35e97f1d 100644 (file)
@@ -50,12 +50,12 @@ def processOptions():
        parser.error("Input and output directories are required")
 
     if action == "all" or action == "typedef":
-        tester = DoxyTypesTest(in_dir, out_dir)
-        tester.run_tests()
+        builder = DoxyBuilderTypes(in_dir, out_dir)
+        builder.run_all()
 
     if action == "all" or action == "func" or action == "function":
-        tester = DoxyFuncsTest(in_dir, out_dir)
-        tester.run_tests()
+        builder = DoxyBuilderFuncs(in_dir, out_dir)
+        builder.run_all()
 
 
 if __name__ == '__main__':
index c9b690185ea8291672bae5464c34cdc6e670b37d..bfcadfdf263b3ccafd4ed3cd4a6850fe78f85e29 100644 (file)
@@ -573,25 +573,22 @@ class DoxyFuncs(XML2AST):
 
 
 
-class DoxyFuncsTest(DoxyFuncs):
+class DoxyBuilderFuncs(DoxyFuncs):
     def __init__(self, xmlpath, rstpath):
-        super(DoxyFuncsTest,self).__init__(xmlpath)
+        super(DoxyBuilderFuncs,self).__init__(xmlpath)
         self.target_dir = rstpath
         outfile = '%s/%s' % (self.target_dir, 'out.txt')
         self.tmp = open(outfile, 'w')
 
-    def run_tests(self):
-        self.test_save()
-
-    def test_run(self):
-        self.run()
-
-    def test_save(self):
+    def run_all(self):
         self.run()
         templates = {'function': 'func_document.tmpl'}
         self.save(templates, self.target_dir)
 
+    def test_run(self):
+        self.run()
+
 if __name__ == '__main__':
-    tester = DoxyFuncsTest(xmlpath, rstpath)
-    tester.run_tests()
+    builder = DoxyBuilderFuncs(xmlpath, rstpath)
+    builder.run_all()
 
index 5e55391d8f1d5730790f80eb7a74ee520d48da48..0774f34e331b962928978cb9a6b2dff352ce1275 100644 (file)
@@ -326,26 +326,26 @@ class DoxyTypes(object):
 
 
 
-class DoxyTypesTest(DoxyTypes):
+class DoxyBuilderTypes(DoxyTypes):
     def __init__(self, xmlpath, rstpath):
         self.templates = { 'composite': 'type_document.tmpl'}
         self.target_dir = rstpath
 
-        super(DoxyTypesTest,self).__init__(xmlpath)
+        super(DoxyBuilderTypes,self).__init__(xmlpath)
 
-    def run_tests(self):
-        self.test_process_typedef_node()
-        self.test_process_define_node()
+    def run_all(self):
+        self.process_typedef_nodes()
+        self.process_define_nodes()
 
     def test_run(self):
         filename = 'krb5_8hin.xml'
         self.run(filename)
 
-    def test_process_variable_node(self):
+    def process_variable_nodes(self):
         filename = 'struct__krb5__octet__data.xml'
         result = self.run(filename, include=['variable'])
 
-    def test_process_typedef_node(self):
+    def process_typedef_nodes(self):
         # run parser for typedefs
         filename = 'krb5_8hin.xml'
         result = self.run(filename, include=['typedef'])
@@ -356,7 +356,7 @@ class DoxyTypesTest(DoxyTypes):
             obj = DocModel(**t)
             self.save(obj, self.templates, target_dir)
 
-    def test_process_define_node(self):
+    def process_define_nodes(self):
         # run parser for define's
         filename = 'krb5_8hin.xml'
         result = self.run(filename, include=['define'])
@@ -370,5 +370,5 @@ class DoxyTypesTest(DoxyTypes):
 
 if __name__ == '__main__':
 
-    tester = DoxyTypesTest( xml_inpath, rst_outpath)
-    tester.run_tests()
+    builder = DoxyBuilderTypes( xml_inpath, rst_outpath)
+    builder.run_all()