Coverage for pybeepop/beepop/egg.py: 83%
6 statements
« prev ^ index » next coverage.py v7.11.0, created at 2025-10-30 13:34 +0000
« prev ^ index » next coverage.py v7.11.0, created at 2025-10-30 13:34 +0000
1"""BeePop+ Egg Module.
3This module contains the Egg class that represents the earliest stage of honey
4bee development. Eggs are laid by the queen and represent the beginning of the
5bee lifecycle before hatching into larvae.
7Eggs in the simulation develop over a fixed period (typically 3 days) before
8transitioning to the larval stage. They require no resources during development.
9"""
11from pybeepop.beepop.bee import Bee
14class Egg(Bee):
15 """Egg stage honey bee class representing the earliest development stage.
17 This class models honey bee eggs laid by the queen. Eggs represent the
18 initial stage of bee development and require no resources while developing
19 over a fixed incubation period before hatching into larvae.
21 Eggs are not susceptible to mite infestation.
22 They transition to larvae after completing their development period.
24 Attributes:
25 number (int): Population count for this egg cohort (inherited from Bee)
26 age (float): Development age in days (inherited from Bee)
27 alive (bool): Whether this cohort is alive (inherited from Bee)
28 """
30 def __init__(self, number=0):
31 """Initialize a new Egg cohort.
33 Creates an egg population with specified initial size. Eggs have
34 no additional attributes beyond the base Bee class as they are
35 the simplest life stage.
37 Args:
38 number (int, optional): Initial population size for this egg
39 cohort. Defaults to 0.
40 """
41 super().__init__(number)
43 def __str__(self):
44 return f"Egg(number={self.number}, age={self.age}, alive={self.alive})"