Skip to content

Naive fix for too high metabolic fractions#1360

Merged
jacobcook1995 merged 2 commits intodevelopfrom
1359-fraction-of-input-biomass-going-to-structural-biomass-is-less-than-the-lignin-fraction
Feb 23, 2026
Merged

Naive fix for too high metabolic fractions#1360
jacobcook1995 merged 2 commits intodevelopfrom
1359-fraction-of-input-biomass-going-to-structural-biomass-is-less-than-the-lignin-fraction

Conversation

@jacobcook1995
Copy link
Copy Markdown
Collaborator

Description

This PR is a naive fix for metabolic fractions of litter input being too high, basically be converting the existing test to a step that forces the value to conform. This will be handled more elegantly when I get round to addressing #1010, but I think this quick fix is good enough for now.

I've also changed what this function raises errors for, so that it now checks for lignin proportions outside the physically possible range, which would break the logic of the function.

Fixes #1359

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

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.99%. Comparing base (d8e74f4) to head (bc556af).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1360      +/-   ##
===========================================
+ Coverage    94.95%   94.99%   +0.03%     
===========================================
  Files           71       71              
  Lines         7369     7366       -3     
===========================================
  Hits          6997     6997              
+ Misses         372      369       -3     

☔ 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 merged commit 177aaaf into develop Feb 23, 2026
13 checks passed
@jacobcook1995 jacobcook1995 deleted the 1359-fraction-of-input-biomass-going-to-structural-biomass-is-less-than-the-lignin-fraction branch February 23, 2026 10:08
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.

"Fraction of input biomass going to structural biomass is less than the lignin fraction!"

3 participants