Skip to content

1862 import APH file in read_cropreporter#1906

Open
kmurphy61 wants to merge 9 commits into
v5.0from
1862-import-APH-update
Open

1862 import APH file in read_cropreporter#1906
kmurphy61 wants to merge 9 commits into
v5.0from
1862-import-APH-update

Conversation

@kmurphy61
Copy link
Copy Markdown
Contributor

Describe your changes
APH file types were previously imported as xarray, and are now converted as numpy in order to match styles and provide ease of downstream analysis.

Type of update
Is this a:

  • Feature enhancement

Associated issues
Issue 1862

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

kmurphy61 added 4 commits May 3, 2026 16:05
switch aph import to numpy instead of an xarray
Wrap debug in xarray so that the debug can have titles for the frames
@kmurphy61 kmurphy61 added the update Updates an existing feature/method label May 3, 2026
@kmurphy61 kmurphy61 self-assigned this May 3, 2026
@deepsource-io
Copy link
Copy Markdown

deepsource-io Bot commented May 3, 2026

DeepSource Code Review

We reviewed changes in 38b01e4...9a34460 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 May 12, 2026 6:21p.m. Review ↗
Code coverage May 12, 2026 6:21p.m. Review ↗

Code Coverage Summary

Language Line Coverage (New Code) Line Coverage (Overall)
Aggregate
100%
[✓ above threshold]
99.9%
[▼ down 0.1% from main]
Python
100%
[✓ above threshold]
99.9%
[▼ down 0.1% from main]

➟ Additional coverage metrics may have been reported. See full coverage report ↗


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.

@kmurphy61
Copy link
Copy Markdown
Contributor Author

@deepsourcebot review

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates CropReporter APH ingestion so APH data is stored as a NumPy array (Red/FarRed only) rather than an xarray DataArray, aligning it with other NumPy-based protocol outputs and simplifying downstream analysis.

Changes:

  • Convert APH import from xarray DataArray to a 3D NumPy array containing only the Red and FarRed frames.
  • Add an xarray wrapper only for debug plotting so frame labels render in debug output.
  • Update the APH screenshot filename reference in the documentation.

Reviewed changes

Copilot reviewed 2 out of 4 changed files in this pull request and generated 2 comments.

File Description
plantcv/plantcv/photosynthesis/read_cropreporter.py Changes APH parsing/storage to NumPy and adjusts debug visualization accordingly.
docs/photosynthesis_read_cropreporter.md Updates APH screenshot reference in docs to match the new filename.
docs/img/documentation_images/photosynthesis_read_cropreporter/6_aph_frames.png Asset presence in PR context; documentation reference now points to 6_APH-frames.png.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread plantcv/plantcv/photosynthesis/read_cropreporter.py
Comment thread docs/photosynthesis_read_cropreporter.md
kmurphy61 added 4 commits May 3, 2026 19:56
Based on copilot suggestion
Used monkeypatch to test a scenario for less APH frames
Do not use pytest
@nfahlgren nfahlgren added this to the PlantCV v5.0 milestone May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready to review update Updates an existing feature/method

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants