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

bugfix for roi_type="largest" in roi.filter #1518

Merged
merged 16 commits into from May 16, 2024
Merged

Conversation

HaleySchuhl
Copy link
Contributor

@HaleySchuhl HaleySchuhl commented May 9, 2024

Describe your changes
Updates the way we determine which contour is largest after filtering in pcv.roi.filter with roi_type="largest" setting. Merge this AFTER #1520

Type of update
Is this a:

  • Bug fix
  • Work in progress

Associated issues

Additional context
Add any other context about the problem here.

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

@HaleySchuhl HaleySchuhl self-assigned this May 9, 2024
@HaleySchuhl HaleySchuhl added bugfix Bug fixes work in progress Mark work in progress update Updates an existing feature/method labels May 9, 2024
@HaleySchuhl HaleySchuhl added this to Pull Requests in PlantCV4 via automation May 9, 2024
@HaleySchuhl HaleySchuhl added this to the PlantCV v4.3 milestone May 9, 2024
Copy link

deepsource-io bot commented May 9, 2024

Here's the code health analysis summary for commits de60aec..b86af6b. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Python LogoPython✅ Success
🎯 2 occurences resolved
View Check ↗
DeepSource Test coverage LogoTest coverage✅ SuccessView Check ↗

Code Coverage Report

MetricAggregatePython
Branch Coverage100%100%
Composite Coverage99.7%99.7%
Line Coverage99.7%99.7%
New Branch Coverage100%100%
New Composite Coverage100%100%
New Line Coverage100%, ✅ Above Threshold100%, ✅ Above Threshold

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

@HaleySchuhl
Copy link
Contributor Author

Added different assertions for the unit test. Instead of saying the contour is exactly xx pixels, we can make sure that the contour size is the same as before filtering out the small object. Also added a small object to the "pre" mask so that the function is actually doing something.

@HaleySchuhl HaleySchuhl 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 May 13, 2024
@nfahlgren nfahlgren merged commit 8e34132 into main May 16, 2024
5 checks passed
PlantCV4 automation moved this from Pull Requests to Done May 16, 2024
@nfahlgren nfahlgren deleted the roi_largest_bugfix branch May 16, 2024 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Bug fixes merge in order Set of PRs that need to be merged sequentially ready to review update Updates an existing feature/method
Projects
PlantCV4
  
Done
Development

Successfully merging this pull request may close these issues.

Bug in logic behind roi_type="largest" option inside pcv.roi.filter
2 participants