ImperialCollegeLondon / pyrealm

Development of the pyrealm package, providing an integrated toolbox for modelling plant productivity, growth and demography using Python.
https://pyrealm.readthedocs.io/
MIT License
19 stars 8 forks source link

Initial draft of new quantum yield module #267

Closed davidorme closed 1 week ago

davidorme commented 1 month ago

Description

This PR implements a new approach to providing quantum yield (kphio) values to the PModel and SubdailyPModel.

In addition:

Fixes #266

Type of change

Key checklist

Further checks

codecov-commenter commented 1 month ago

Codecov Report

Attention: Patch coverage is 92.68293% with 12 lines in your changes missing coverage. Please review.

Project coverage is 95.06%. Comparing base (1f315ba) to head (16b45aa). Report is 5 commits behind head on develop.

Files with missing lines Patch % Lines
pyrealm/pmodel/pmodel_environment.py 75.00% 4 Missing :warning:
pyrealm/pmodel/quantum_yield.py 95.18% 4 Missing :warning:
pyrealm/pmodel/subdaily.py 92.00% 2 Missing :warning:
pyrealm/pmodel/functions.py 90.90% 1 Missing :warning:
pyrealm/pmodel/pmodel.py 94.73% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #267 +/- ## =========================================== - Coverage 95.29% 95.06% -0.23% =========================================== Files 28 29 +1 Lines 1720 1802 +82 =========================================== + Hits 1639 1713 +74 - Misses 81 89 +8 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

j-emberton commented 1 month ago

I see you've added a csv of data related to the Sandoval k_phio approach.

Over time we're slowly increasing the size of the data stored in the build data folder. Is there a case for migrating this to a Pyrealm zenodo and downloading once for each test session? This would allow us to better manage test data provenance.

Alternatively, maybe we could just add a readme to the pyrealm_build_data/sandoval_k_phio folder to note where this data is sourced from for any future developers.

davidorme commented 1 month ago

@j-emberton and @AmyOctoCat This is now fully implemented - could you review.

We need to finalise what to do about the breaking change - we're thinking of releasing 2.0.0rc1 to give us some wiggle room on making the functionality available but not committing to the final state of a new 2.0.0 API.

davidorme commented 1 month ago

Alternatively, maybe we could just add a readme to the pyrealm_build_data/sandoval_k_phio folder to note where this data is sourced from for any future developers.

It's de novo generated from some appropriate inputs that are included in the folder.

Having said that, at the moment we have a page in the docs about the pyrealm_build_data package but that's separated from the package contents. It would actually make a lot more sense to move the documentation in there into docstrings in __init__.py files within the pyrealm_build_data package modules and then use autodoc to maintain an API like documentation tree for the package.

j-emberton commented 1 month ago

Alternatively, maybe we could just add a readme to the pyrealm_build_data/sandoval_k_phio folder to note where this data is sourced from for any future developers.

It's de novo generated from some appropriate inputs that are included in the folder.

Having said that, at the moment we have a page in the docs about the pyrealm_build_data package but that's separated from the package contents. It would actually make a lot more sense to move the documentation in there into docstrings in __init__.py files within the pyrealm_build_data package modules and then use autodoc to maintain an API like documentation tree for the package.

OK, lets not hold up this PR with doing that but perhaps add it as an issue

j-emberton commented 1 month ago

It just occurred to me that we possibly don't want to merge into develop, as that might then constrain us from further releases under the 1.x major version. Do we instead want to create a v2.0rc branch and maintain that in parallel until v2.0 release?