Skip to content

Conversation

@TeunHuijben
Copy link
Collaborator

replaced nx in conftest and worked on test regarding adding/deleting nodes/edges

@TeunHuijben TeunHuijben marked this pull request as draft December 5, 2025 21:03
@cmalinmayor cmalinmayor changed the base branch from main to v2-dev December 12, 2025 20:25
@codecov
Copy link

codecov bot commented Dec 18, 2025

Codecov Report

❌ Patch coverage is 92.64706% with 45 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (v2-dev@4958ae7). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/funtracks/utils/tracksdata_utils.py 92.93% 19 Missing ⚠️
src/funtracks/actions/add_delete_node.py 74.57% 15 Missing ⚠️
src/funtracks/import_export/_tracks_builder.py 89.09% 6 Missing ⚠️
src/funtracks/data_model/tracks.py 95.09% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             v2-dev     #126   +/-   ##
=========================================
  Coverage          ?   92.28%           
=========================================
  Files             ?       50           
  Lines             ?     2721           
  Branches          ?        0           
=========================================
  Hits              ?     2511           
  Misses            ?      210           
  Partials          ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cmalinmayor
Copy link
Contributor

all tests passing!

🎉 wohoo! 🎉

@TeunHuijben TeunHuijben marked this pull request as ready for review January 8, 2026 22:35
@TeunHuijben
Copy link
Collaborator Author

PASSING! ✅🥳

@cmalinmayor, feel free to review the code and ask any questions regarding the many many changes necessary to make the backend tracksdata compatible :)

Copy link
Contributor

@cmalinmayor cmalinmayor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not even close to done but the annotators action update I mentioned probably applies to other actions so I submit these now.

Copy link
Contributor

@cmalinmayor cmalinmayor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still didn't go through the tests thoroughly but lots of code comments to be getting on with! :)

"""
lineages = nx.weakly_connected_components(self.tracks.graph)
max_id, ids_to_nodes = self._assign_ids(lineages, self.lineage_key)
lineages_internal = rx.weakly_connected_components(self.tracks.graph.rx_graph)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole section probably should be refactored to work better with the trackdata API. The internal external IDs seems fragile - this is a place where if we used tracksdata with SQL vs with rustworkx backend it would be a different implementation, right? Also, the _assign_ids helper could be refactored to do the efficient bulk update and then used for both lineage and track ids. There might be a better way to get the tracklet IDs that would eliminate the need for graph copying too.

self.actions.append(
UpdateNodeSeg(tracks, new_value, all_pixels, added=True)
)
tracks.graph[new_value][tracks.features.tracklet_key] = current_track_id
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm this should be handled by the tracksAnnotator, right? I'm less confident this time but I'm suspicious. I can look closer later if needed

assert np.array_equal(mask1.mask, mask2.mask)


def compute_node_attrs_from_masks(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh I think this is what the update function in the Annotators should do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants