Reconfigure initial plant cohort data#1066
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1066 +/- ##
===========================================
- Coverage 94.67% 94.56% -0.11%
===========================================
Files 79 79
Lines 6964 6973 +9
===========================================
+ Hits 6593 6594 +1
- Misses 371 379 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
sallymatson
approved these changes
Oct 6, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
As noted in #1041, the current path for loading initial plant cohort data shoves it into the Data object, from where it is read once and never touched again. That also adds an arbitrary single use
cohort_idaxis into the Data object.This PR swaps that data out into a separately configured CSV file of initial cohort data, which is both easier for users and avoids complicating the Data object structure.
plant_cohorts_pft, ..._dbh, ..._n, ..._cell_idvariables from required__init__vars in theDataobject.PlantsModel(..., cohort_data: pd.Dataframe)argument.cohort_data_pathconfig option and thePlantsModel.from_config()now loads that configured file and passes the resulting data frame in toPlantsModel.PlantCommunities.__init__now takes that dataframe as an input rather than theDataobject.example_datadirectory is also updated to the new configuration.docs/source/_static, which was last updated in the Stone Age.Fixes #1041
Type of change
Key checklist
pre-commitchecks:$ pre-commit run -a$ poetry run pytestFurther checks