plantcv icon indicating copy to clipboard operation
plantcv copied to clipboard

Morphology segment combine update

Open HaleySchuhl opened this issue 2 years ago • 3 comments

Describe your changes Update the functionality to the pcv.morphology.segment_combine. This repairs the error with using .remove in issue #928 and simplifies the code so that it will only accept one list of segmentss to get combined.

Type of update Is this a:

  • Bug fi

Associated issues

  • closes #928

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.

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

HaleySchuhl avatar Aug 12 '22 20:08 HaleySchuhl

Codecov Report

Merging #933 (4cc24e4) into main (8f58ab7) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #933   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          129       129           
  Lines         5813      5803   -10     
=========================================
- Hits          5813      5803   -10     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
plantcv/plantcv/morphology/segment_combine.py 100.00% <100.00%> (ø)

codecov[bot] avatar Aug 12 '22 21:08 codecov[bot]

Thanks! small comment:

if type(segment_list[0]) is not int:

does not gracefully handle the case of an empty segment_list

eyaler avatar Aug 25 '22 01:08 eyaler

Thanks! small comment:

if type(segment_list[0]) is not int:

does not gracefully handle the case of an empty segment_list

Very true! An added fatal_error with an informative message is a good idea.

HaleySchuhl avatar Aug 30 '22 18:08 HaleySchuhl