Skip to content

Create the annotator class for computing and updating graph features#87

Merged
cmalinmayor merged 25 commits into2-feature-infrastructurefrom
17-annotator-class
Oct 20, 2025
Merged

Create the annotator class for computing and updating graph features#87
cmalinmayor merged 25 commits into2-feature-infrastructurefrom
17-annotator-class

Conversation

@cmalinmayor
Copy link
Copy Markdown
Contributor

@cmalinmayor cmalinmayor commented Sep 24, 2025

Closes #17

cmalinmayor and others added 11 commits July 13, 2025 12:17
I kept the implementation very minimal, but when we see what code is duplicated between implementations we can add it to the base class (e.g. setting the feature values, checking if features are present).
I changed the signature of the base annotator to take the Tracks at initialization (since we need to know if it's 2d or 3d to determine valid features). I also changed the signature of compute and update to not take the Tracks, and to compute for all features. We still need to find a way to let the user pick which regionprops features to compute, test them more thoroughly, and see if the API makes sense for other Annotators.
This does not necessarily include all features (intensity, num_pixels are missing), but it solidifies an API that covers all our use cases. The API may be streamlined when other annotators are implemented and when we incorporate it into the workflow.
Includes rewriting some of the geff export code to handle features better
Also creates the annotator module to avoid circular dependencies
@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 24, 2025

Codecov Report

❌ Patch coverage is 97.63441% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.37%. Comparing base (0a116df) to head (2e708b4).
⚠️ Report is 21 commits behind head on 2-feature-infrastructure.

Files with missing lines Patch % Lines
src/funtracks/data_model/tracks.py 88.88% 4 Missing ⚠️
src/funtracks/annotators/_track_annotator.py 96.00% 3 Missing ⚠️
src/funtracks/annotators/_graph_annotator.py 96.42% 1 Missing ⚠️
src/funtracks/annotators/_regionprops_annotator.py 98.50% 1 Missing ⚠️
src/funtracks/data_model/tracks_controller.py 0.00% 1 Missing ⚠️
src/funtracks/features/regionprops_extended.py 98.46% 1 Missing ⚠️
Additional details and impacted files
@@                     Coverage Diff                      @@
##           2-feature-infrastructure      #87      +/-   ##
============================================================
+ Coverage                     89.00%   91.37%   +2.36%     
============================================================
  Files                            25       35      +10     
  Lines                          1128     1554     +426     
============================================================
+ Hits                           1004     1420     +416     
- Misses                          124      134      +10     

☔ 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
Copy Markdown
Contributor Author

@AnniekStok Feedback welcome of course, but I'm mostly pinging so you see what the changes are and start to get familiar.

@cmalinmayor cmalinmayor merged commit b3b9dde into 2-feature-infrastructure Oct 20, 2025
0 of 13 checks passed
@cmalinmayor cmalinmayor deleted the 17-annotator-class branch October 20, 2025 17:44
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