History

class photonforge.pda.History(entries, *, project_name=None, target=None, me=None)[source]

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.

Methods

count(value)

graph()

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

index(value, [start, [stop]])

Raises ValueError if the value is not present.

mermaid()

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

svg()

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

table()

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

targets()

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

Attributes

COLUMNS

GRAPH_COMPONENTS

GRAPH_VERSIONS

Versions and components drawn in the graph; .table() lists every one.

data_frame

The history as a pandas.DataFrame, newest first.

records

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

tags

Only the tags.

versions

Only the versions.

Parameters:
  • entries (Sequence[HistoryEntry])

  • project_name (str | None)

  • target (str | None)

  • me (str | None)

GRAPH_VERSIONS = 40

Versions and components drawn in the graph; .table() lists every one.

property data_frame

The history as a pandas.DataFrame, newest first.

graph()[source]

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

Return type:

_Graph

mermaid()[source]

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.

Return type:

str

property records: list[dict]

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

svg()[source]

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

Return type:

str

table()[source]

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

Return type:

_Table

property tags: History

Only the tags.

targets()[source]

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

Return type:

list[str]

property versions: History

Only the versions.