You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This pull request introduces a new step counter feature to the `ModelDF` class and adds corresponding tests. The main changes include adding a step counter, modifying the `step` method to increment the counter, and adding tests to verify the new functionality.
Enhancements to `ModelDF` class:
* [`mesa_frames/concrete/model.py`](diffhunk://#diff-c5db932a22d9e3b30ff7eead6d38e655cf3be4fee195a6fe18409bbe3c575ddcR88-R101): Introduced a new private attribute `_steps` to keep track of the step count and added a property `steps` to retrieve the current step count. Modified the `step` method to increment the step counter automatically by wrapping the user-defined `step` method. [[1]](diffhunk://#diff-c5db932a22d9e3b30ff7eead6d38e655cf3be4fee195a6fe18409bbe3c575ddcR88-R101) [[2]](diffhunk://#diff-c5db932a22d9e3b30ff7eead6d38e655cf3be4fee195a6fe18409bbe3c575ddcR150-R160)
Testing the new step counter:
* [`tests/test_modeldf.py`](diffhunk://#diff-2be7ad75672aa528662114edd128ae28ae41de2919b9e1740388a914a74122ffR1-R37): Added a new test class `Test_ModelDF` to verify the functionality of the step counter. This includes tests for the default step counter behavior and custom user-defined step behavior.
---------
Co-authored-by: Adam Amer <136176500+adamamer20@users.noreply.github.com>
0 commit comments