footprints.reporting¶
Hierarchical documents to store footprints information.
StandardReport is derived from xml.dom.minidom.Document.
Functions¶
Classes¶
- class footprints.reporting.FactorizedReport(focus='class', indent=' ', ordering=((('name',), ('kind',)), (('why', 'only'), ('Missing value', 'Invalid value', 'Not in values', 'Outcast value', 'Could not reclass', 'Not a subclass', 'No value found', 'Do not match'))), renaming=(('name', 'attribute_name'),))[source]¶
Bases:
objectGenerates a report whose items are sorted using some parameters:
tagis the end-level entry that has to be sortedorderingdescribes the sorting options.
Ordering must be a list of pair (key-name, selected-values) where:
the order of the list defines the priority order for sorting
the selected-values is a tuple of values to focus on if encountered.
- class footprints.reporting.FlatReport(sortlist=None)[source]¶
Bases:
objectStore entries as simple dictionaries that could be hierarchically reshuffled afterward.
By default the report is empty.
- class footprints.reporting.FootprintLog(*args, **kw)[source]¶
Bases:
GetByTagCollect log informations to produce footprints reports.
Some class variables may have an impact on GetByTag behaviour:
_tag_default: Sets the defaulttag(if thetagattribute is omitted when calling the constructor, the_tag_defaultstring will be used._tag_implicit_new: If set toFalse, unlessnew=Trueis specified when calling the constructor, it won’t be allowed to create new objects (a RuntimeError exception will be thrown)._tag_topcls: if set toFalse, the tags list will be shared with the parent class (and possibly other siblings). Thetag_classes()class method allows to retrieve the list of Classes sharing the same list of tags
- add(**kw)[source]¶
Add an entry to the current log. One of these arguments should be provided:
collector
candidate
attribute
- reduce_to_last()[source]¶
Remove from the current log history all but the last collector resolution attempt.
- property weak¶
Boolean value, true if the log was built with weak references (default).
- class footprints.reporting.FootprintLogClass(node, parent, **kw)[source]¶
Bases:
FootprintLogEntryDedicated entry to
footprints.FootprintBaseitems.Default name is the
nodefullname method output.
- class footprints.reporting.FootprintLogCollector(node, **kw)[source]¶
Bases:
FootprintLogEntryDedicated entry to
footprints.Collectoritems.Default name is the
nodeentry keypoint.- as_flat(**kw)[source]¶
Feed a
FlatReportaccording to the order specified.
- as_tree(**kw)[source]¶
Feed a
FactorizedReportaccording to the order specified.
- class footprints.reporting.FootprintLogEntry(node, **kw)[source]¶
Bases:
objectGeneric entry item in the footprint log. Could be :
a collector item
a candidate item (i.e.: a class)
- class footprints.reporting.NullReport(*args, **kw)[source]¶
Bases:
objectFake reporting: accept any log report command but do nothing.