Skip to content

removing segment_ends function - #2135

Merged
nfahlgren merged 7 commits into
morphology-class-analysis-functionsfrom
mophology-remove-segment-ends
Nov 19, 2026
Merged

nfahlgren merged 7 commits into
morphology-class-analysis-functionsfrom
mophology-remove-segment-ends

Conversation

@joshqsumner

@joshqsumner joshqsumner commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes
Removes segment_ends function from morphology

Type of update
This is refactoring

Associated issues
Part of #2097

Additional context
Merge after morpholoyg analysis functions PR #2129

For the reviewer
See this page for instructions on how to review the pull request.

  • PR functionality reviewed in a Jupyter Notebook
  • All tests pass
  • Test coverage remains 100%
  • Documentation tested
  • New documentation pages added to plantcv/mkdocs.yml
  • Changes to function input/output signatures added to updating.md
  • Code reviewed
  • PR approved

@joshqsumner
joshqsumner added this pull request to stack #2134 November 6, 2026 17:01
@joshqsumner joshqsumner added the work in progress Mark work in progress label Nov 6, 2026
@deepsource-io

deepsource-io Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 4ea4220...762b08b on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Coverage  

Code Review Summary

Analyzer Status Updated (UTC) Details
Python Nov 18, 2026 8:43p.m. Review ↗
Code coverage Nov 18, 2026 8:47p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@joshqsumner joshqsumner mentioned this pull request Nov 6, 2026
8 tasks done
@joshqsumner joshqsumner added ready to review merge in order Set of PRs that need to be merged sequentially and removed work in progress Mark work in progress labels Nov 9, 2026
@joshqsumner
joshqsumner force-pushed the mophology-remove-segment-ends branch 3 times, most recently from b25e48b to 872a3ec Compare November 13, 2026 15:47
@nfahlgren
nfahlgren force-pushed the mophology-remove-segment-ends branch from 872a3ec to 8d15c03 Compare November 14, 2026 03:29
@nfahlgren
nfahlgren force-pushed the mophology-remove-segment-ends branch 2 times, most recently from 105fa73 to e78e6e6 Compare November 14, 2026 17:22
@nfahlgren
nfahlgren force-pushed the mophology-remove-segment-ends branch from e78e6e6 to fa80637 Compare November 15, 2026 14:09
@joshqsumner
joshqsumner force-pushed the mophology-remove-segment-ends branch 4 times, most recently from c8134e6 to a561304 Compare November 17, 2026 15:27
@nfahlgren
nfahlgren force-pushed the mophology-remove-segment-ends branch 4 times, most recently from 0499f33 to fbc7b57 Compare November 17, 2026 23:26
@nfahlgren nfahlgren added this to the PlantCV v5.0 milestone Nov 17, 2026

@nfahlgren nfahlgren left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I might be missing it somewhere but there is functionality lost by deleting segment_ends as is. Lines 45-51 resort the order of the leaves based on the branch point y-axis coordinate and that functionality is not in the _find_branch_pts helper.

@nfahlgren
nfahlgren force-pushed the mophology-remove-segment-ends branch from fbc7b57 to b1f5870 Compare November 18, 2026 02:24
@joshqsumner

Copy link
Copy Markdown
Contributor Author

I might be missing it somewhere but there is functionality lost by deleting segment_ends as is. Lines 45-51 resort the order of the leaves based on the branch point y-axis coordinate and that functionality is not in the _find_branch_pts helper.

Good catch, this should be addressed now.

The solution I put in does run the _find_segment_ends function on leaf objects which removes a pixel from each side and removes the "unpaired" segments if there are any.

@nfahlgren
nfahlgren force-pushed the mophology-remove-segment-ends branch 2 times, most recently from ca1a158 to 762b08b Compare November 18, 2026 20:42
@nfahlgren
nfahlgren merged commit d58c45c into v5.0 Nov 19, 2026
11 checks passed
@nfahlgren
nfahlgren deleted the mophology-remove-segment-ends branch November 19, 2026 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge in order Set of PRs that need to be merged sequentially ready to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants