Skip to content

1553-combined-object-filter #1555

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

Merged
merged 24 commits into from
Jul 5, 2024
Merged

1553-combined-object-filter #1555

merged 24 commits into from
Jul 5, 2024

Conversation

k034b363
Copy link
Contributor

@k034b363 k034b363 commented Jun 20, 2024

Describe your changes
Taking the logic of existing filter on eccentricity, this function expands to allow filtering on any numeric (float or int) object property calculated by skimage.measure.regionprops. The default threshold is 0 and cut_side="upper", which will filter nothing for most (but not all) properties. Users can also specify keeping objects below the given threshold by setting cut_side to "lower".

Type of update
Is this a:

  • New feature or feature enhancement

Associated issues
This closes #1553

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

@k034b363 k034b363 linked an issue Jun 20, 2024 that may be closed by this pull request
Copy link

deepsource-io bot commented Jun 20, 2024

Here's the code health analysis summary for commits 1672a95..49753e0. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Python LogoPython✅ SuccessView Check ↗
DeepSource Test coverage LogoTest coverage✅ SuccessView Check ↗

Code Coverage Report

MetricAggregatePython
Branch Coverage100%100%
Composite Coverage100%100%
Line Coverage100%100%
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.

@k034b363 k034b363 closed this Jun 20, 2024
@k034b363 k034b363 reopened this Jun 20, 2024
@k034b363 k034b363 added enhancement Enhancements to existing features new feature New feature ideas and solutions work in progress Mark work in progress labels Jun 20, 2024
@k034b363 k034b363 added ready to review and removed work in progress Mark work in progress labels Jun 24, 2024
@k034b363
Copy link
Contributor Author

Sample image and notebook for testing in data_science drive in jupyter/filter_objs

@k034b363 k034b363 requested a review from annacasto June 24, 2024 18:51
@nfahlgren nfahlgren added this to the PlantCV v4.4 milestone Jul 5, 2024
@nfahlgren
Copy link
Member

@k034b363 is the updated function name okay? I figure since it is in the filters submodule we can exclude filter in the function name. So now it would "read" pcv.filters.obj_props

We still support Python 3.9, which doesn't have all the type hinting features that were added in 3.10
@k034b363
Copy link
Contributor Author

k034b363 commented Jul 5, 2024

@k034b363 is the updated function name okay? I figure since it is in the filters submodule we can exclude filter in the function name. So now it would "read" pcv.filters.obj_props

Yep, that makes sense! I didn't choose the name with any reasoning or logic, I like the change better

@nfahlgren nfahlgren merged commit 7382467 into main Jul 5, 2024
@nfahlgren nfahlgren deleted the 1553-combined-object-filter branch July 5, 2024 16:47
@HaleySchuhl HaleySchuhl mentioned this pull request Jul 10, 2024
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancements to existing features new feature New feature ideas and solutions ready to review
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Flexible combined object filter
2 participants