Skip to content

Conversation

nfahlgren
Copy link
Member

@nfahlgren nfahlgren commented May 19, 2025

Describe your changes
The rgb2gray color conversion functions are reused throughout PlantCV, which may cause circular import issues. This PR creates new helper functions for each type of color conversion, refactors the user-facing functions as wrappers for the helpers, and refactors other functions that use color conversion to use the helper functions instead to avoid import conflicts.

Type of update
Is this a: code cleanup

Associated issues
#1704

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

@nfahlgren nfahlgren added this to the PlantCV v4.8 milestone May 19, 2025
@nfahlgren nfahlgren added ready to review cleanup Code quality updates labels May 19, 2025
@github-project-automation github-project-automation bot moved this to Pull Requests in PlantCV4 May 19, 2025
Copy link

deepsource-io bot commented May 19, 2025

Here's the code health analysis summary for commits 20f4f8e..927d195. 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.

@HaleySchuhl HaleySchuhl self-requested a review May 23, 2025 14:27
@nfahlgren nfahlgren merged commit a98789c into main May 23, 2025
5 checks passed
@nfahlgren nfahlgren deleted the create-helpers-for-color-conversion branch May 23, 2025 18:58
@github-project-automation github-project-automation bot moved this from Pull Requests to Done in PlantCV4 May 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Code quality updates ready to review
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants