Skip to content

Deprecate C:N:P ratios between plants and litter#1233

Merged
jacobcook1995 merged 17 commits intodevelopfrom
1131-depricate-cncp-ratios
Jan 22, 2026
Merged

Deprecate C:N:P ratios between plants and litter#1233
jacobcook1995 merged 17 commits intodevelopfrom
1131-depricate-cncp-ratios

Conversation

@jacobcook1995
Copy link
Copy Markdown
Collaborator

Description

This PR deprecates the variables that go between plants and litter that use the old (one variable per element) style rather than the new elemental mass triplet format.

I've done this for foliage, roots and stems.

However, I'm leaving this PR as a draft as I wasn't sure about the reproductive tissues case. Here, there are several variables marked for deprecation which are generated within allocate_gpp (which isn't a function I feel confident messing around with), these are "plant_reproductive_tissue_turnover", "fallen_non_propagule_c_mass", "plant_rt_turnover_n_mass" and "plant_rt_turnover_p_mass".

I guess the whole flow of fruits etc to litter is going to be replaced with something that occurs via the animals/the seedbank so a lot of this stuff could just be ripped out as it will become redundant soon. But, wanted to check what the plans are before going ahead and doing that

I guess this is something that makes most sense to chat about in person in the new year

Fixes #1131

Type of change

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)

Key checklist

  • Make sure you've run the pre-commit checks: $ pre-commit run -a
  • All tests pass: $ poetry run pytest

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works
  • Relevant documentation reviewed and updated

@jacobcook1995 jacobcook1995 linked an issue Dec 17, 2025 that may be closed by this pull request
@jacobcook1995
Copy link
Copy Markdown
Collaborator Author

@sallymatson, I've made the change we discussed yesterday and deleted the reproductive tissue handling entirely from the litter model. It's now ready to review

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jan 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.02%. Comparing base (2a48b34) to head (f0d52b6).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1233      +/-   ##
===========================================
- Coverage    95.05%   95.02%   -0.03%     
===========================================
  Files           71       71              
  Lines         7317     7274      -43     
===========================================
- Hits          6955     6912      -43     
  Misses         362      362              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jacobcook1995 jacobcook1995 requested review from sallymatson and removed request for sallymatson January 9, 2026 11:43
Copy link
Copy Markdown
Collaborator

@sallymatson sallymatson left a comment

Choose a reason for hiding this comment

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

LGTM !! Thanks for making all the deletions, gonna feel so nice in the plants model after this!

@jacobcook1995 jacobcook1995 merged commit 40d4456 into develop Jan 22, 2026
13 checks passed
@jacobcook1995 jacobcook1995 deleted the 1131-depricate-cncp-ratios branch January 22, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Depricate CN/CP ratios

4 participants