Skip to content

Morphology class check cycles - #2112

Merged
nfahlgren merged 9 commits into
morphology-classfrom
morphology-class-check-cycles
Nov 19, 2026
Merged

nfahlgren merged 9 commits into
morphology-classfrom
morphology-class-check-cycles

Conversation

@joshqsumner

@joshqsumner joshqsumner commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes
Adds cycles attribute to the pcv.morphology.morph class to replace the pcv.morphology.check_cycles function.

Type of update
This is refactoring

Associated issues
Part of #2097

Additional context
Follows PR #2111

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

@joshqsumner joshqsumner added this to the PlantCV v5.0 milestone Nov 3, 2026
@joshqsumner joshqsumner added work in progress Mark work in progress merge in order Set of PRs that need to be merged sequentially labels Nov 3, 2026
@deepsource-io

deepsource-io Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in bac010a...3cb3048 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Coverage  

Code Review Summary

Analyzer Status Updated (UTC) Details
Python Nov 18, 2026 8:43p.m. Review ↗
Code coverage Nov 18, 2026 8:46p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@joshqsumner joshqsumner mentioned this pull request Nov 3, 2026
8 tasks done
@joshqsumner
joshqsumner changed the base branch from v5.0 to morphology-class November 6, 2026 15:39
@joshqsumner
joshqsumner added this pull request to stack #2134 November 6, 2026 15:39
@joshqsumner joshqsumner added ready to review and removed work in progress Mark work in progress labels Nov 9, 2026
@joshqsumner
joshqsumner force-pushed the morphology-class-check-cycles branch 2 times, most recently from b4cd045 to 0493736 Compare November 13, 2026 15:38
@nfahlgren
nfahlgren force-pushed the morphology-class-check-cycles branch from be7ab76 to 20e141b Compare November 14, 2026 03:29
@nfahlgren
nfahlgren requested a balanced review from Copilot November 14, 2026 03:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The changes leave a broken MkDocs navigation link and remove zero-cycle regression coverage without testing the non-debug cycles path.

1 open issue
What changed in this PR

This PR continues the morphology restructuring in #2097, building on #2111 by moving cycle detection into the Morph class.

Changes:

  • Replaces check_cycles with Morph.cycles, returning a count and optionally plotting detected cycles.
  • Updates documentation and removes references to automatic cycle-count observations.
  • Adds class-based cycle tests and resets shared color state in segment-combination tests.
File Description
tests/​plantcv/​morphology/​test_segment_combine.py Resets shared color state around tests.
tests/​plantcv/​morphology/​test_morph_class.py Tests cycle counts and debug-image creation.
tests/​plantcv/​morphology/​test_check_cycles.py Removes standalone cycle-detection tests.
plantcv/​plantcv/​morphology/​morph_class.py Adds the cycles property and detection helper.
plantcv/​plantcv/​morphology/​check_cycles.py Removes the standalone function.
plantcv/​plantcv/​morphology/​__init__.py Removes the check_cycles export.
docs/​updating.md Adds migration guidance for the removed function.
docs/​segment_combine.md Updates cycle-detection workflow guidance.
docs/​params.md Updates the cycle-plotting reference.
docs/​outputs.md Removes the old function from output-producing APIs.
docs/​output_measurements.md Removes the automatic cycle-observation reference.
docs/​morphology_class.md Documents cycle counts and conditional plotting.
docs/​check_cycles.md Removes the standalone function’s documentation.

Review effort: Balanced

@nfahlgren
nfahlgren force-pushed the morphology-class-check-cycles branch from 5d279a2 to 66b36e7 Compare November 14, 2026 17:01
@joshqsumner
joshqsumner force-pushed the morphology-class-check-cycles branch 2 times, most recently from 5baa035 to 1b357c9 Compare November 17, 2026 15:00
@nfahlgren
nfahlgren force-pushed the morphology-class-check-cycles branch from 1b357c9 to bfe97cb Compare November 17, 2026 19:36
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@nfahlgren
nfahlgren force-pushed the morphology-class-check-cycles branch 2 times, most recently from 3cb3048 to 24aa3d1 Compare November 18, 2026 20:38
@nfahlgren
nfahlgren force-pushed the morphology-class-check-cycles branch from 24aa3d1 to 3cb3048 Compare November 18, 2026 20:42
@nfahlgren
nfahlgren merged commit d58c45c into v5.0 Nov 19, 2026
11 checks passed
@nfahlgren
nfahlgren deleted the morphology-class-check-cycles branch November 19, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge in order Set of PRs that need to be merged sequentially ready to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants