-
Notifications
You must be signed in to change notification settings - Fork 2
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
Adding inorganic phosphorus pools to the soil model #672
Conversation
…on returning a dataclass
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #672 +/- ##
===========================================
+ Coverage 94.56% 94.63% +0.07%
===========================================
Files 73 73
Lines 4634 4757 +123
===========================================
+ Hits 4382 4502 +120
- Misses 252 255 +3 ☔ 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.
It all looks good to me, and the changes to dataclasses make it clearer. To be honest I don't know the code architecture well enough yet to feel confident in giving approval just bc I can't really think through the implications, so I'll let the other's do that :)
I'm at a conference this week and cannot review this in detail. If you can wait until next week, great! Otherwise, just move on if there're enough positive reviews. |
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.
I can't comment on the science, but the code changes seem reasonable and clear.
Description
This pull request adds three inorganic phosphorus pools to the soil model. One of these forms of phosphorus (labile phosphorus) can be used by microbes so this pull requests alters that part of the model, as now there are two sources of phosphorus that microbes can grow from. The other two pools don't do all that much and basically just exist as stores of inorganic phosphorus in the soil, as such transfers involving these pools are just governed by slow linear kinetics.
Based on @dalonsoa comments on my last PR I've tried to replace returned dictionaries with dataclasses to make the code clearer.
Obviously this is a pretty science heavy PR but feedback on code style etc would be useful. I need to make further tweaks to this section of code in the immediate future, so feel free to suggest longer term improvements if they occur.
Fixes #663
Type of change
Key checklist
pre-commit
checks:$ pre-commit run -a
$ poetry run pytest
Further checks