EditLog

class photonforge.pda.EditLog(edits, *, target=None, project_name=None, only_changes=False, local=None, defaults=None, context=None, kind=None)[source]

The chain behind one document, oldest first.

Iterate it, index it, or read rows for plain dictionaries. Print it or display it for the table. It is falsy when empty, so if project.changed_since(...) reads the way you would say it.

Methods

count(value)

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

Raises ValueError if the value is not present.

values_of(path)

Every value at path, in order, including overwritten ones.

Attributes

COLUMNS

data_frame

one row per changed field, oldest first.

effective

Only the edits that moved something reported.

records

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

Parameters:
  • edits (Sequence[Edit])

  • target (str | None)

  • project_name (str | None)

  • only_changes (bool)

  • local (str | None)

  • defaults (Mapping[str, object] | None)

  • context (str | None)

  • kind (str | None)

property data_frame

one row per changed field, oldest first.

Type:

The log as a pandas.DataFrame

property effective: EditLog

Only the edits that moved something reported.

property records: list[dict]

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

values_of(path)[source]

Every value at path, in order, including overwritten ones.

Parameters:

path (str)

Return type:

list