-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New PModelEnvironment implementation #412
base: develop
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #412 +/- ##
===========================================
+ Coverage 96.27% 96.42% +0.15%
===========================================
Files 34 36 +2
Lines 2659 2744 +85
===========================================
+ Hits 2560 2646 +86
+ Misses 99 98 -1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two small suggestions
Description
This PR updates the definition of
PModelEnvironment
to the proposed structure in the version 2.0.0 sketch in #394__init__
treats allkwargs
variables as potential additional variables.BoundsChecker
to validate inputs.tk
as an internal attribute.It also updates all of the test and doc usages of
PModelEnvironment
. It does not remove usage of fAPAR and PPFD outside ofPModelEnvironment
- these will become redundant when #401 is merged, addressing #386 and #385, so I'll tidy up on that branch.Tip
There are a lot of files changed because of all the test and docstring usage of this core class, but the main thing to review is the new
pmodel_environment.py
file.Important
Having had to update mutiple test and doc files to set
fapar=1, ppfd=1
, I think it makes sense to have these two variables default to one.90% of the time, users will want to set them, but some use cases don't need
fapar
andppfd
and it is annoying to have to do so. Can you see any downsides to this tweak?Fixes #390
Type of change
Key checklist
pre-commit
checks:$ pre-commit run -a
$ poetry run pytest
Further checks