Skip to content

Load OJIP data on-demand#1939

Merged
nfahlgren merged 13 commits into
v5.0from
lazy-load-ojip
May 29, 2026
Merged

Load OJIP data on-demand#1939
nfahlgren merged 13 commits into
v5.0from
lazy-load-ojip

Conversation

@nfahlgren
Copy link
Copy Markdown
Member

@nfahlgren nfahlgren commented May 27, 2026

Describe your changes
This PR adds new classes for OJIP dark and light measurements, PSD and PSL, respectively. Unlike CHL and CLR data, PSD and PSL load the OJIP data from file each time. We don't expect users to access the PSD and PSL data directly, rather the YII and NPQ analysis functions will instead.

ps = pcv.photosynthesis.read_cropreporter("PSII_HDR_020321_WT_TOP_1.INF")
print(ps.psd)
# PSD(filepath='PSII_PSD_020321_WT_TOP_1.DAT')
psd = ps.psd.load()

Type of update
Is this a: Work in progress

Associated issues
#1926

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 v5.0 milestone May 27, 2026
@nfahlgren nfahlgren added enhancement Enhancements to existing features ready to review labels May 27, 2026
@nfahlgren nfahlgren changed the base branch from main to v5.0 May 27, 2026 18:30
@deepsource-io
Copy link
Copy Markdown

deepsource-io Bot commented May 27, 2026

DeepSource Code Review

We reviewed changes in 308298b...8b67e89 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 28, 2026 9:59p.m. Review ↗
Code coverage May 28, 2026 9:59p.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.

@joshqsumner joshqsumner self-requested a review May 28, 2026 15:00
Copy link
Copy Markdown
Contributor

@joshqsumner joshqsumner left a comment

Choose a reason for hiding this comment

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

Looks good. Leaving a note here that we should simplify the test_read_cropreporter function once these edits are done

@joshqsumner joshqsumner self-requested a review May 29, 2026 14:42
Copy link
Copy Markdown
Contributor

@joshqsumner joshqsumner left a comment

Choose a reason for hiding this comment

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

I like the changes to the tests, should be easier to parse errors and expand to next sub-classes.

@nfahlgren nfahlgren merged commit 10eaa2c into v5.0 May 29, 2026
5 checks passed
@nfahlgren nfahlgren deleted the lazy-load-ojip branch May 29, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Enhancements to existing features ready to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants