Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/stoichiometry for Animals #726

Open
wants to merge 25 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
5565fcc
Initial commit for stoichiometry, containing: cnp proportion trait in…
TaranRallings Jan 14, 2025
aeced50
Updated a host of classes and methods across animal cohorts, model, p…
TaranRallings Jan 17, 2025
3a2623e
Merge branch 'develop' into feature/stoichiometry
TaranRallings Jan 22, 2025
7d6e6c9
Changed mass_current to an auto-updating property, moved defecate and…
TaranRallings Jan 22, 2025
5af137d
Changed reproductive mass to a property and updated birth() to run of…
TaranRallings Jan 22, 2025
c8152ab
Added constants for initializing functional group cnp.
TaranRallings Jan 24, 2025
3e38b94
Changed litter_pool.mass_current to a property and began work on deca…
TaranRallings Jan 29, 2025
f1217b2
Merge branch 'develop' into feature/stoichiometry
TaranRallings Jan 30, 2025
672960b
Finished testing decay and debugged some decay logic.
TaranRallings Jan 30, 2025
e55470c
Revised tests for some animalcohort methods.
TaranRallings Jan 30, 2025
f0241dd
Further agonizing work updating tests for stoichiometry.
TaranRallings Jan 31, 2025
6864840
Finished the testing rework for animal cohorts.
TaranRallings Feb 3, 2025
40861b5
Changes CNP notation for full words 'carbon' etc, to align animal mod…
TaranRallings Feb 4, 2025
79612a5
Fixed testing for populate litter pools.
TaranRallings Feb 4, 2025
084733e
Fixed remaining tests for stoichiometry rework.
TaranRallings Feb 5, 2025
079ded1
Merge branch 'develop' into feature/stoichiometry
TaranRallings Feb 5, 2025
241c5a0
Fixed error with docs.
TaranRallings Feb 5, 2025
94486a0
Merge branch 'develop' into feature/stoichiometry
TaranRallings Feb 7, 2025
d5fa461
Initial version of the CNP class.
TaranRallings Feb 7, 2025
452db10
Added a CNP class for handling stoichiometic mass and have reworked m…
TaranRallings Feb 13, 2025
a4e20eb
Merge branch 'develop' into feature/stoichiometry
TaranRallings Feb 14, 2025
c69295f
Fixed tests for cnp and decay.
TaranRallings Feb 14, 2025
66dea7e
Merge branch 'develop' into feature/stoichiometry
TaranRallings Feb 14, 2025
1b20aec
Fixed doc build.
TaranRallings Feb 14, 2025
eb41293
Merge branch 'develop' into feature/stoichiometry
TaranRallings Feb 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 32 additions & 20 deletions tests/models/animals/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -672,19 +672,34 @@ def butterfly_cohort_instance(

@pytest.fixture
def excrement_pool_instance():
"""Fixture for a soil pool used in tests."""
"""Fixture for an excrement pool used in tests."""
from virtual_ecosystem.models.animal.decay import ExcrementPool

return ExcrementPool(
scavengeable_carbon=0.0,
decomposed_carbon=0.0,
scavengeable_nitrogen=0.0,
decomposed_nitrogen=0.0,
scavengeable_phosphorus=0.0,
decomposed_phosphorus=0.0,
scavengeable_cnp={"carbon": 0.0, "nitrogen": 0.0, "phosphorus": 0.0},
decomposed_cnp={"carbon": 0.0, "nitrogen": 0.0, "phosphorus": 0.0},
)


@pytest.fixture
def excrement_pools_instance():
"""Fixture for excrement pools used in tests."""
from virtual_ecosystem.models.animal.decay import ExcrementPool

return {
1: [
ExcrementPool(
scavengeable_cnp={
"carbon": 500.0,
"nitrogen": 100.0,
"phosphorus": 50.0,
},
decomposed_cnp={"carbon": 0.0, "nitrogen": 0.0, "phosphorus": 0.0},
)
]
}


@pytest.fixture
def plant_instance(plant_data_instance, constants_instance):
"""Fixture for a plant community used in tests."""
Expand Down Expand Up @@ -737,12 +752,8 @@ def carcass_pool_instance():
from virtual_ecosystem.models.animal.decay import CarcassPool

return CarcassPool(
scavengeable_carbon=0.0,
decomposed_carbon=0.0,
scavengeable_nitrogen=0.0,
decomposed_nitrogen=0.0,
scavengeable_phosphorus=0.0,
decomposed_phosphorus=0.0,
scavengeable_cnp={"carbon": 0.0, "nitrogen": 0.0, "phosphorus": 0.0},
decomposed_cnp={"carbon": 0.0, "nitrogen": 0.0, "phosphorus": 0.0},
)


Expand All @@ -752,16 +763,17 @@ def carcass_pools_instance():
from virtual_ecosystem.models.animal.decay import CarcassPool

return {
1: [
cell_id: [
CarcassPool(
scavengeable_carbon=500.0,
decomposed_carbon=0.0,
scavengeable_nitrogen=100.0,
decomposed_nitrogen=0.0,
scavengeable_phosphorus=50.0,
decomposed_phosphorus=0.0,
scavengeable_cnp={
"carbon": 500.0,
"nitrogen": 100.0,
"phosphorus": 50.0,
},
decomposed_cnp={"carbon": 0.0, "nitrogen": 0.0, "phosphorus": 0.0},
)
]
for cell_id in range(0, 9) # Creates carcass pools for cells 0 to 8
}


Expand Down
Loading