Repository navigation
fix: include single-node skeletons in selective summary refresh - #10
Draft
afonsobspinto wants to merge 1 commit into
Draft
afonsobspinto wants to merge 1 commit into
afonsobspinto wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Draft for internal review before opening against upstream
catmaid/CATMAID:dev. This fix is already included infeature/new-ingestion(PR #7). This PR isolates the shared CATMAID migration and its regression test; it contains no batch-importer or provenance changes.Problem and resulting behavior
refresh_skeleton_summary_table_selectively()joins node metadata to cable lengths computed from parent-child pairs. A skeleton with only a root has no such pair, so the inner join omits it. Refreshing a selected singleton therefore cannot recreate its missing summary or correct an existing stale summary.Normal interactive creation takes a different path:
on_insert_treenode_update_summary_and_edges()handles a root by joining it to itself, creating a zero-length edge and a summary with one node. That is why creating a single-node skeleton already works while selective regeneration fails.num_nodes=1,cable_length=0, and node-derived metadata.Changes
0126_fix_single_node_selective_summaryreplaces the cable-length inner join with aLEFT JOINand usesCOALESCE(len.cable_length, 0).0076; historical migrations are not edited.Apply with
python manage.py migrate. This changes the shared PostgreSQL function; it does not add a table or automatically regenerate every project's summaries.Validation
The exact migration and regression test were previously validated on
feature/new-ingestion: all 5 skeleton-summary tests passed on isolated PostgreSQL 16/PostGIS, and migration rollback/reapplication was verified.For this isolated branch, Python syntax and
git diff --checkpass. A fresh database rerun is pending because the local Docker runtime is currently unavailable.python manage.py test catmaid.tests.test_skeleton_summary_tablesThe summary-test baseline, migration
0076, and dependency0125currently match upstreamdev. After internal review, cherry-pick this single commit onto current upstreamdev; adjust migration numbering/dependencies if upstream advances first.