ccpnmodel.ccpncore.memops.scripts.docgen package

Submodules

ccpnmodel.ccpncore.memops.scripts.docgen.ApiDocGen module

Module Documentation here

class ccpnmodel.ccpncore.memops.scripts.docgen.ApiDocGen.ApiDocGen[source]

Bases: ccpnmodel.ccpncore.memops.scripts.docgen.Documentation.Documentation, ccpnmodel.ccpncore.memops.metamodel.ModelTraverse.ModelTraverse

apiFileDir = 'static'
attributeMapPrefix = 'attributeMap'
classMapPrefix = 'classMap'
detailDiagExt = '-details'
determineAllAbstractDataTypes(package, allAbstractDataTypes)[source]
determineAllAttrRoles(package, allAttrRoles)[source]
determineAllMethods(package, allMethods)[source]
diagFileExt = '_Diag.gif'
diagImgDir = 'apidiagram'
directoryFromTop(element, ignoreElemType=False)[source]

Generate directory name relative to top directory of an element

draftDocString = '\nDRAFT - backward compatibility of future versions not guaranteed.<br>\n'
elemHasOwnDirectory(elem)[source]

whether element’s HTML page is in own directory or in container’s directory

fileFromTop(element)[source]
getClassAttrMethods(complexDataType, methods)[source]
getClassClassMethods(complexDataType, methods)[source]
getClassLinkAttrMethods(complexDataType, methods)[source]
getClassNewMethods(complexDataType, methods)[source]
getClassOtherMethods(complexDataType, methods)[source]
getClassPageMethods(complexDataType, method)[source]
getDiagramFileName(elem, isAbsolute)[source]

Get the path for the diagram documentation for given element

getDiagramOrderedPackages()[source]

return packages ordered depth-first for use in left bar of diagram pages

getElemDocString(elem)[source]
getElemMethods(elem)[source]

return methods listed on attribute page

getElemTypeString(elem)[source]

get attribute type string (string or link) for HTML

getElementPathList(element)[source]
getKeywordValueString(method)[source]
getLinkInfo(fromElem, toElem)[source]

return tuple of relName, relDirectory. see code for details

getMandatoryElements(elem)[source]

get list of mandatory element names All elements with locard == hicard are mandatory

getMethodParameters(method)[source]
getMethodReturn(method)[source]
getMultiplicity(obj)[source]

get multiplicity string from object with a locard and hicard

getNewParamString(method)[source]
getObjDocDirName(metaObj)[source]
getObjDocFileName(metaObj, absoluteName=True, addSuffix=False)[source]

Get filename for metaObj If absoluteName is True the file name is absolute otherwise it is relative to the relevant baseDir

getParamString(parameter)[source]
getParentString(clazz)[source]

get string with parent class name

getPrevNextPackages(package)[source]
helpPrefix = 'help'
imageDir = 'doc/graphics'
indexPrefix = '_index'
licensePrefix = 'license'
methodHasOwnPage(method)[source]
methodMapPrefix = 'methodMap'
pathToTop(element, isDiagram=False, upDir=0)[source]

return relative directory path from a given element to the top directory

processBranchPackage(package)[source]

processing actions for branch package

processLeafPackage(package)[source]

processing actions for leaf package

sortAttrMethods(methods)[source]
sortClassMethods(methods)[source]
topApiPrefix = 'api'
upDir(n=1)[source]
writeAppendix(complexDataType)[source]
writeAttrDocumentation(elem, prev, foll)[source]
writeAttributeMap(root)[source]
writeAttributePage(elem)[source]
writeAttributeTable(clazz, kind)[source]
writeBasicHeader(elem, title, isDiagram)[source]
writeBranchPackage(package)[source]

write code for non-Root branch packages

writeBranchPackageDiagram(package)[source]

write code for diagram for non-root branch packages

writeClass(clazz)[source]
writeClassDocumentation(clazz, prev, foll)[source]
writeClassMap(root)[source]
writeCommonNavigatorBar(elem=None, isDiagram=False)[source]
writeConstructorRows(clazz, mandatoryElements)[source]
writeDataObjType(dataObjType)[source]
writeDataObjTypeDocumentation(dataObjType, prev, foll)[source]
writeDataType(dataType)[source]
writeDataTypeDocumentation(dataType, prev, foll)[source]
writeDiagramDocumentation(package)[source]
writeDiagramElementHeader(package=None, special=None)[source]
writeDiagramHelp()[source]
writeDiagramLeftBar(package=None, topPath='')[source]

write bar at left for diagram pages

