Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce complexity and add helpers to morphology.segment_insertion_angle #1671

Closed
wants to merge 47 commits into from

Conversation

HaleySchuhl
Copy link
Contributor

Describe your changes
Add helper functions to pcv.morphology.segment_insertion_angle

Type of update

  • code cleanup
  • Work in progress

Associated issues

Additional context
Add helper functions to reduce the cyclomatic complexity that is currently a deepsource issue in #1647 and #1644

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

avoid saving to outputs in the helper function but produce the same relevant outputs, update instances of find_tips getting used throughout morphology
img input not just for plotting debug
add optimal assignment input
since no outputs in sorting, skip the label storage. wasn't used downstream but also don't need to store anymore since _find_tips also doesn't store to outputs
rearrage ome imports and change where things are getting called from
@HaleySchuhl HaleySchuhl added work in progress Mark work in progress update Updates an existing feature/method cleanup Code quality updates labels Feb 6, 2025
@HaleySchuhl HaleySchuhl self-assigned this Feb 6, 2025
Copy link

deepsource-io bot commented Feb 6, 2025

Here's the code health analysis summary for commits e160b2a..0076a1c. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Python LogoPython❌ Failure
❗ 2 occurences introduced
🎯 1 occurence resolved
View Check ↗
DeepSource Test coverage LogoTest coverage❌ Failure
❗ 1 occurence introduced
🚨 1 failing metric
View Check ↗

Code Coverage Report

MetricAggregatePython
Branch Coverage100%100%
Composite Coverage100%100%
Line Coverage100%100%
New Branch Coverage100%100%
New Composite Coverage99.5%99.5%
New Line Coverage99.5%, ❌ Below Threshold99.5%, ❌ Below Threshold

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

@HaleySchuhl HaleySchuhl marked this pull request as draft February 6, 2025 16:33
@HaleySchuhl HaleySchuhl closed this Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Code quality updates update Updates an existing feature/method work in progress Mark work in progress
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant