Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add undo_info parameter to tabular changelog #351

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kaikue
Copy link
Contributor

@kaikue kaikue commented Sep 15, 2021

By setting undo_info=1 in calls to tabular_change_log or tabular_change_log_many, two new columns will be added to the result: is_undo and undone_by. is_undo contains undo, redo, or the empty string, depending on what type of operation it is. undone_by contains either the ID of the operation that undid it (if it has been undone), or the empty string (if not).

This parameter is set to false by default, since it is a somewhat expensive operation (in order to associate edits with their undos, it needs to loop through every edit in the dataset).

@kaikue kaikue requested a review from sdorkenw September 15, 2021 01:21
@sdorkenw
Copy link
Contributor

This looks like it works but logic like that ideally lives in the associated module (segmenthistory in this case). I think there is a way to integrate this directly into the loop through the operation entries in there:
https://github.com/seung-lab/PyChunkedGraph/blob/pcgv2/pychunkedgraph/graph/segmenthistory.py#L158
as by definition the edit and its undo are in the same lineage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants