ImperialCollegeLondon / virtual_ecosystem

This repository is the home for the codebase for the Virtual Ecosystem project.
https://virtual-ecosystem.readthedocs.io
BSD 3-Clause "New" or "Revised" License
9 stars 1 forks source link

Feature/animal module - The Madingley Foraging Update #410

Closed TaranRallings closed 5 months ago

TaranRallings commented 6 months ago

Description

This PR is to get the VE in line with the Madingley Model's approach to foraging dynamics. It is a lot more complicated than what I had done previously and now I understand why foraging took up most of their computing resources! Foraging is completely reworked and now involves a lot of hopping back and forth between methods of AnimalCohort and scaling_functions. I attempted to impose some consistent logic on which methods went where but I am confident it can be improved.

All feedback is welcome but I am particularly looking for errors/improvements to the organisational structure and how things are woven together. If you notice things that could speed up run-time, that would be useful as well.

This work is both too large and the product of new-dad brain, mea culpa. I am pretty sure some obvious stuff slipped through the cracks but I've been staring at this for too long to see it!

Fixes # (issue)

Type of change

Key checklist

Further checks

codecov-commenter commented 6 months ago

Codecov Report

Attention: Patch coverage is 97.79006% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 94.45%. Comparing base (803ed0f) to head (d606184).

Files Patch % Lines
virtual_ecosystem/models/animals/animal_cohorts.py 97.14% 3 Missing :warning:
...ual_ecosystem/models/animals/animal_communities.py 85.71% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #410 +/- ## =========================================== + Coverage 94.11% 94.45% +0.34% =========================================== Files 68 68 Lines 3434 3555 +121 =========================================== + Hits 3232 3358 +126 + Misses 202 197 -5 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

TaranRallings commented 5 months ago

LGTM too - there are three unresolved comments from my previous review. Could you resolve those?

Bah! I missed the "expand comments" bit they were hiding in!