Skip to content

Feature/soil trophic piping#1012

Merged
TaranRallings merged 24 commits intodevelopfrom
feature/soil-trophic-piping
Aug 29, 2025
Merged

Feature/soil trophic piping#1012
TaranRallings merged 24 commits intodevelopfrom
feature/soil-trophic-piping

Conversation

@TaranRallings
Copy link
Copy Markdown
Collaborator

@TaranRallings TaranRallings commented Aug 28, 2025

Description

I have made a separate PR for the whole soil foraging system. The new plant piping will be done separately. This portion was expedited as Jacob is going on holiday.

There shouldn't be anything actually new here, just new versions of existing things to handle the integration of mushrooms, soil fungi, pom, and bacteria. I have gone with mushrooms as the diet name for fruiting bodies because underscores don't work with my naming system.

New Traits

  • specific diets for for fungal fruiting (mushrooms), soil fungi, pom, and bacteria

New methods:

  • delta_mass methods for fungal fruiting, soil fungi, pom, and bacteria
  • get_pools methods for those same resources

Modified methods

  • forage cohort
  • forage community

Fixes # (issue)

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 Aug 28, 2025

Codecov Report

❌ Patch coverage is 95.69892% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.11%. Comparing base (61f557a) to head (7a93eb0).
⚠️ Report is 7 commits behind head on develop.

Files with missing lines Patch % Lines
virtual_ecosystem/models/animal/animal_model.py 66.66% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1012      +/-   ##
===========================================
+ Coverage    94.93%   95.11%   +0.18%     
===========================================
  Files           80       80              
  Lines         6631     6693      +62     
===========================================
+ Hits          6295     6366      +71     
+ Misses         336      327       -9     

☔ 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

@jacobcook1995 jacobcook1995 left a comment

Choose a reason for hiding this comment

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

This seems to be completely consistent with how the previous litter model piping is done. (so there might still be issues, but if there are they will be broader than this PR).

Happy for this to be merged once tests are added

if diet_type & DietType.MUSHROOMS:
# mushroom pool
result["fungal_fruiting_bodies"] = (0.0, 0.0)
if diet_type & DietType.FUNGI:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is it worth calling this diet type something more specific like SOIL_FUNGI, to really differentiate it from MUSHROOMS?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I think this is a solid idea but I'll need to do a passthrough later on to clean up the diet language and can do it then, if that works for you.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yep that works for me (I guess this is mainly something that will cause you confusion, as I doubt I will be looking at this code)

herbivory_waste_pools=None,
)

def delta_mass_pomivory(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

love the name!

@TaranRallings TaranRallings marked this pull request as ready for review August 29, 2025 08:32
@TaranRallings TaranRallings merged commit 95ee0e1 into develop Aug 29, 2025
13 checks passed
@TaranRallings TaranRallings deleted the feature/soil-trophic-piping branch January 9, 2026 15:01
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.

3 participants