Skip to content

Improving how excrement and carcass decay is handled#562

Merged
jacobcook1995 merged 11 commits intodevelopfrom
546-improve-how-excrement-and-carcass-decay-is-handled
Sep 17, 2024
Merged

Improving how excrement and carcass decay is handled#562
jacobcook1995 merged 11 commits intodevelopfrom
546-improve-how-excrement-and-carcass-decay-is-handled

Conversation

@jacobcook1995
Copy link
Copy Markdown
Collaborator

Description

This PR does three things:

  1. stops excrement and carcass biomass from flowing into the litter model, as this meant that we were basically requiring it to decay twice (once in the animal model and once in the litter model) before it entered the soil.
  2. adds tracking of excrement and carcass nitrogen and phosphorus. These links are really placeholders at the moment, which should be filled out once animal model stoichiometry is implemented.
  3. adds a function to calculate the split between the "scavengable" and "decayed" pools. This was previously handled by a fixed constant split. The change I made basically does the same thing with an extra step, but (hopefully) makes the logic of what we are doing clearer

The excrement and carcass decay flows from the animal model don't actually link to anything at the moment, I'll make an issue to track this, and then fix this when I'm back working on the soil model.

Fixes #510

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 Sep 16, 2024 that may be closed by this pull request
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Sep 16, 2024

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.01%. Comparing base (1b9487d) to head (c8d3ecb).
⚠️ Report is 3328 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #562      +/-   ##
===========================================
+ Coverage    94.95%   95.01%   +0.05%     
===========================================
  Files           74       74              
  Lines         4186     4235      +49     
===========================================
+ Hits          3975     4024      +49     
  Misses         211      211              

☔ 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.

Copy link
Copy Markdown
Collaborator

@TaranRallings TaranRallings left a comment

Choose a reason for hiding this comment

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

Looks good to me! (weeping softly at my desk)

@jacobcook1995 jacobcook1995 merged commit c711fe7 into develop Sep 17, 2024
@jacobcook1995 jacobcook1995 deleted the 546-improve-how-excrement-and-carcass-decay-is-handled branch September 17, 2024 14: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.

Improve how excrement and carcass decay is handled Animal input into litter model should be improved

3 participants