Skip to content

Conversation

adamamer20
Copy link
Member

This PR updates class and property names to improve clarity and align with the upcoming refactor in #172.

Changes

  • ModelDFModel
  • AgentsDFAgentSetRegistry
  • AgentContainerAbstractAgentSetRegistry
  • AgentSetPolarsAgentSet
  • AgentSetDF (abstract) → AbstractAgentSet
  • Model property: model.agentsmodel.sets

Reasoning

Scope

  • Names only — no functional changes.
  • Existing APIs are preserved apart from renamed classes/properties.

- Updated test_datacollector.py to replace ModelDF and AgentSetPolars with Model and AgentSet.
- Modified ExampleModel and ExampleModelWithMultipleCollects to use AgentSetRegistry.
- Adjusted fixtures to reflect changes in agent set classes.
- Updated test_grid.py to use new Model and AgentSet classes, ensuring compatibility with the refactored code.
- Changed test_modeldf.py to utilize the new Model class.
- Updated dependencies in uv.lock to include mesa version 3.2.0.
- Updated import paths for AbstractAgentSet and AgentSetRegistry to reflect new module structure.
- Created a new concrete implementation of AgentSetRegistry in `agentsetregistry.py`, providing a collection for managing agent sets with DataFrame-based storage.
- Modified existing files to utilize the new AgentSetRegistry class, ensuring consistent usage across the codebase.
Copy link

codecov bot commented Sep 1, 2025

Codecov Report

❌ Patch coverage is 93.75000% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.54%. Comparing base (8db08de) to head (475c4cb).

Files with missing lines Patch % Lines
mesa_frames/abstract/agentset.py 91.95% 7 Missing ⚠️
mesa_frames/abstract/agentsetregistry.py 95.09% 5 Missing ⚠️
mesa_frames/concrete/model.py 81.81% 4 Missing ⚠️
mesa_frames/abstract/space.py 94.11% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #175      +/-   ##
==========================================
+ Coverage   92.51%   92.54%   +0.03%     
==========================================
  Files          13       14       +1     
  Lines        1709     1717       +8     
==========================================
+ Hits         1581     1589       +8     
  Misses        128      128              

☔ 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.

@adamamer20 adamamer20 self-assigned this Sep 1, 2025
@adamamer20 adamamer20 added enhancement Improvements to existing features or performance. breaking Changes that break backwards compatibility or require major updates. labels Sep 1, 2025
@adamamer20 adamamer20 added this to the 0.1.0-stable milestone Sep 1, 2025
@Ben-geo Ben-geo self-requested a review September 5, 2025 19:19
Copy link
Collaborator

@Ben-geo Ben-geo left a comment

Choose a reason for hiding this comment

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

Everything looks good!
I tried to fix the pre-commit issues - but I don't have write access to this repo!
I will need to raise a separate PR!
It is a single change so should be all good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Changes that break backwards compatibility or require major updates. enhancement Improvements to existing features or performance.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement]: Rename AgentSetDF to AbstractAgentSetDF and AgentSetPolars to AgentSetDF for clarity
2 participants