grapa.shared.command_recorder

@author: Romain Carron Copyright (c) 2026, Empa, Laboratory for Thin Films and Photovoltaics, Romain Carron

Classes

Action(func[, args, kwargs])

Action describes a function call: func, args, kwargs.

Command(who, redo, undo[, tag_special])

A command contains a subject, and do and undo Actions.

CommandRecorderBase([log_active])

Records commands (actions) performed on a graph, to allow undo/redo.

CommandRecorderCurve(curve)

Records operations performed on a Curve, to allow undo/redo functionality.

CommandRecorderGraph(graph[, log_active])

Decouple: CommandRecorderBase takes care of the logic, and implementation details specific to grapa in CommandRecorderGraph e.g. how to retrieve caller from description, and how to dscribe caller.

CurveGraphsReferrer()

Keeps track of Graphs containing a Curve.

SuspendCommandRecorder(command_recorder)

A context manager to temporarily suspend logging in CommandRecorder