Skip to content

pda.History

History(
entries: 'Sequence[HistoryEntry]',
*,
project_name: 'str | None' = None,
target: 'str | None' = None,
me: 'str | None' = None,
) -> 'None'

An ordered view of the versions and tags on one or more documents.

Newest first. Iterate it, index it or call rows for the raw dictionaries; print it or display it for the drawn graph.

MethodDescription
graphThe same history drawn as lanes, one per component, as a card or as text.
mermaidThe history as a mermaid gitGraph: a branch per component, a commit per version.
svgThe same graph as a standalone SVG, for front ends that do not draw mermaid.
tableThe same history as a table, newest first: when, target, version, files, who.
targetsEvery distinct object represented, in the order they first appear.

graph(self) -> '_Graph'

The same history drawn as lanes, one per component, as a card or as text.

mermaid(self) -> 'str'

The history as a mermaid gitGraph: a branch per component, a commit per version.

Paste it into GitHub, Confluence or Notion and it is drawn there too.

svg(self) -> 'str'

The same graph as a standalone SVG, for front ends that do not draw mermaid.

table(self) -> '_Table'

The same history as a table, newest first: when, target, version, files, who.

targets(self) -> 'list[str]'

Every distinct object represented, in the order they first appear.

PropertyDescription
data_frameThe history as a pandas.DataFrame, newest first.
recordsThe entries as plain dictionaries, copied so callers cannot bruise them.
tagsOnly the tags.
versionsOnly the versions.

The history as a pandas.DataFrame, newest first.

The entries as plain dictionaries, copied so callers cannot bruise them.

Only the tags.

Only the versions.

AttributeDescription
COLUMNSBuilt-in immutable sequence.
GRAPH_COMPONENTSint([x]) -> integer
GRAPH_VERSIONSint([x]) -> integer

Built-in immutable sequence.

If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable’s items.

If the argument is a tuple, the return value is the same object.

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ’+’ or ’-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer iteral.

>>> int('0b100', base=0)
4

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating-point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ’+’ or ’-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer iteral.

>>> int('0b100', base=0)
4