Update of /cvsroot/happydoc/HappyDoc/happydoclib/docset
In directory usw-pr-cvs1:/tmp/cvs-serv18732/happydoclib/docset
Modified Files:
docset_MultipleFile.py
Log Message:
Improved fix for -d bug (#513850).
Index: docset_MultipleFile.py
===================================================================
RCS file: /cvsroot/happydoc/HappyDoc/happydoclib/docset/docset_MultipleFile.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** docset_MultipleFile.py 4 Aug 2002 12:05:06 -0000 1.6
--- docset_MultipleFile.py 24 Aug 2002 19:50:06 -0000 1.7
***************
*** 99,108 ****
def write(self):
"Write the documentation set to the output."
! self.statusMessage('Beginning to write...')
#
# Get the name of and open the docset root file
#
self._root_name = self.getFullOutputNameForObject(None)
self._root_node = self.openOutput( self._root_name, self._title, '' )
#
# Get the description for the docset from the
--- 99,111 ----
def write(self):
"Write the documentation set to the output."
! happydoclib.TRACE.into('MultiFileDocSet', 'write')
! self.statusMessage('Beginning to write %s...' % self.getName())
#
# Get the name of and open the docset root file
#
self._root_name = self.getFullOutputNameForObject(None)
+ happydoclib.TRACE.writeVar(root_name=self._root_name)
self._root_node = self.openOutput( self._root_name, self._title, '' )
+ happydoclib.TRACE.writeVar(root_node=self._root_node)
#
# Get the description for the docset from the
***************
*** 122,125 ****
--- 125,129 ----
#
self.close()
+ happydoclib.TRACE.outof()
return
***************
*** 154,169 ****
#
for x in items:
! happydoclib.TRACE.into('', 'loop', x=x)
node_name = x[0]
happydoclib.TRACE.writeVar(node_name=node_name)
dir_name = happydoclib.path.dirname(x[1].getFilename())
happydoclib.TRACE.writeVar(dir_name=dir_name)
if removePrefix:
happydoclib.TRACE.write('removing prefix')
dir_name = happydoclib.path.removeRelativePrefix( dir_name )
file_name = x[1].getFilename()
happydoclib.TRACE.writeVar(file_name=file_name)
rec = (dir_name, file_name, node_name)
subnode_ids.append(rec)
happydoclib.TRACE.outof(rec)
#
--- 158,180 ----
#
for x in items:
! happydoclib.TRACE.into('inputDict.items()', 'loop', x=x)
!
node_name = x[0]
happydoclib.TRACE.writeVar(node_name=node_name)
+
dir_name = happydoclib.path.dirname(x[1].getFilename())
happydoclib.TRACE.writeVar(dir_name=dir_name)
+
if removePrefix:
happydoclib.TRACE.write('removing prefix')
dir_name = happydoclib.path.removeRelativePrefix( dir_name )
+ happydoclib.TRACE.writeVar(dir_name=dir_name)
+
file_name = x[1].getFilename()
happydoclib.TRACE.writeVar(file_name=file_name)
+
rec = (dir_name, file_name, node_name)
subnode_ids.append(rec)
+
happydoclib.TRACE.outof(rec)
#
***************
*** 172,185 ****
#
for dir_name, file_name, subnode_name in subnode_ids:
! happydoclib.TRACE.writeVar(dir_name=dir_name)
! happydoclib.TRACE.writeVar(file_name=file_name)
! happydoclib.TRACE.writeVar(subnode_name=subnode_name)
! #print 'DIR : %s' % dir_name
! #print 'FILE : %s' % file_name
! #print 'NODE : %s' % subnode_name
! #print
l = outputDict.get(dir_name, [])
l.append( (file_name, subnode_name, inputDict) )
outputDict[dir_name] = l
happydoclib.TRACE.outof()
return
--- 183,195 ----
#
for dir_name, file_name, subnode_name in subnode_ids:
! happydoclib.TRACE.into('subnode_ids', 'loop',
! dir_name=dir_name,
! file_name=file_name,
! subnode_name=subnode_name)
l = outputDict.get(dir_name, [])
l.append( (file_name, subnode_name, inputDict) )
outputDict[dir_name] = l
+ happydoclib.TRACE.outof()
+
happydoclib.TRACE.outof()
return
***************
*** 188,191 ****
--- 198,202 ----
"Output the TOC."
happydoclib.TRACE.into('MultiFileDocSet', '_writeTOC')
+ happydoclib.TRACE.writeVar(docset_name=self.getName())
self.statusMessage()
self.statusMessage('Writing table of contents...')
***************
*** 203,206 ****
--- 214,218 ----
self._organizeSubNodesByDir(subnodes_by_dir, self._all_modules, removePrefix=1)
self._organizeSubNodesByDir(subnodes_by_dir, self._all_packages, removePrefix=0)
+ happydoclib.TRACE.writeVar(subnodes_by_dir=subnodes_by_dir)
#
***************
*** 215,219 ****
for dir_name in dirs:
! happydoclib.TRACE.into('', '', directory=dir_name)
relative_dir_name = happydoclib.path.removeRelativePrefix(dir_name)
#
--- 227,231 ----
for dir_name in dirs:
! happydoclib.TRACE.into('dirs', 'loop', directory=dir_name)
relative_dir_name = happydoclib.path.removeRelativePrefix(dir_name)
#
***************
*** 261,266 ****
--- 273,285 ----
subnode_set.sort(lambda x, y: cmp(x[1], y[1]))
for file_name, subnode_name, subnode_dict in subnode_set:
+ happydoclib.TRACE.into('subnode_set', 'loop',
+ file_name=file_name,
+ subnode_name=subnode_name,
+ subnode_dict=subnode_dict,
+ )
+
subnode = subnode_dict[subnode_name]
self.statusMessage('\tAdding %s to TOC' % subnode_name, 2)
+
#
# Build a reference to the documentation for the subnode
***************
*** 268,273 ****
--- 287,294 ----
#
new_ref = subnode.getReference(formatter, self._root_node)
+
happydoclib.TRACE.writeVar(root_node_name=self._root_node.name)
happydoclib.TRACE.writeVar(new_ref=new_ref)
+
if hasattr( subnode, 'getFullOutputNameForObject' ):
happydoclib.TRACE.write('using getFullOutputNameForObject')
***************
*** 281,284 ****
--- 302,306 ----
self._root_name,
)
+
happydoclib.TRACE.writeVar(ref=ref)
subnode_summary, subnode_format = subnode.getSummaryAndFormat()
***************
*** 289,294 ****
--- 311,320 ----
subnode_format,
)
+
+ happydoclib.TRACE.outof()
+
formatter.descriptiveListFooter(self._root_node)
happydoclib.TRACE.outof()
+
#
# Close the Modules section
***************
*** 381,385 ****
def _describeClassInModuleNode(self, output, class_output_file_name, class_info):
! ref = self._formatter.getReference(class_info, class_output_file_name)
class_info_summary, class_info_format = class_info.getSummaryAndFormat()
self._formatter.descriptiveListItem( output,
--- 407,417 ----
def _describeClassInModuleNode(self, output, class_output_file_name, class_info):
! happydoclib.TRACE.into('', '_describeClassInModuleNode',
! output=output,
! class_output_file_name=class_output_file_name,
! class_info=class_info,
! )
! #ref = self._formatter.getReference(class_info, class_output_file_name)
! ref = self._formatter.getReference(class_info, output.name)
class_info_summary, class_info_format = class_info.getSummaryAndFormat()
self._formatter.descriptiveListItem( output,
***************
*** 388,391 ****
--- 420,424 ----
class_info_format,
)
+ happydoclib.TRACE.outof()
return
***************
*** 531,536 ****
--- 564,571 ----
class_names.sort()
for class_name in class_names:
+ happydoclib.TRACE.into('class_names', 'loop', class_name=class_name)
c = module.getClassInfo(class_name)
class_output_name = self.getFullOutputNameForObject(c)
+ happydoclib.TRACE.writeVar(class_output_name=class_output_name)
self._describeClassInModuleNode(output, class_output_name , c)
class_output = self.openOutput(class_output_name,
***************
*** 539,542 ****
--- 574,578 ----
self._writeClass( module, class_name, class_output )
self.closeOutput(class_output)
+ happydoclib.TRACE.outof()
formatter.descriptiveListFooter(output)
formatter.sectionFooter( output )
***************
*** 583,586 ****
--- 619,627 ----
def _writeClass(self, parent, class_name, output):
"Output the documentation for the class in the parent object."
+ happydoclib.TRACE.into('MultiFileDocSet', '_writeClass',
+ parent=parent,
+ class_name=class_name,
+ output=output,
+ )
class_info = parent.getClassInfo(class_name)
formatter = self._formatter
***************
*** 594,597 ****
--- 635,639 ----
#
base_classes = self._filterNames(class_info.getBaseClassNames())
+ happydoclib.TRACE.writeVar(base_classes=base_classes)
if base_classes:
formatter.pushSectionLevel(output)
***************
*** 628,631 ****
--- 670,674 ----
output)
formatter.sectionFooter(output)
+
#
# Finish that indented level.
***************
*** 634,637 ****
--- 677,682 ----
formatter.popSectionLevel(output)
formatter.comment('END: Class %s' % class_name, output)
+
+ happydoclib.TRACE.outof()
return
***************
*** 811,816 ****
inputModuleNames=[ filename ],
outputBaseDirectory=self.output_dir,
descriptionFilename='-',
- #descriptionFilename='README.txt',
)
info_obj = docset[0]
--- 856,861 ----
inputModuleNames=[ filename ],
outputBaseDirectory=self.output_dir,
+ docsetBaseDirectory=os.path.join(self.output_dir, 'TestCases'),
descriptionFilename='-',
)
info_obj = docset[0]
***************
*** 818,827 ****
expected_output_name = os.path.join(self.output_dir,
'TestCases',
! 'test.py.html')
self.failUnlessEqual(
actual_output_name, expected_output_name,
! 'Outputs do not match:\n %s\nvs.\n %s' % (actual_output_name,
! expected_output_name,
! )
)
return
--- 863,875 ----
expected_output_name = os.path.join(self.output_dir,
'TestCases',
! 'test.html')
self.failUnlessEqual(
actual_output_name, expected_output_name,
! ('Outputs do not match:\n'
! 'Got: %s\n'
! 'Expected: %s' % (actual_output_name,
! expected_output_name,
! )
! )
)
return
|