writeDiagramLicense()[source]
writeDiagramNavigatorBar(package=None, special=None)[source]

write javastyle navigator bar for diagrams

writeDoubleColPage(heading, root, elems)[source]
writeElementComment(elem)[source]
writeElementHeader(elem, title, prev=None, foll=None, special=None)[source]
writeInheritanceDiagram(complexDataType)[source]
writeLeafPackage(package)[source]

write code for leaf packages

writeLeafPackageDiagram(package)[source]

write code for diagram for leaf branch packages

writeLeafPackageTagDiagram(package, tag, diagramTags)[source]
writeMethodDocumentation(elem, prev, foll)[source]
writeMethodMap(root)[source]
writeMethodPage(elem)[source]
writeMethodTables(complexDataType)[source]
writeNavigatorBar(elem, prev=None, foll=None, special=None)[source]

write javastyle navigator bar

The exact look is adjusted depending on the type of elem. prev and foll are objects pointed to by the ‘previous’ and ‘foll’ links, and should be of appropriate type.

writeObjectFooter(obj=None)[source]
writePackageGuid(package)[source]
writePageDocString(elem)[source]
writePageHeading(elem, title)[source]
writeRootPackage(root)[source]

write code for Root package

writeRootPackageDiagram(package)[source]

write code for diagram for root package

ccpnmodel.ccpncore.memops.scripts.docgen.Documentation module

Module Documentation here

class ccpnmodel.ccpncore.memops.scripts.docgen.Documentation.Documentation[source]

Bases: ccpnmodel.ccpncore.memops.metamodel.TextWriter.TextWriter

color1 = '#F0CC99'
color2 = '#794E83'
getAnchorLinkString(link, message='', **attrs)[source]
getAttrString(**attrs)[source]
getBreakString(n=1)[source]
getEmphasisString(emphasisString)[source]
getHeadingString(heading, level)[source]
getImageString(**attrs)[source]
getItalicString(italicString)[source]
getLinkString(link, message, **attrs)[source]
getNonBreakingSpaces(n=1)[source]
getSmallString(smallString)[source]
getStrongString(strongString)[source]
getStyleString(styleString='', **styleAttrs)[source]
normaliseString(ss)[source]

convert documentation from string to XML-ready string.

styleSheetFile = 'htmldoc.css'
writeBreak(n=1)[source]
writeCell(cellString='', **cellAttrs)[source]
writeDiagramHelpContent()[source]
writeEmphasisString(emphasisString)[source]
writeEndCell()[source]
writeEndCenter()[source]
writeEndDiv()[source]
writeEndIndent()[source]
writeEndParagraph()[source]
writeEndRow()[source]
writeEndSection()[source]
writeEndStyle()[source]
writeEndTable()[source]
writeFooter(dataModelVersion=None, releaseVersion=None, scriptName=None, objName=None)[source]
writeGnuLicense()[source]
writeHeader(scriptName=None, headerComment=None, title=None, styleSheetDir=None)[source]
writeHeading(heading, level)[source]
writeHorizontalLine()[source]
writeNonBreakingSpaces(n=1)[source]
writeStartCell(**cellAttrs)[source]
writeStartCenter(**centerAttrs)[source]
writeStartDiv(**divAttrs)[source]
writeStartIndent()[source]
writeStartParagraph(**paragraphAttrs)[source]
writeStartRow(**rowAttrs)[source]
writeStartSection(**sectionAttrs)[source]
writeStartStyle(**styleAttrs)[source]
writeStartTable(**tableAttrs)[source]
writeStrongString(strongString)[source]
writeStyleString(styleString='', **styleAttrs)[source]
writeVerticalBar()[source]

ccpnmodel.ccpncore.memops.scripts.docgen.PyApiDocGen module

Module Documentation here

class ccpnmodel.ccpncore.memops.scripts.docgen.PyApiDocGen.PyApiDocGen(**kw)[source]

Bases: ccpnmodel.ccpncore.memops.scripts.docgen.ApiDocGen.ApiDocGen

apiName = 'Python API'
getClassPageMethods(complexDataType, methods)[source]
getKeywordValueString(method)[source]
getMethodReturn(method)[source]
getNewParamString(method)[source]
getParamCardString(parameter)[source]
getParamString(parameter)[source]
writeConstructorRows(complexDataType, mandatoryElements)[source]
ccpnmodel.ccpncore.memops.scripts.docgen.PyApiDocGen.writeApiDoc(modelPortal, rootFileName=None, rootDirName=None, releaseVersion=None, **kw)[source]

write Python API documentation

Only function that should be called directly by ‘make’ scripts etc.