Skip to content

feat: enable stale annotation cleanup during db import#642

Merged
PALLAVIKHEDLE merged 1 commit intomainfrom
PALLAVIKHEDLE/enable-stale-annotation-cleanup
Apr 1, 2026
Merged

feat: enable stale annotation cleanup during db import#642
PALLAVIKHEDLE merged 1 commit intomainfrom
PALLAVIKHEDLE/enable-stale-annotation-cleanup

Conversation

@PALLAVIKHEDLE
Copy link
Copy Markdown
Contributor

@PALLAVIKHEDLE PALLAVIKHEDLE commented Apr 1, 2026

Summary

  • Enable stale annotation cleanup by setting clean_up_siblings = True on AnnotationImporter and implementing get_filters() to scope cleanup by tomogram_voxel_spacing_id.
  • Add StaleAnnotationDeletionDBImporter class (already referenced by StaleVoxelSpacingDeletionDBImporter but was missing).
  • Fix and unskip test_import_annotations_files_removes_stale test, and update populate_stale_annotations fixture to include tomogram_voxel_spacing_id.

Context

Previously, stale annotation cleanup was disabled because annotations were only associate with runs, but the importer searched for annotations within a voxel spacing. Now that tomogram_voxel_spacing_id has been added (#641), we can safely filter annotations by voxel spacing and clean up stale ones.

@PALLAVIKHEDLE PALLAVIKHEDLE requested a review from uermel April 1, 2026 17:09
@PALLAVIKHEDLE PALLAVIKHEDLE merged commit 2d653cc into main Apr 1, 2026
9 checks passed
@PALLAVIKHEDLE PALLAVIKHEDLE deleted the PALLAVIKHEDLE/enable-stale-annotation-cleanup branch April 1, 2026 19:21
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